Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
02114ac2
Commit
02114ac2
authored
Sep 13, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: The D3DSI_COISSUE flag changes the behavior of cnd.
parent
8273cfdf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
visual.c
dlls/d3d9/tests/visual.c
+0
-0
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+9
-2
baseshader.c
dlls/wined3d/baseshader.c
+4
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+8
-2
No files found.
dlls/d3d9/tests/visual.c
View file @
02114ac2
This diff is collapsed.
Click to expand it.
dlls/wined3d/arb_program_shader.c
View file @
02114ac2
...
...
@@ -572,6 +572,7 @@ void pshader_hw_bem(SHADER_OPCODE_ARG* arg) {
void
pshader_hw_cnd
(
SHADER_OPCODE_ARG
*
arg
)
{
IWineD3DBaseShaderImpl
*
shader
=
(
IWineD3DBaseShaderImpl
*
)
arg
->
shader
;
SHADER_BUFFER
*
buffer
=
arg
->
buffer
;
char
dst_wmask
[
20
];
char
dst_name
[
50
];
...
...
@@ -589,8 +590,14 @@ void pshader_hw_cnd(SHADER_OPCODE_ARG* arg) {
pshader_gen_input_modifier_line
(
buffer
,
arg
->
src
[
1
],
1
,
src_name
[
1
]);
pshader_gen_input_modifier_line
(
buffer
,
arg
->
src
[
2
],
2
,
src_name
[
2
]);
shader_addline
(
buffer
,
"ADD TMP, -%s, coefdiv.x;
\n
"
,
src_name
[
0
]);
shader_addline
(
buffer
,
"CMP %s, TMP, %s, %s;
\n
"
,
dst_name
,
src_name
[
1
],
src_name
[
2
]);
/* The coissue flag changes the semantic of the cnd instruction in <= 1.3 shaders */
if
(
shader
->
baseShader
.
hex_version
<=
WINED3DPS_VERSION
(
1
,
3
)
&&
arg
->
opcode_token
&
WINED3DSI_COISSUE
)
{
shader_addline
(
buffer
,
"MOV %s, %s;
\n
"
,
dst_name
,
src_name
[
1
]);
}
else
{
shader_addline
(
buffer
,
"ADD TMP, -%s, coefdiv.x;
\n
"
,
src_name
[
0
]);
shader_addline
(
buffer
,
"CMP %s, TMP, %s, %s;
\n
"
,
dst_name
,
src_name
[
1
],
src_name
[
2
]);
}
}
void
pshader_hw_cmp
(
SHADER_OPCODE_ARG
*
arg
)
{
...
...
dlls/wined3d/baseshader.c
View file @
02114ac2
...
...
@@ -949,6 +949,10 @@ void shader_trace_init(
shader_dump_param
(
iface
,
*
(
pToken
+
2
),
0
,
1
);
TRACE
(
") "
);
}
if
(
opcode_token
&
WINED3DSI_COISSUE
)
{
/* PixWin marks instructions with the coissue flag with a '+' */
TRACE
(
"+"
);
}
TRACE
(
"%s"
,
curOpcode
->
name
);
...
...
dlls/wined3d/glsl_shader.c
View file @
02114ac2
...
...
@@ -1303,8 +1303,14 @@ void shader_glsl_cnd(SHADER_OPCODE_ARG* arg) {
shader_glsl_add_src_param
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
WINED3DSP_WRITEMASK_0
,
&
src0_param
);
shader_glsl_add_src_param
(
arg
,
arg
->
src
[
1
],
arg
->
src_addr
[
1
],
write_mask
,
&
src1_param
);
shader_glsl_add_src_param
(
arg
,
arg
->
src
[
2
],
arg
->
src_addr
[
2
],
write_mask
,
&
src2_param
);
shader_addline
(
arg
->
buffer
,
"%s > 0.5 ? %s : %s);
\n
"
,
src0_param
.
param_str
,
src1_param
.
param_str
,
src2_param
.
param_str
);
/* Fun: The D3DSI_COISSUE flag changes the semantic of the cnd instruction for < 1.4 shaders */
if
(
arg
->
opcode_token
&
WINED3DSI_COISSUE
)
{
shader_addline
(
arg
->
buffer
,
"%s /* COISSUE! */);
\n
"
,
src1_param
.
param_str
);
}
else
{
shader_addline
(
arg
->
buffer
,
"%s > 0.5 ? %s : %s);
\n
"
,
src0_param
.
param_str
,
src1_param
.
param_str
,
src2_param
.
param_str
);
}
return
;
}
/* Cycle through all source0 channels */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment