radv/sqtt: use radeon_check_space before emit_spm_*
This fixes the following error on a rdna2: radeon_set_uconfig_reg_seq: Assertion `cs->cdw + 2 + num <= cs->reserved_dw' failed. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29499>
This commit is contained in:

committed by
Marge Bot

parent
a80a1c9838
commit
a7880f3edb
@@ -858,8 +858,10 @@ radv_begin_sqtt(struct radv_queue *queue)
|
||||
/* Start SQTT. */
|
||||
radv_emit_sqtt_start(device, cs, family);
|
||||
|
||||
if (device->spm.bo)
|
||||
if (device->spm.bo) {
|
||||
radeon_check_space(ws, cs, 8);
|
||||
radv_perfcounter_emit_spm_start(device, cs, family);
|
||||
}
|
||||
|
||||
result = ws->cs_finalize(cs);
|
||||
if (result != VK_SUCCESS) {
|
||||
@@ -911,8 +913,10 @@ radv_end_sqtt(struct radv_queue *queue)
|
||||
/* Make sure to wait-for-idle before stopping SQTT. */
|
||||
radv_emit_wait_for_idle(device, cs, family);
|
||||
|
||||
if (device->spm.bo)
|
||||
if (device->spm.bo) {
|
||||
radeon_check_space(ws, cs, 8);
|
||||
radv_perfcounter_emit_spm_stop(device, cs, family);
|
||||
}
|
||||
|
||||
/* Stop SQTT. */
|
||||
radv_emit_sqtt_stop(device, cs, family);
|
||||
|
Reference in New Issue
Block a user