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
b90b61aa
Commit
b90b61aa
authored
Oct 02, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Oct 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Initialize unwritten texcoord varyings in the VS.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
parent
47bf6296
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
9 deletions
+22
-9
glsl_shader.c
dlls/wined3d/glsl_shader.c
+22
-9
No files found.
dlls/wined3d/glsl_shader.c
View file @
b90b61aa
...
...
@@ -4939,6 +4939,8 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv,
if
(
ps_major
<
3
)
{
DWORD
texcoords_written_mask
[
MAX_TEXTURES
]
=
{
0
};
if
(
!
legacy_context
)
{
declare_out_varying
(
gl_info
,
buffer
,
FALSE
,
"float ffp_varying_fogcoord;
\n
"
);
...
...
@@ -4975,15 +4977,11 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv,
}
else
if
(
shader_match_semantic
(
semantic_name
,
WINED3D_DECL_USAGE_TEXCOORD
))
{
if
(
semantic_idx
<
8
)
if
(
semantic_idx
<
MAX_TEXTURES
)
{
if
(
!
(
gl_info
->
quirks
&
WINED3D_QUIRK_SET_TEXCOORD_W
)
||
ps_major
>
0
)
write_mask
|=
WINED3DSP_WRITEMASK_3
;
shader_addline
(
buffer
,
"gl_TexCoord[%u]%s = vs_out[%u]%s;
\n
"
,
semantic_idx
,
reg_mask
,
output
->
register_idx
,
reg_mask
);
if
(
!
(
write_mask
&
WINED3DSP_WRITEMASK_3
))
shader_addline
(
buffer
,
"gl_TexCoord[%u].w = 1.0;
\n
"
,
semantic_idx
);
texcoords_written_mask
[
semantic_idx
]
=
write_mask
;
}
}
else
if
(
shader_match_semantic
(
semantic_name
,
WINED3D_DECL_USAGE_PSIZE
)
&&
per_vertex_point_size
)
...
...
@@ -4998,7 +4996,22 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv,
output
->
register_idx
,
reg_mask
[
1
]);
}
}
shader_addline
(
buffer
,
"}
\n
"
);
for
(
i
=
0
;
i
<
MAX_TEXTURES
;
++
i
)
{
if
(
ps
&&
!
(
ps
->
reg_maps
.
texcoord
&
(
1u
<<
i
)))
continue
;
if
(
texcoords_written_mask
[
i
]
!=
WINED3DSP_WRITEMASK_ALL
)
{
if
(
gl_info
->
limits
.
glsl_varyings
<
wined3d_max_compat_varyings
(
gl_info
)
&&
!
texcoords_written_mask
[
i
])
continue
;
shader_glsl_write_mask_to_str
(
~
texcoords_written_mask
[
i
]
&
WINED3DSP_WRITEMASK_ALL
,
reg_mask
);
shader_addline
(
buffer
,
"gl_TexCoord[%u]%s = vec4(0.0)%s;
\n
"
,
i
,
reg_mask
,
reg_mask
);
}
}
}
else
{
...
...
@@ -5034,10 +5047,10 @@ static GLuint generate_param_reorder_function(struct shader_glsl_priv *priv,
/* Then, fix the pixel shader input */
handle_ps3_input
(
priv
,
gl_info
,
ps
->
u
.
ps
.
input_reg_map
,
&
ps
->
input_signature
,
&
ps
->
reg_maps
,
&
vs
->
output_signature
,
&
vs
->
reg_maps
);
shader_addline
(
buffer
,
"}
\n
"
);
}
shader_addline
(
buffer
,
"}
\n
"
);
ret
=
GL_EXTCALL
(
glCreateShader
(
GL_VERTEX_SHADER
));
checkGLcall
(
"glCreateShader(GL_VERTEX_SHADER)"
);
shader_glsl_compile
(
gl_info
,
ret
,
buffer
->
buffer
);
...
...
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