radv: reset dirty flags after flushing all states
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 18 Oct 2017 12:09:27 +0000 (14:09 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 18 Oct 2017 19:21:48 +0000 (21:21 +0200)
Move it to radv_cmd_buffer_flush_state() because if
rasterizerDiscardEnable is true, the flags are not cleared.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_cmd_buffer.c

index f2e8c0ca5acfb1464e4b6ebc8b1d29af89cc258a..147235006faf40309b6a427f53f9e8601f1c39cc 100644 (file)
@@ -1477,8 +1477,6 @@ radv_cmd_buffer_flush_dynamic_state(struct radv_cmd_buffer *cmd_buffer)
        if (cmd_buffer->state.dirty & (RADV_CMD_DIRTY_PIPELINE |
                                       RADV_CMD_DIRTY_DYNAMIC_DEPTH_BIAS))
                radv_emit_depth_biais(cmd_buffer);
-
-       cmd_buffer->state.dirty = 0;
 }
 
 static void
@@ -1789,6 +1787,8 @@ radv_cmd_buffer_flush_state(struct radv_cmd_buffer *cmd_buffer,
        assert(cmd_buffer->cs->cdw <= cdw_max);
 
        si_emit_cache_flush(cmd_buffer);
+
+       cmd_buffer->state.dirty = 0;
 }
 
 static void radv_stage_flush(struct radv_cmd_buffer *cmd_buffer,