ac/perfcounter: define a distribution mode for all perf blocks on GFX10

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39126>
This commit is contained in:
Samuel Pitoiset 2026-01-02 15:43:03 +01:00 committed by Marge Bot
parent 736ddb6ba8
commit 91fdbadacc

View file

@ -24,6 +24,7 @@ static unsigned gfx10_CB_select1[] = {
static struct ac_pc_block_base gfx10_CB = {
.gpu_block = CB,
.name = "CB",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 4,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_INSTANCE_GROUPS,
@ -51,6 +52,7 @@ static unsigned gfx10_CPC_counters[] = {
static struct ac_pc_block_base gfx10_CPC = {
.gpu_block = CPC,
.name = "CPC",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 2,
.select0 = gfx10_CPC_select0,
@ -77,6 +79,7 @@ static unsigned gfx10_CPF_counters[] = {
static struct ac_pc_block_base gfx10_CPF = {
.gpu_block = CPF,
.name = "CPF",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 2,
.select0 = gfx10_CPF_select0,
@ -103,6 +106,7 @@ static unsigned gfx10_CPG_counters[] = {
static struct ac_pc_block_base gfx10_CPG = {
.gpu_block = CPG,
.name = "CPG",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 2,
.select0 = gfx10_CPG_select0,
@ -127,6 +131,7 @@ static unsigned gfx10_GDS_select1[] = {
static struct ac_pc_block_base gfx10_GDS = {
.gpu_block = GDS,
.name = "GDS",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 4,
.select0 = gfx10_GDS_select0,
@ -150,6 +155,7 @@ static unsigned gfx10_GRBM_counters[] = {
static struct ac_pc_block_base gfx10_GRBM = {
.gpu_block = GRBM,
.name = "GRBM",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 2,
.select0 = gfx10_GRBM_select0,
@ -166,6 +172,7 @@ static unsigned gfx10_GRBMSE_select0[] = {
static struct ac_pc_block_base gfx10_GRBMSE = {
.gpu_block = GRBMSE,
.name = "GRBMSE",
.distribution = AC_PC_PER_SHADER_ENGINE,
.num_counters = 4,
.select0 = gfx10_GRBMSE_select0,
@ -189,6 +196,7 @@ static unsigned gfx10_PA_SC_select1[] = {
static struct ac_pc_block_base gfx10_PA_SC = {
.gpu_block = PA_SC,
.name = "PA_SC",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 8,
.flags = AC_PC_BLOCK_SE,
@ -219,6 +227,7 @@ static unsigned gfx10_SPI_select1[] = {
static struct ac_pc_block_base gfx10_SPI = {
.gpu_block = SPI,
.name = "SPI",
.distribution = AC_PC_PER_SHADER_ENGINE,
.num_counters = 6,
.flags = AC_PC_BLOCK_SE,
@ -245,6 +254,7 @@ static unsigned gfx10_SX_select1[] = {
static struct ac_pc_block_base gfx10_SX = {
.gpu_block = SX,
.name = "SX",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 4,
.flags = AC_PC_BLOCK_SE,
@ -268,6 +278,7 @@ static unsigned gfx10_TA_select1[] = {
static struct ac_pc_block_base gfx10_TA = {
.gpu_block = TA,
.name = "TA",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 2,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_INSTANCE_GROUPS | AC_PC_BLOCK_SHADER_WINDOWED,
@ -291,6 +302,7 @@ static unsigned gfx10_TD_select1[] = {
static struct ac_pc_block_base gfx10_TD = {
.gpu_block = TD,
.name = "TD",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 2,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_INSTANCE_GROUPS | AC_PC_BLOCK_SHADER_WINDOWED,
@ -316,6 +328,7 @@ static unsigned gfx10_CHA_select1[] = {
static struct ac_pc_block_base gfx10_CHA = {
.gpu_block = CHA,
.name = "CHA",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 4,
.select0 = gfx10_CHA_select0,
@ -340,6 +353,7 @@ static unsigned gfx10_CHCG_select1[] = {
static struct ac_pc_block_base gfx10_CHCG = {
.gpu_block = CHCG,
.name = "CHCG",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 4,
.select0 = gfx10_CHCG_select0,
@ -364,6 +378,7 @@ static unsigned gfx10_CHC_select1[] = {
static struct ac_pc_block_base gfx10_CHC = {
.gpu_block = CHC,
.name = "CHC",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 4,
.select0 = gfx10_CHC_select0,
@ -389,6 +404,7 @@ static unsigned gfx10_DB_select1[] = {
static struct ac_pc_block_base gfx10_DB = {
.gpu_block = DB,
.name = "DB",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 4,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_INSTANCE_GROUPS,
@ -412,6 +428,7 @@ static unsigned gfx10_GCR_select1[] = {
static struct ac_pc_block_base gfx10_GCR = {
.gpu_block = GCR,
.name = "GCR",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 2,
.select0 = gfx10_GCR_select0,
@ -447,6 +464,7 @@ static unsigned gfx10_GE_select1[] = {
static struct ac_pc_block_base gfx10_GE = {
.gpu_block = GE,
.name = "GE",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 12,
.select0 = gfx10_GE_select0,
@ -471,6 +489,7 @@ static unsigned gfx10_GL1A_select1[] = {
static struct ac_pc_block_base gfx10_GL1A = {
.gpu_block = GL1A,
.name = "GL1A",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 4,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_SHADER_WINDOWED,
@ -496,6 +515,7 @@ static unsigned gfx10_GL1C_select1[] = {
static struct ac_pc_block_base gfx10_GL1C = {
.gpu_block = GL1C,
.name = "GL1C",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 4,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_SHADER_WINDOWED,
@ -522,6 +542,7 @@ static unsigned gfx10_GL2A_select1[] = {
static struct ac_pc_block_base gfx10_GL2A = {
.gpu_block = GL2A,
.name = "GL2A",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 4,
.select0 = gfx10_GL2A_select0,
@ -547,6 +568,7 @@ static unsigned gfx10_GL2C_select1[] = {
static struct ac_pc_block_base gfx10_GL2C = {
.gpu_block = GL2C,
.name = "GL2C",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 4,
.select0 = gfx10_GL2C_select0,
@ -578,6 +600,7 @@ static unsigned gfx10_PA_PH_select1[] = {
static struct ac_pc_block_base gfx10_PA_PH = {
.gpu_block = PA_PH,
.name = "PA_PH",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 8,
.flags = AC_PC_BLOCK_SE,
@ -606,6 +629,7 @@ static unsigned gfx10_PA_SU_select1[] = {
static struct ac_pc_block_base gfx10_PA_SU = {
.gpu_block = PA_SU,
.name = "PA_SU",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 4,
.flags = AC_PC_BLOCK_SE,
@ -626,6 +650,7 @@ static unsigned gfx10_RLC_select0[] = {
static struct ac_pc_block_base gfx10_RLC = {
.gpu_block = RLC,
.name = "RLC",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 2,
.select0 = gfx10_RLC_select0,
@ -646,6 +671,7 @@ static unsigned gfx10_RMI_select1[] = {
static struct ac_pc_block_base gfx10_RMI = {
.gpu_block = RMI,
.name = "RMI",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 4,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_INSTANCE_GROUPS,
@ -680,6 +706,7 @@ static unsigned gfx10_SQ_select0[] = {
static struct ac_pc_block_base gfx10_SQ = {
.gpu_block = SQ,
.name = "SQ",
.distribution = AC_PC_PER_SHADER_ENGINE,
.num_counters = 16,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_SHADER,
@ -705,6 +732,7 @@ static unsigned gfx10_TCP_select1[] = {
static struct ac_pc_block_base gfx10_TCP = {
.gpu_block = TCP,
.name = "TCP",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 4,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_INSTANCE_GROUPS | AC_PC_BLOCK_SHADER_WINDOWED,
@ -725,6 +753,7 @@ static unsigned gfx10_UTCL1_select0[] = {
static struct ac_pc_block_base gfx10_UTCL1 = {
.gpu_block = UTCL1,
.name = "UTCL1",
.distribution = AC_PC_PER_SHADER_ARRAY,
.num_counters = 2,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_SHADER_WINDOWED,
@ -743,6 +772,7 @@ static unsigned gfx10_GCEA_select1[] = {
static struct ac_pc_block_base gfx10_GCEA = {
.gpu_block = GCEA,
.name = "GCEA",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 1,
.select0 = gfx10_GCEA_select0,