radv: add the perf counters BO to the preambles BO list

If the submission isn't chained for any reasons, we might end by
submitting the performance counter preambles without a command
buffer that added this BO to its list.

Found by inspection.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22627>
(cherry picked from commit 16d0b868c6)
This commit is contained in:
Samuel Pitoiset 2023-04-21 15:44:56 +02:00 committed by Eric Engestrom
parent cc73ff80af
commit b339c26987
2 changed files with 3 additions and 1 deletions

View file

@ -310,7 +310,7 @@
"description": "radv: add the perf counters BO to the preambles BO list",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -1482,6 +1482,8 @@ radv_create_perf_counter_lock_cs(struct radv_device *device, unsigned pass, bool
ASSERTED unsigned cdw = radeon_check_space(device->ws, cs, 21);
radv_cs_add_buffer(device->ws, cs, device->perf_counter_bo);
if (!unlock) {
uint64_t mutex_va = radv_buffer_get_va(device->perf_counter_bo) + PERF_CTR_BO_LOCK_OFFSET;
radeon_emit(cs, PKT3(PKT3_ATOMIC_MEM, 7, 0));