From 807b8b7249e28b16d1877f80f30d09c082290ce6 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 1 Aug 2024 14:29:03 +0300 Subject: [PATCH] anv: fix check on pipeline mode to track buffer writes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want to check the current mode of the pipeline, not the queue type (since graphics can toggle between 3D & gpgpu modes). Signed-off-by: Lionel Landwerlin Fixes: 455a13fb7f ("anv: limit ANV_PIPE_RENDER_TARGET_BUFFER_WRITES to blorp operations using 3D") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11607 Reviewed-by: Tapani Pälli Part-of: (cherry picked from commit fafa0d5abb238b5b811720e12dbc86431ee33f9f) --- .pick_status.json | 2 +- src/intel/vulkan/anv_blorp.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 30cfe61e5bc..e48acde4346 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6464,7 +6464,7 @@ "description": "anv: fix check on pipeline mode to track buffer writes", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "455a13fb7f170b0f4a55375ec3a6f006fc69f078", "notes": null diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index 7d52523275d..fa94f1e5b4a 100644 --- a/src/intel/vulkan/anv_blorp.c +++ b/src/intel/vulkan/anv_blorp.c @@ -796,8 +796,12 @@ anv_add_buffer_write_pending_bits(struct anv_cmd_buffer *cmd_buffer, { const struct intel_device_info *devinfo = cmd_buffer->device->info; + if (anv_cmd_buffer_is_blitter_queue(cmd_buffer)) + return; + cmd_buffer->state.queries.buffer_write_bits |= - (cmd_buffer->queue_family->queueFlags & VK_QUEUE_GRAPHICS_BIT) == 0 ? + (cmd_buffer->state.current_pipeline == + cmd_buffer->device->physical->gpgpu_pipeline_value) ? ANV_QUERY_COMPUTE_WRITES_PENDING_BITS : ANV_QUERY_RENDER_TARGET_WRITES_PENDING_BITS(devinfo); }