Mesa (main): ac/spm: setup write broadcasting correctly
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 22 12:19:05 UTC 2022
Module: Mesa
Branch: main
Commit: ca40bad84a535b80476d9b01d792ffdf71970d98
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca40bad84a535b80476d9b01d792ffdf71970d98
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Tue Mar 29 13:43:39 2022 +0200
ac/spm: setup write broadcasting correctly
Based on PAL's PerfExperiment::BuildGrbmGfxIndex method.
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15646>
---
src/amd/common/ac_spm.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/amd/common/ac_spm.c b/src/amd/common/ac_spm.c
index 04a9426fca4..719f6b37d13 100644
--- a/src/amd/common/ac_spm.c
+++ b/src/amd/common/ac_spm.c
@@ -26,6 +26,7 @@
#include "util/bitscan.h"
#include "util/u_memory.h"
+#include "ac_perfcounter.h"
static struct ac_spm_block_select *
ac_spm_get_block_select(struct ac_spm_trace_data *spm_trace,
@@ -55,6 +56,14 @@ ac_spm_get_block_select(struct ac_spm_trace_data *spm_trace,
new_block_sel->b = block;
new_block_sel->num_counters = block->b->b->num_spm_counters;
+ /* Broadcast global block writes to SEs and SAs */
+ if (!(block->b->b->flags & (AC_PC_BLOCK_SE | AC_PC_BLOCK_SHADER)))
+ new_block_sel->grbm_gfx_index = S_030800_SE_BROADCAST_WRITES(1) |
+ S_030800_SH_BROADCAST_WRITES(1);
+ /* Broadcast per SE block writes to SAs */
+ else if (block->b->b->flags & AC_PC_BLOCK_SE)
+ new_block_sel->grbm_gfx_index = S_030800_SH_BROADCAST_WRITES(1);
+
return new_block_sel;
}
More information about the mesa-commit
mailing list