mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 23:40:33 +01:00
ac/pm4: determine spi_shader_pgm_lo_reg when PKT3_SET_SH_REG_PAIRS is used
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35582>
This commit is contained in:
parent
5da4941101
commit
ca0ed07588
1 changed files with 16 additions and 0 deletions
|
|
@ -204,6 +204,22 @@ ac_pm4_finalize(struct ac_pm4_state *state)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state->debug_sqtt && state->last_opcode == PKT3_SET_SH_REG_PAIRS) {
|
||||
/* Set reg_va_low_idx to where the shader address is stored in the pm4 state. */
|
||||
unsigned reg_count = (PKT_COUNT_G(state->pm4[state->last_pm4]) + 1) / 2;
|
||||
|
||||
for (unsigned i = 0; i < reg_count; i++) {
|
||||
unsigned reg_base_offset = SI_SH_REG_OFFSET + state->pm4[state->last_pm4 + 1 + 2 * i] * 4;
|
||||
if (strstr(ac_get_register_name(state->info->gfx_level,
|
||||
state->info->family, reg_base_offset),
|
||||
"SPI_SHADER_PGM_LO_")) {
|
||||
state->spi_shader_pgm_lo_reg = reg_base_offset;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue