wined3d: Don't read texcoord attributes unless necessary.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2016-03-31 19:50:59 +02:00 committed by Alexandre Julliard
parent dd5cf16799
commit 6654af1017
1 changed files with 2 additions and 3 deletions

View File

@ -6149,11 +6149,10 @@ static GLuint shader_glsl_generate_ffp_vertex_shader(struct shader_glsl_priv *pr
for (i = 0; i < MAX_TEXTURES; ++i)
{
unsigned int coord_idx = settings->texgen[i] & 0x0000ffff;
if ((settings->texgen[i] & 0xffff0000) == WINED3DTSS_TCI_PASSTHRU)
{
if ((settings->texgen[i] & 0xffff0000) == WINED3DTSS_TCI_PASSTHRU
&& settings->texcoords & (1u << i))
shader_addline(buffer, "vec4 ffp_attrib_texcoord%u = vs_in%u;\n", i, coord_idx + WINED3D_FFP_TEXCOORD0);
}
}
shader_addline(buffer, "ffp_attrib_blendweight[%u] = 1.0;\n", settings->vertexblends);