wined3d: Update vertex shader when the swizzle map changes.
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:
parent
f5929a9cf9
commit
8d6ea0ea02
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue