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
7f6ae94c
Commit
7f6ae94c
authored
Oct 07, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Oct 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Don't write to result.color in arb_add_sRGB_correction.
add_sRGB_correction and the generate_pshader function generate the same MOV. There's no need to do it in two places.
parent
fcd0bc8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+4
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
7f6ae94c
...
...
@@ -3137,7 +3137,6 @@ static void arbfp_add_sRGB_correction(struct wined3d_shader_buffer *buffer, cons
* 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 */
}
...
...
@@ -3513,7 +3512,9 @@ static GLuint shader_arb_generate_pshader(IWineD3DPixelShaderImpl *This, struct
if
(
args
->
super
.
srgb_correction
)
{
arbfp_add_sRGB_correction
(
buffer
,
fragcolor
,
srgbtmp
[
0
],
srgbtmp
[
1
],
srgbtmp
[
2
],
srgbtmp
[
3
],
priv_ctx
.
target_version
>=
NV2
);
}
else
if
(
reg_maps
->
shader_version
.
major
<
2
)
{
}
if
(
strcmp
(
fragcolor
,
"result.color"
))
{
shader_addline
(
buffer
,
"MOV result.color, %s;
\n
"
,
fragcolor
);
}
shader_addline
(
buffer
,
"END
\n
"
);
...
...
@@ -5776,6 +5777,7 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, IWi
if
(
settings
->
sRGB_write
)
{
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"
,
FALSE
);
shader_addline
(
&
buffer
,
"MOV result.color, ret;
\n
"
);
}
else
{
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