From 107fa122cce9209c161fa0c80f4e6c325264aba7 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 1 Jul 2021 16:56:34 +0200 Subject: [PATCH] wined3d: Only set valid transform states in wined3d_device_context_set_state(). Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/wined3d/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 4aaaee75c93..701041962e5 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1750,7 +1750,8 @@ void CDECL wined3d_device_context_set_state(struct wined3d_device_context *conte for (i = 0; i < WINED3D_HIGHEST_TRANSFORM_STATE + 1; ++i) { - wined3d_device_context_emit_set_transform(context, i, state->transforms + i); + if (context->device->state_table[STATE_TRANSFORM(i)].representative) + wined3d_device_context_emit_set_transform(context, i, state->transforms + i); } for (i = 0; i < WINED3D_MAX_CLIP_DISTANCES; ++i)