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

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Thu Jan 11 13:56:09 2024 +0100

radv: move radv_pipeline_key::mesh_fast_launch_2 to the per-device cache key

This is a global thing.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27007>

---

 src/amd/vulkan/radv_device.c   | 1 +
 src/amd/vulkan/radv_pipeline.c | 5 -----
 src/amd/vulkan/radv_private.h  | 1 +
 src/amd/vulkan/radv_shader.h   | 1 -
 4 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 261cf4f6856..cbba5f54d4c 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -723,6 +723,7 @@ radv_device_init_cache_key(struct radv_device *device)
    key->image_2d_view_of_3d = device->image_2d_view_of_3d && 
device->physical_device->rad_info.gfx_level == GFX9;
    key->invariant_geom = !!(device->instance->debug_flags & 
RADV_DEBUG_INVARIANT_GEOM);
    key->lower_discard_to_demote = !!(device->instance->debug_flags & 
RADV_DEBUG_DISCARD_TO_DEMOTE);
+   key->mesh_fast_launch_2 = device->mesh_fast_launch_2;
    key->mesh_shader_queries = device->mesh_shader_queries;
    key->no_fmask = !!(device->instance->debug_flags & RADV_DEBUG_NO_FMASK);
    key->no_rt = !!(device->instance->debug_flags & RADV_DEBUG_NO_RT);
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index ee080aa2322..e14b7a75d06 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -207,11 +207,6 @@ radv_generate_pipeline_key(const struct radv_device 
*device, const VkPipelineSha
          key.vertex_robustness1 = 1u;
    }
 
-   for (uint32_t i = 0; i < num_stages; i++) {
-      if (stages[i].stage == VK_SHADER_STAGE_MESH_BIT_EXT && 
device->mesh_fast_launch_2)
-         key.mesh_fast_launch_2 = 1u;
-   }
-
    key.keep_statistic_info = radv_pipeline_capture_shader_stats(device, flags);
 
    return key;
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 814c1ec1867..3c70729ff21 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -890,6 +890,7 @@ struct radv_device_cache_key {
    uint32_t image_2d_view_of_3d : 1;
    uint32_t invariant_geom : 1;
    uint32_t lower_discard_to_demote : 1;
+   uint32_t mesh_fast_launch_2 : 1;
    uint32_t mesh_shader_queries : 1;
    uint32_t no_fmask : 1;
    uint32_t no_rt : 1;
diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h
index c4ceed01d1d..bc74781f3d7 100644
--- a/src/amd/vulkan/radv_shader.h
+++ b/src/amd/vulkan/radv_shader.h
@@ -125,7 +125,6 @@ struct radv_pipeline_key {
    uint32_t unknown_rast_prim : 1;
 
    uint32_t vertex_robustness1 : 1;
-   uint32_t mesh_fast_launch_2 : 1;
 
    uint32_t keep_statistic_info : 1;
 

Reply via email to