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
47bf6296
Commit
47bf6296
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 FFP replacement vertex shader.
Only when the GPU supports enough varyings. Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
parent
c0b3f3f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+2
-0
utils.c
dlls/wined3d/utils.c
+7
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/glsl_shader.c
View file @
47bf6296
...
...
@@ -5802,6 +5802,8 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct wined3d_string_buffe
if
(
settings
->
texcoords
&
(
1u
<<
i
))
shader_addline
(
buffer
,
"gl_TexCoord[%u] = ffp_texture_matrix[%u] * ffp_attrib_texcoord%u;
\n
"
,
i
,
i
,
i
);
else
if
(
gl_info
->
limits
.
glsl_varyings
>=
wined3d_max_compat_varyings
(
gl_info
))
shader_addline
(
buffer
,
"gl_TexCoord[%u] = vec4(0.0);
\n
"
,
i
);
break
;
case
WINED3DTSS_TCI_CAMERASPACENORMAL
:
...
...
dlls/wined3d/utils.c
View file @
47bf6296
...
...
@@ -4343,6 +4343,13 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) {
return
size
;
}
unsigned
int
wined3d_max_compat_varyings
(
const
struct
wined3d_gl_info
*
gl_info
)
{
/* On core profile we have to also count diffuse and specular colors and the
* fog coordinate. */
return
gl_info
->
supported
[
WINED3D_GL_LEGACY_CONTEXT
]
?
MAX_TEXTURES
*
4
:
(
MAX_TEXTURES
+
2
)
*
4
+
1
;
}
void
gen_ffp_frag_op
(
const
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
struct
ffp_frag_settings
*
settings
,
BOOL
ignore_textype
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
47bf6296
...
...
@@ -1877,6 +1877,7 @@ extern const struct wine_rb_functions wined3d_ffp_frag_program_rb_functions DECL
extern
const
struct
wine_rb_functions
wined3d_ffp_vertex_program_rb_functions
DECLSPEC_HIDDEN
;
extern
const
struct
wined3d_parent_ops
wined3d_null_parent_ops
DECLSPEC_HIDDEN
;
unsigned
int
wined3d_max_compat_varyings
(
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
void
gen_ffp_frag_op
(
const
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
struct
ffp_frag_settings
*
settings
,
BOOL
ignore_textype
)
DECLSPEC_HIDDEN
;
const
struct
ffp_frag_desc
*
find_ffp_frag_shader
(
const
struct
wine_rb_tree
*
fragment_shaders
,
...
...
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