radv: fix output statistic for fragment shaders

This is a per-component bit mask (0xf for each output).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Fixes: 0e0c2574d1 ("radv: Add shader stats for inputs and outputs.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31593>
This commit is contained in:
Rhys Perry
2024-10-04 16:47:37 +01:00
committed by Marge Bot
parent 45d8cd037a
commit 9784165de5
+1 -1
View File
@@ -1062,7 +1062,7 @@ radv_GetPipelineExecutableStatisticsKHR(VkDevice _device, const VkPipelineExecut
break;
case MESA_SHADER_FRAGMENT:
s->value.u64 += shader->info.ps.colors_written + !!shader->info.ps.writes_z +
s->value.u64 += DIV_ROUND_UP(util_bitcount(shader->info.ps.colors_written), 4) + !!shader->info.ps.writes_z +
!!shader->info.ps.writes_stencil + !!shader->info.ps.writes_sample_mask +
!!shader->info.ps.writes_mrt0_alpha;
break;