diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index ff0fd2b5134..c239a473f12 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8972,9 +8972,12 @@ static void glsl_vertex_pipe_vdecl(struct wined3d_context *context, /* If the vertex declaration contains a transformed position attribute, * the draw uses the fixed function vertex pipeline regardless of any * vertex shader set by the application. */ - if (transformed != wasrhw) + if (transformed != wasrhw + || context->stream_info.swizzle_map != context->last_swizzle_map) context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_VERTEX; + context->last_swizzle_map = context->stream_info.swizzle_map; + if (!use_vs(state)) { if (context->last_was_vshader) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 98e78daf464..30ea1c7dd51 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -4451,6 +4451,11 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine context->last_was_rhw = transformed; + if (context->stream_info.swizzle_map != context->last_swizzle_map) + context->shader_update_mask |= 1u << WINED3D_SHADER_TYPE_VERTEX; + + context->last_swizzle_map = context->stream_info.swizzle_map; + /* Don't have to apply the matrices when vertex shaders are used. When * vshaders are turned off this function will be called again anyway to * make sure they're properly set. */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index b4009940ff2..3c6c869083c 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1462,6 +1462,7 @@ struct wined3d_context DWORD hdc_has_format : 1; /* only meaningful if hdc_is_private */ DWORD update_shader_resource_bindings : 1; DWORD padding : 14; + DWORD last_swizzle_map; /* MAX_ATTRIBS, 16 */ DWORD shader_update_mask; DWORD constant_update_mask; DWORD numbered_array_mask;