[PATCH 2/5] wined3d: Clear dirty flags after calling all the state handlers in context_apply_draw_state().

Matteo Bruni mbruni at codeweavers.com
Wed Aug 11 12:18:54 CDT 2021


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
 dlls/wined3d/context_gl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index 224c46efb6f..da7c70a8863 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -3944,11 +3944,12 @@ static BOOL context_apply_draw_state(struct wined3d_context *context,
             unsigned int state_id = base + wined3d_bit_scan(&dirty_mask);
 
             state_table[state_id].apply(context, state, state_id);
-            context->dirty_graphics_states[i] &= ~(1u << (state_id - base));
         }
         base += sizeof(dirty_mask) * CHAR_BIT;
     }
 
+    memset(context->dirty_graphics_states, 0, sizeof(context->dirty_graphics_states));
+
     if (context->shader_update_mask & ~(1u << WINED3D_SHADER_TYPE_COMPUTE))
     {
         device->shader_backend->shader_select(device->shader_priv, context, state);
-- 
2.26.3




More information about the wine-devel mailing list