From 10057d19f2cba422f2f38faa4e37c1c64f90b27b Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 3 Feb 2023 17:02:47 +0100 Subject: [PATCH] anv: report max register pressure in pipeline properties Signed-off-by: Lionel Landwerlin Reviewed-by: Ivan Briano Part-of: --- src/intel/vulkan/anv_pipeline.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 898495f..2cd7540 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -3393,6 +3393,14 @@ VkResult anv_GetPipelineExecutableStatisticsKHR( stat->value.u64 = prog_data->total_scratch; } + vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) { + WRITE_STR(stat->name, "Max live registers"); + WRITE_STR(stat->description, + "Maximum number of registers used across the entire shader."); + stat->format = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR; + stat->value.u64 = exe->stats.max_live_registers; + } + if (gl_shader_stage_uses_workgroup(exe->stage)) { vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) { WRITE_STR(stat->name, "Workgroup Memory Size"); -- 2.7.4