From eae46f192efa2cbb691b6567b4bd0ebaf39500da Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 19 Oct 2017 12:35:45 +0200 Subject: [PATCH] radv: clear the dirty flags in the corresponding emit helpers This will allow us to fix the VGT_INDEX_TYPE issue properly. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_cmd_buffer.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 5c0f639a955..9500e3ccb97 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -1021,6 +1021,8 @@ radv_emit_graphics_pipeline(struct radv_cmd_buffer *cmd_buffer) radv_save_pipeline(cmd_buffer, pipeline, RING_GFX); cmd_buffer->state.emitted_pipeline = pipeline; + + cmd_buffer->state.dirty &= ~RADV_CMD_DIRTY_PIPELINE; } static void @@ -1440,6 +1442,8 @@ radv_emit_framebuffer_state(struct radv_cmd_buffer *cmd_buffer) radeon_emit(cmd_buffer->cs, PKT3(PKT3_EVENT_WRITE, 0, 0)); radeon_emit(cmd_buffer->cs, EVENT_TYPE(V_028A90_BREAK_BATCH) | EVENT_INDEX(0)); } + + cmd_buffer->state.dirty &= ~RADV_CMD_DIRTY_FRAMEBUFFER; } static void @@ -1461,6 +1465,8 @@ radv_emit_index_buffer(struct radv_cmd_buffer *cmd_buffer) radeon_emit(cs, PKT3(PKT3_INDEX_BUFFER_SIZE, 0, 0)); radeon_emit(cs, cmd_buffer->state.max_index_count); + + cmd_buffer->state.dirty &= ~RADV_CMD_DIRTY_INDEX_BUFFER; } void radv_set_db_count_control(struct radv_cmd_buffer *cmd_buffer) @@ -1519,6 +1525,8 @@ 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 &= ~RADV_CMD_DIRTY_DYNAMIC_ALL; } static void @@ -1829,8 +1837,6 @@ 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, -- 2.30.2