From b339c26987ca15b4887601c40a6d4ed08dc6f332 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 21 Apr 2023 15:44:56 +0200 Subject: [PATCH] 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 Part-of: (cherry picked from commit 16d0b868c6521415456f0d6f2b8828df5c454a11) --- .pick_status.json | 2 +- src/amd/vulkan/radv_queue.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 2202de38176..51a4b92ed23 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 }, diff --git a/src/amd/vulkan/radv_queue.c b/src/amd/vulkan/radv_queue.c index 0823e545a19..2d3a867de6b 100644 --- a/src/amd/vulkan/radv_queue.c +++ b/src/amd/vulkan/radv_queue.c @@ -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));