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

Author: Samuel Pitoiset <[email protected]>
Date:   Tue May 17 14:19:15 2022 +0200

radv: report adjusted LDS size for fragment shaders on GFX11

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Timur Kristóf <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16557>

---

 src/amd/vulkan/radv_pipeline.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 9a99145e3c6..60e18e727cc 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -7418,8 +7418,10 @@ radv_GetPipelineExecutableStatisticsKHR(VkDevice _device,
    struct radv_shader *shader =
       radv_get_shader_from_executable_index(pipeline, 
pExecutableInfo->executableIndex, &stage);
 
-   enum amd_gfx_level gfx_level = device->physical_device->rad_info.gfx_level;
-   unsigned lds_increment = gfx_level >= GFX7 ? 512 : 256;
+   const struct radv_physical_device *pdevice = device->physical_device;
+
+   unsigned lds_increment = pdevice->rad_info.gfx_level >= GFX11 && stage == 
MESA_SHADER_FRAGMENT
+      ? 1024 : pdevice->rad_info.lds_encode_granularity;
    unsigned max_waves = radv_get_max_waves(device, shader, stage);
 
    VkPipelineExecutableStatisticKHR *s = pStatistics;

Reply via email to