Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
c9ef1ed2
Commit
c9ef1ed2
authored
Jun 16, 2009
by
Stefan Doesinger
Committed by
Alexandre Julliard
Jun 17, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Deal with instructions that do not support _SAT.
parent
a7b605af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
5 deletions
+27
-5
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+27
-5
No files found.
dlls/wined3d/arb_program_shader.c
View file @
c9ef1ed2
...
...
@@ -1158,6 +1158,7 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins)
char
src_name
[
3
][
50
];
DWORD
shader_version
=
WINED3D_SHADER_VERSION
(
ins
->
ctx
->
reg_maps
->
shader_version
.
major
,
ins
->
ctx
->
reg_maps
->
shader_version
.
minor
);
BOOL
is_color
;
shader_arb_get_dst_param
(
ins
,
dst
,
dst_name
);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
1
],
1
,
src_name
[
1
]);
...
...
@@ -1170,8 +1171,15 @@ static void pshader_hw_cnd(const struct wined3d_shader_instruction *ins)
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
0
],
0
,
src_name
[
0
]);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
2
],
2
,
src_name
[
2
]);
shader_addline
(
buffer
,
"ADD TA, -%s, coefdiv.x;
\n
"
,
src_name
[
0
]);
shader_addline
(
buffer
,
"CMP%s %s, TA, %s, %s;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst_name
,
src_name
[
1
],
src_name
[
2
]);
/* No modifiers supported on CMP */
shader_addline
(
buffer
,
"CMP %s, TA, %s, %s;
\n
"
,
dst_name
,
src_name
[
1
],
src_name
[
2
]);
/* _SAT on CMP doesn't make much sense, but it is not a pure NOP */
if
(
ins
->
dst
[
0
].
modifiers
&
WINED3DSPDM_SATURATE
)
{
shader_arb_get_register_name
(
ins
,
&
dst
->
reg
,
src_name
[
0
],
&
is_color
);
shader_addline
(
buffer
,
"MOV_SAT %s, %s;
\n
"
,
dst_name
,
dst_name
);
}
}
}
...
...
@@ -1181,6 +1189,7 @@ static void pshader_hw_cmp(const struct wined3d_shader_instruction *ins)
SHADER_BUFFER
*
buffer
=
ins
->
ctx
->
buffer
;
char
dst_name
[
50
];
char
src_name
[
3
][
50
];
BOOL
is_color
;
shader_arb_get_dst_param
(
ins
,
dst
,
dst_name
);
...
...
@@ -1189,8 +1198,15 @@ static void pshader_hw_cmp(const struct wined3d_shader_instruction *ins)
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
1
],
1
,
src_name
[
1
]);
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
2
],
2
,
src_name
[
2
]);
shader_addline
(
buffer
,
"CMP%s %s, %s, %s, %s;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst_name
,
/* No modifiers are supported on CMP */
shader_addline
(
buffer
,
"CMP %s, %s, %s, %s;
\n
"
,
dst_name
,
src_name
[
0
],
src_name
[
2
],
src_name
[
1
]);
if
(
ins
->
dst
[
0
].
modifiers
&
WINED3DSPDM_SATURATE
)
{
shader_arb_get_register_name
(
ins
,
&
dst
->
reg
,
src_name
[
0
],
&
is_color
);
shader_addline
(
buffer
,
"MOV_SAT %s, %s;
\n
"
,
dst_name
,
src_name
[
0
]);
}
}
/** Process the WINED3DSIO_DP2ADD instruction in ARB.
...
...
@@ -2038,8 +2054,14 @@ static void shader_hw_sincos(const struct wined3d_shader_instruction *ins)
shader_arb_get_src_param
(
ins
,
&
ins
->
src
[
0
],
0
,
src_name0
);
if
(
shader_is_pshader_version
(
ins
->
ctx
->
reg_maps
->
shader_version
.
type
))
{
shader_arb_get_dst_param
(
ins
,
&
ins
->
dst
[
0
],
dst_name
);
shader_addline
(
buffer
,
"SCS%s %s, %s;
\n
"
,
shader_arb_get_modifier
(
ins
),
dst_name
,
src_name0
);
/* No modifiers are supported on SCS */
shader_addline
(
buffer
,
"SCS %s, %s;
\n
"
,
dst_name
,
src_name0
);
if
(
ins
->
dst
[
0
].
modifiers
&
WINED3DSPDM_SATURATE
)
{
shader_arb_get_register_name
(
ins
,
&
dst
->
reg
,
src_name0
,
&
is_color
);
shader_addline
(
buffer
,
"MOV_SAT %s, %s;
\n
"
,
dst_name
,
src_name0
);
}
}
else
if
(
priv
->
target_version
>=
NV2
)
{
shader_arb_get_register_name
(
ins
,
&
dst
->
reg
,
dst_name
,
&
is_color
);
...
...
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