Commit 8d6ea0ea authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Update vertex shader when the swizzle map changes.

parent f5929a9c
......@@ -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)
......
......@@ -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. */
......
......@@ -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;
......
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