Matteo Bruni : wined3d: Clear dirty flags after calling all the state handlers in context_apply_draw_state().

Alexandre Julliard julliard at winehq.org
Thu Aug 12 16:35:20 CDT 2021


Module: wine
Branch: master
Commit: 451dede7c0242844f1338532dc874bc2e673a076
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=451dede7c0242844f1338532dc874bc2e673a076

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Wed Aug 11 19:18:54 2021 +0200

wined3d: Clear dirty flags after calling all the state handlers in context_apply_draw_state().

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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);




More information about the wine-cvs mailing list