anv: Add statistic for 'GRF registers' for Xe3+

For Xe3+ the registers are tightly packed to make better use of GRF
space, so add a statistic to keep track of how many registers were used.
For previous versions this is not useful since the code is spreading
the registers among the whole space.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33311>
This commit is contained in:
Caio Oliveira 2025-01-30 14:52:33 -08:00 committed by Marge Bot
parent 07787f3208
commit 96de531b5a

View file

@ -4309,6 +4309,16 @@ VkResult anv_GetPipelineExecutableStatisticsKHR(
stat->value.u64 = prog_data->total_scratch;
}
if (pipeline->device->info->ver >= 30) {
vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "GRF registers");
WRITE_STR(stat->description,
"Number of GRF registers required by the shader.");
stat->format = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR;
stat->value.u64 = prog_data->grf_used;
}
}
vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
WRITE_STR(stat->name, "Max dispatch width");
WRITE_STR(stat->description,