Module: Mesa
Branch: main
Commit: 6f9be9a2a055ecbf7850eccae2cb2c819469e241
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=6f9be9a2a055ecbf7850eccae2cb2c819469e241

Author: Iván Briano <[email protected]>
Date:   Wed Nov 22 16:44:42 2023 -0800

hasvk: ensure we reapply always pipeline dynamic state in runtime state

Backport of 24631d308c035f22697bcda33f6306fb10cc8c74

Reviewed-by: Tapani Pälli <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26341>

---

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

Reply via email to