anv: report max simd width only once for fragment shaders
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 9 Jun 2023 13:32:17 +0000 (16:32 +0300)
committerMarge Bot <emma+marge@anholt.net>
Tue, 13 Jun 2023 23:26:40 +0000 (23:26 +0000)
Reporting the value multiple times is confusing to shader-db scripts
because it believes multiple shaders are affected.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23559>

src/intel/vulkan/anv_pipeline.c

index 50e05a7..8fe21e4 100644 (file)
@@ -4224,7 +4224,11 @@ VkResult anv_GetPipelineExecutableStatisticsKHR(
       WRITE_STR(stat->description,
                 "Largest SIMD dispatch width.");
       stat->format = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR;
-      stat->value.u64 = exe->stats.max_dispatch_width;
+      /* Report the max dispatch width only on the smallest SIMD variant */
+      if (exe->stage != MESA_SHADER_FRAGMENT || exe->stats.dispatch_width == 8)
+         stat->value.u64 = exe->stats.max_dispatch_width;
+      else
+         stat->value.u64 = 0;
    }
 
    vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {