mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-21 06:30:36 +01:00
radv: fix emitting SQTT userdata when CAM is needed
The third parameter of PKT3 is the predicate bit and this was wrong. PAL sets the RESET_FILTER_CAM bit when emitting SQTT userdata. Cc: mesa-stable Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25158>
This commit is contained in:
parent
23f9e89fce
commit
6caae898dd
2 changed files with 8 additions and 3 deletions
|
|
@ -130,12 +130,15 @@ radeon_set_uconfig_reg_seq(struct radeon_cmdbuf *cs, unsigned reg, unsigned num)
|
|||
}
|
||||
|
||||
static inline void
|
||||
radeon_set_uconfig_reg_seq_perfctr(struct radeon_cmdbuf *cs, unsigned reg, unsigned num)
|
||||
radeon_set_uconfig_reg_seq_perfctr(enum amd_gfx_level gfx_level, enum radv_queue_family qf, struct radeon_cmdbuf *cs,
|
||||
unsigned reg, unsigned num)
|
||||
{
|
||||
const bool filter_cam_workaround = gfx_level >= GFX10 && qf == RADV_QUEUE_GENERAL;
|
||||
|
||||
assert(reg >= CIK_UCONFIG_REG_OFFSET && reg < CIK_UCONFIG_REG_END);
|
||||
assert(cs->cdw + 2 + num <= cs->reserved_dw);
|
||||
assert(num);
|
||||
radeon_emit(cs, PKT3(PKT3_SET_UCONFIG_REG, num, 1));
|
||||
radeon_emit(cs, PKT3(PKT3_SET_UCONFIG_REG, num, 0) | PKT3_RESET_FILTER_CAM_S(filter_cam_workaround));
|
||||
radeon_emit(cs, (reg - CIK_UCONFIG_REG_OFFSET) >> 2);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -397,6 +397,8 @@ radv_emit_sqtt_stop(const struct radv_device *device, struct radeon_cmdbuf *cs,
|
|||
void
|
||||
radv_emit_sqtt_userdata(const struct radv_cmd_buffer *cmd_buffer, const void *data, uint32_t num_dwords)
|
||||
{
|
||||
const enum amd_gfx_level gfx_level = cmd_buffer->device->physical_device->rad_info.gfx_level;
|
||||
const enum radv_queue_family qf = cmd_buffer->qf;
|
||||
struct radv_device *device = cmd_buffer->device;
|
||||
struct radeon_cmdbuf *cs = cmd_buffer->cs;
|
||||
const uint32_t *dwords = (uint32_t *)data;
|
||||
|
|
@ -413,7 +415,7 @@ radv_emit_sqtt_userdata(const struct radv_cmd_buffer *cmd_buffer, const void *da
|
|||
/* Without the perfctr bit the CP might not always pass the
|
||||
* write on correctly. */
|
||||
if (device->physical_device->rad_info.gfx_level >= GFX10)
|
||||
radeon_set_uconfig_reg_seq_perfctr(cs, R_030D08_SQ_THREAD_TRACE_USERDATA_2, count);
|
||||
radeon_set_uconfig_reg_seq_perfctr(gfx_level, qf, cs, R_030D08_SQ_THREAD_TRACE_USERDATA_2, count);
|
||||
else
|
||||
radeon_set_uconfig_reg_seq(cs, R_030D08_SQ_THREAD_TRACE_USERDATA_2, count);
|
||||
radeon_emit_array(cs, dwords, count);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue