mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-01 11:10:27 +01:00
anv: always report all pipeline stats regardless of stages
Tools like the scripts in shader-db expect all the fields to be there, as the stats are put into a CSV file. So just report 0 if a stage doesn't support workgroup memory size. 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>
This commit is contained in:
parent
810da51e91
commit
efd4a162d3
1 changed files with 9 additions and 8 deletions
|
|
@ -4239,15 +4239,16 @@ VkResult anv_GetPipelineExecutableStatisticsKHR(
|
|||
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");
|
||||
WRITE_STR(stat->description,
|
||||
"Number of bytes of workgroup shared memory used by this "
|
||||
"shader including any padding.");
|
||||
stat->format = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR;
|
||||
vk_outarray_append_typed(VkPipelineExecutableStatisticKHR, &out, stat) {
|
||||
WRITE_STR(stat->name, "Workgroup Memory Size");
|
||||
WRITE_STR(stat->description,
|
||||
"Number of bytes of workgroup shared memory used by this "
|
||||
"shader including any padding.");
|
||||
stat->format = VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR;
|
||||
if (gl_shader_stage_uses_workgroup(exe->stage))
|
||||
stat->value.u64 = prog_data->total_shared;
|
||||
}
|
||||
else
|
||||
stat->value.u64 = 0;
|
||||
}
|
||||
|
||||
return vk_outarray_status(&out);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue