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
09d74b74
Commit
09d74b74
authored
May 15, 2010
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 21, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Split up the "one" pixel shader helper constant.
parent
a83a9c1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+8
-8
No files found.
dlls/wined3d/arb_program_shader.c
View file @
09d74b74
...
...
@@ -1366,7 +1366,7 @@ static void shader_hw_sample(const struct wined3d_shader_instruction *ins, DWORD
if
(
pshader
)
{
gen_color_correction
(
buffer
,
dst_str
,
ins
->
dst
[
0
].
write_mask
,
"
one
"
,
"coefmul.x"
,
priv
->
cur_ps_args
->
super
.
color_fixup
[
sampler_idx
]);
"
ps_helper_const.x
"
,
"coefmul.x"
,
priv
->
cur_ps_args
->
super
.
color_fixup
[
sampler_idx
]);
}
}
...
...
@@ -1405,13 +1405,13 @@ static void shader_arb_get_src_param(const struct wined3d_shader_instruction *in
shader_addline
(
buffer
,
"ADD T%c, -%s, coefdiv.x;
\n
"
,
'A'
+
tmpreg
,
regstr
);
break
;
case
WINED3DSPSM_SIGN
:
shader_addline
(
buffer
,
"MAD T%c, %s, coefmul.x, -
one
.x;
\n
"
,
'A'
+
tmpreg
,
regstr
);
shader_addline
(
buffer
,
"MAD T%c, %s, coefmul.x, -
ps_helper_const
.x;
\n
"
,
'A'
+
tmpreg
,
regstr
);
break
;
case
WINED3DSPSM_SIGNNEG
:
shader_addline
(
buffer
,
"MAD T%c, %s, -coefmul.x,
one
.x;
\n
"
,
'A'
+
tmpreg
,
regstr
);
shader_addline
(
buffer
,
"MAD T%c, %s, -coefmul.x,
ps_helper_const
.x;
\n
"
,
'A'
+
tmpreg
,
regstr
);
break
;
case
WINED3DSPSM_COMP
:
shader_addline
(
buffer
,
"SUB T%c,
one
.x, %s;
\n
"
,
'A'
+
tmpreg
,
regstr
);
shader_addline
(
buffer
,
"SUB T%c,
ps_helper_const
.x, %s;
\n
"
,
'A'
+
tmpreg
,
regstr
);
break
;
case
WINED3DSPSM_X2
:
shader_addline
(
buffer
,
"ADD T%c, %s, %s;
\n
"
,
'A'
+
tmpreg
,
regstr
,
regstr
);
...
...
@@ -2192,7 +2192,7 @@ static void pshader_hw_texdepth(const struct wined3d_shader_instruction *ins)
/* According to the msdn, the source register(must be r5) is unusable after
* the texdepth instruction, so we're free to modify it
*/
shader_addline
(
buffer
,
"MIN %s.y, %s.y,
one.y
;
\n
"
,
dst_name
,
dst_name
);
shader_addline
(
buffer
,
"MIN %s.y, %s.y,
ps_helper_const.x
;
\n
"
,
dst_name
,
dst_name
);
/* How to deal with the special case dst_name.g == 0? if r != 0, then
* the r * (1 / 0) will give infinity, which is clamped to 1.0, the correct
...
...
@@ -2200,7 +2200,7 @@ static void pshader_hw_texdepth(const struct wined3d_shader_instruction *ins)
*/
shader_addline
(
buffer
,
"RCP %s.y, %s.y;
\n
"
,
dst_name
,
dst_name
);
shader_addline
(
buffer
,
"MUL TA.x, %s.x, %s.y;
\n
"
,
dst_name
,
dst_name
);
shader_addline
(
buffer
,
"MIN TA.x, TA.x,
one
.x;
\n
"
);
shader_addline
(
buffer
,
"MIN TA.x, TA.x,
ps_helper_const
.x;
\n
"
);
shader_addline
(
buffer
,
"MAX result.depth, TA.x, 0.0;
\n
"
);
}
...
...
@@ -2276,7 +2276,7 @@ static void pshader_hw_texm3x2depth(const struct wined3d_shader_instruction *ins
*/
shader_addline
(
buffer
,
"RCP %s.y, %s.y;
\n
"
,
dst_name
,
dst_name
);
shader_addline
(
buffer
,
"MUL %s.x, %s.x, %s.y;
\n
"
,
dst_name
,
dst_name
,
dst_name
);
shader_addline
(
buffer
,
"MIN %s.x, %s.x,
one
.x;
\n
"
,
dst_name
,
dst_name
);
shader_addline
(
buffer
,
"MIN %s.x, %s.x,
ps_helper_const
.x;
\n
"
,
dst_name
,
dst_name
);
shader_addline
(
buffer
,
"MAX result.depth, %s.x, 0.0;
\n
"
,
dst_name
);
}
...
...
@@ -3485,7 +3485,7 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct
if
(
dcl_td
)
shader_addline
(
buffer
,
"TEMP TD;
\n
"
);
/* Used for sRGB writing */
shader_addline
(
buffer
,
"PARAM coefdiv = { 0.5, 0.25, 0.125, 0.0625 };
\n
"
);
shader_addline
(
buffer
,
"PARAM coefmul = { 2, 4, 8, 16 };
\n
"
);
shader_addline
(
buffer
,
"PARAM
one = { 1.0, 1.0, 1.0, 1
.0 };
\n
"
);
shader_addline
(
buffer
,
"PARAM
ps_helper_const = { 1.0, 0.0, 0.0, 0
.0 };
\n
"
);
if
(
reg_maps
->
shader_version
.
major
<
2
)
{
...
...
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