From 6f9be9a2a055ecbf7850eccae2cb2c819469e241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Briano?= Date: Wed, 22 Nov 2023 16:44:42 -0800 Subject: [PATCH] hasvk: ensure we reapply always pipeline dynamic state in runtime state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Backport of 24631d308c035f22697bcda33f6306fb10cc8c74 Reviewed-by: Tapani Pälli Part-of: --- src/intel/vulkan_hasvk/anv_cmd_buffer.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan_hasvk/anv_cmd_buffer.c b/src/intel/vulkan_hasvk/anv_cmd_buffer.c index d78493f6350..c49ebceb4f1 100644 --- a/src/intel/vulkan_hasvk/anv_cmd_buffer.c +++ b/src/intel/vulkan_hasvk/anv_cmd_buffer.c @@ -298,6 +298,11 @@ void anv_CmdBindPipeline( case VK_PIPELINE_BIND_POINT_GRAPHICS: { struct anv_graphics_pipeline *gfx_pipeline = anv_pipeline_to_graphics(pipeline); + + /* Apply the non dynamic state from the pipeline */ + vk_cmd_set_dynamic_graphics_state(&cmd_buffer->vk, + &gfx_pipeline->dynamic_state); + if (cmd_buffer->state.gfx.pipeline == gfx_pipeline) return; @@ -309,10 +314,6 @@ void anv_CmdBindPipeline( set_dirty_for_bind_map(cmd_buffer, stage, &gfx_pipeline->shaders[stage]->bind_map); } - - /* Apply the non dynamic state from the pipeline */ - vk_cmd_set_dynamic_graphics_state(&cmd_buffer->vk, - &gfx_pipeline->dynamic_state); break; }