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
5a07bacd
Commit
5a07bacd
authored
May 26, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Write result.color in one mov.
Otherwise the Nvidia assembler needs one temp reg.
parent
050735be
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+8
-4
No files found.
dlls/wined3d/arb_program_shader.c
View file @
5a07bacd
...
@@ -2033,9 +2033,15 @@ static void arbfp_add_sRGB_correction(SHADER_BUFFER *buffer, const char *fragcol
...
@@ -2033,9 +2033,15 @@ static void arbfp_add_sRGB_correction(SHADER_BUFFER *buffer, const char *fragcol
shader_addline
(
buffer
,
"SLT %s, srgb_consts1.y, %s;
\n
"
,
tmp3
,
fragcolor
);
shader_addline
(
buffer
,
"SLT %s, srgb_consts1.y, %s;
\n
"
,
tmp3
,
fragcolor
);
shader_addline
(
buffer
,
"SGE %s, srgb_consts1.y, %s;
\n
"
,
tmp4
,
fragcolor
);
shader_addline
(
buffer
,
"SGE %s, srgb_consts1.y, %s;
\n
"
,
tmp4
,
fragcolor
);
/* Store the components > 0.0031308 in the destination */
/* Store the components > 0.0031308 in the destination */
shader_addline
(
buffer
,
"MUL %s, %s, %s;
\n
"
,
fragcolor
,
tmp1
,
tmp3
);
shader_addline
(
buffer
,
"MUL %s
.xyz
, %s, %s;
\n
"
,
fragcolor
,
tmp1
,
tmp3
);
/* Add the components that are < 0.0031308 */
/* Add the components that are < 0.0031308 */
shader_addline
(
buffer
,
"MAD result.color.xyz, %s, %s, %s;
\n
"
,
tmp2
,
tmp4
,
fragcolor
);
shader_addline
(
buffer
,
"MAD %s.xyz, %s, %s, %s;
\n
"
,
fragcolor
,
tmp2
,
tmp4
,
fragcolor
);
/* Move everything into result.color at once. Nvidia hardware cannot handle partial
* result.color writes(.rgb first, then .a), or handle overwriting already written
* components. The assembler uses a temporary register in this case, which is usually
* not allocated from one of our registers that were used earlier.
*/
shader_addline
(
buffer
,
"MOV result.color, %s;
\n
"
,
fragcolor
);
/* [0.0;1.0] clamping. Not needed, this is done implicitly */
/* [0.0;1.0] clamping. Not needed, this is done implicitly */
}
}
...
@@ -2164,7 +2170,6 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
...
@@ -2164,7 +2170,6 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This,
if
(
args
->
super
.
srgb_correction
)
{
if
(
args
->
super
.
srgb_correction
)
{
arbfp_add_sRGB_correction
(
buffer
,
fragcolor
,
srgbtmp
[
0
],
srgbtmp
[
1
],
srgbtmp
[
2
],
srgbtmp
[
3
]);
arbfp_add_sRGB_correction
(
buffer
,
fragcolor
,
srgbtmp
[
0
],
srgbtmp
[
1
],
srgbtmp
[
2
],
srgbtmp
[
3
]);
shader_addline
(
buffer
,
"MOV result.color.a, %s;
\n
"
,
fragcolor
);
}
else
if
(
reg_maps
->
shader_version
.
major
<
2
)
{
}
else
if
(
reg_maps
->
shader_version
.
major
<
2
)
{
shader_addline
(
buffer
,
"MOV result.color, %s;
\n
"
,
fragcolor
);
shader_addline
(
buffer
,
"MOV result.color, %s;
\n
"
,
fragcolor
);
}
}
...
@@ -3623,7 +3628,6 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, IWi
...
@@ -3623,7 +3628,6 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, IWi
if
(
settings
->
sRGB_write
)
{
if
(
settings
->
sRGB_write
)
{
shader_addline
(
&
buffer
,
"MAD ret, fragment.color.secondary, specular_enable, %s;
\n
"
,
final_combiner_src
);
shader_addline
(
&
buffer
,
"MAD ret, fragment.color.secondary, specular_enable, %s;
\n
"
,
final_combiner_src
);
arbfp_add_sRGB_correction
(
&
buffer
,
"ret"
,
"arg0"
,
"arg1"
,
"arg2"
,
"tempreg"
);
arbfp_add_sRGB_correction
(
&
buffer
,
"ret"
,
"arg0"
,
"arg1"
,
"arg2"
,
"tempreg"
);
shader_addline
(
&
buffer
,
"MOV result.color.w, ret.w;
\n
"
);
}
else
{
}
else
{
shader_addline
(
&
buffer
,
"MAD result.color, fragment.color.secondary, specular_enable, %s;
\n
"
,
final_combiner_src
);
shader_addline
(
&
buffer
,
"MAD result.color, fragment.color.secondary, specular_enable, %s;
\n
"
,
final_combiner_src
);
}
}
...
...
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