Commit d2d8d8f1 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Regenerate FFP replacement VS on changes to the normal attribute in the…

wined3d: Regenerate FFP replacement VS on changes to the normal attribute in the vertex declaration. Signed-off-by: 's avatarMatteo Bruni <mbruni@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 08be561f
......@@ -8068,6 +8068,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context,
const struct wined3d_state *state, DWORD state_id)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
BOOL normal = !!(context->stream_info.use_map & (1u << WINED3D_FFP_NORMAL));
BOOL transformed = context->stream_info.position_transformed;
BOOL wasrhw = context->last_was_rhw;
unsigned int i;
......@@ -8093,7 +8094,8 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context,
/* Because of settings->texcoords, we have to regenerate the vertex
* shader on a vdecl change if there aren't enough varyings to just
* always output all the texture coordinates. */
if (gl_info->limits.glsl_varyings < wined3d_max_compat_varyings(gl_info))
if (gl_info->limits.glsl_varyings < wined3d_max_compat_varyings(gl_info)
|| normal != context->last_was_normal)
context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_VERTEX;
if (use_ps(state)
......@@ -8112,6 +8114,7 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context,
}
context->last_was_vshader = use_vs(state);
context->last_was_normal = normal;
}
static void glsl_vertex_pipe_vs(struct wined3d_context *context,
......
......@@ -1175,6 +1175,7 @@ struct wined3d_context
DWORD last_was_rhw : 1; /* true iff last draw_primitive was in xyzrhw mode */
DWORD last_was_pshader : 1;
DWORD last_was_vshader : 1;
DWORD last_was_normal : 1;
DWORD namedArraysLoaded : 1;
DWORD numberedArraysLoaded : 1;
DWORD last_was_blit : 1;
......@@ -1185,17 +1186,17 @@ struct wined3d_context
DWORD current : 1;
DWORD destroyed : 1;
DWORD valid : 1;
DWORD use_immediate_mode_draw : 1;
DWORD texShaderBumpMap : 8; /* MAX_TEXTURES, 8 */
DWORD lastWasPow2Texture : 8; /* MAX_TEXTURES, 8 */
DWORD fixed_function_usage_map : 8; /* MAX_TEXTURES, 8 */
DWORD lowest_disabled_stage : 4; /* Max MAX_TEXTURES, 8 */
DWORD use_immediate_mode_draw : 1;
DWORD rebind_fbo : 1;
DWORD needs_set : 1;
DWORD hdc_is_private : 1;
DWORD hdc_has_format : 1; /* only meaningful if hdc_is_private */
DWORD update_shader_resource_bindings : 1;
DWORD padding : 15;
DWORD padding : 14;
DWORD shader_update_mask;
DWORD constant_update_mask;
DWORD numbered_array_mask;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment