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
97ee9451
Commit
97ee9451
authored
Oct 06, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Oct 07, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Initialize unwritten color varyings.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
parent
09eda02b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
glsl_shader.c
dlls/wined3d/glsl_shader.c
+17
-1
No files found.
dlls/wined3d/glsl_shader.c
View file @
97ee9451
...
...
@@ -4927,6 +4927,7 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv,
if
(
ps_major
<
3
)
{
DWORD
colors_written_mask
[
2
]
=
{
0
};
DWORD
texcoords_written_mask
[
MAX_TEXTURES
]
=
{
0
};
if
(
!
legacy_context
)
...
...
@@ -4949,7 +4950,7 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv,
write_mask
=
output
->
mask
;
shader_glsl_write_mask_to_str
(
write_mask
,
reg_mask
);
if
(
shader_match_semantic
(
semantic_name
,
WINED3D_DECL_USAGE_COLOR
))
if
(
shader_match_semantic
(
semantic_name
,
WINED3D_DECL_USAGE_COLOR
)
&&
semantic_idx
<
2
)
{
if
(
!
semantic_idx
)
shader_addline
(
buffer
,
"gl_FrontColor%s = vs_out[%u]%s;
\n
"
,
...
...
@@ -4957,6 +4958,8 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv,
else
if
(
semantic_idx
==
1
)
shader_addline
(
buffer
,
"gl_FrontSecondaryColor%s = vs_out[%u]%s;
\n
"
,
reg_mask
,
output
->
register_idx
,
reg_mask
);
colors_written_mask
[
semantic_idx
]
=
write_mask
;
}
else
if
(
shader_match_semantic
(
semantic_name
,
WINED3D_DECL_USAGE_POSITION
)
&&
!
semantic_idx
)
{
...
...
@@ -4985,6 +4988,19 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv,
}
}
for
(
i
=
0
;
i
<
2
;
++
i
)
{
if
(
colors_written_mask
[
i
]
!=
WINED3DSP_WRITEMASK_ALL
)
{
shader_glsl_write_mask_to_str
(
~
colors_written_mask
[
i
]
&
WINED3DSP_WRITEMASK_ALL
,
reg_mask
);
if
(
!
i
)
shader_addline
(
buffer
,
"gl_FrontColor%s = vec4(1.0)%s;
\n
"
,
reg_mask
,
reg_mask
);
else
shader_addline
(
buffer
,
"gl_FrontSecondaryColor%s = vec4(0.0)%s;
\n
"
,
reg_mask
,
reg_mask
);
}
}
for
(
i
=
0
;
i
<
MAX_TEXTURES
;
++
i
)
{
if
(
ps
&&
!
(
ps
->
reg_maps
.
texcoord
&
(
1u
<<
i
)))
...
...
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