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

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Sep 28 12:28:26 2023 +0200

radv: add radv_physical_device::emulate_mesh_shader_queries for GFX10.3

GFX11 supports them natively but not GFX10.3.

Signed-off-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25950>

---

 src/amd/vulkan/radv_physical_device.c | 2 ++
 src/amd/vulkan/radv_private.h         | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/src/amd/vulkan/radv_physical_device.c 
b/src/amd/vulkan/radv_physical_device.c
index aafb37364e3..0fa9875203b 100644
--- a/src/amd/vulkan/radv_physical_device.c
+++ b/src/amd/vulkan/radv_physical_device.c
@@ -1902,6 +1902,8 @@ radv_physical_device_try_create(struct radv_instance 
*instance, drmDevicePtr drm
 
    device->emulate_ngg_gs_query_pipeline_stat = device->use_ngg && 
device->rad_info.gfx_level < GFX11;
 
+   device->emulate_mesh_shader_queries = device->rad_info.gfx_level == GFX10_3;
+
    /* Determine the number of threads per wave for all stages. */
    device->cs_wave_size = 64;
    device->ps_wave_size = 64;
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h
index 1cfb2af5146..20dafcf1b5b 100644
--- a/src/amd/vulkan/radv_private.h
+++ b/src/amd/vulkan/radv_private.h
@@ -311,6 +311,9 @@ struct radv_physical_device {
    /* Whether to emulate the number of primitives generated by GS. */
    bool emulate_ngg_gs_query_pipeline_stat;
 
+   /* Whether to emulate mesh/task shader queries. */
+   bool emulate_mesh_shader_queries;
+
    /* Number of threads per wave. */
    uint8_t ps_wave_size;
    uint8_t cs_wave_size;

Reply via email to