Module: Mesa
Branch: main
Commit: 0339ec4240c98f1c5bf0d6532cf7ce7af3e7eadf
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0339ec4240c98f1c5bf0d6532cf7ce7af3e7eadf

Author: Lionel Landwerlin <[email protected]>
Date:   Thu Jun 15 13:41:58 2023 +0300

anv: fix pending query bits for compute only command buffers

If we do the clear operations on a compute only command buffer, the
operations will not use render target writes but compute shader writes
instead.

Probably not an issue right now because this is not a feature we've
enabled.

Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Rohan Garg <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23675>

---

 src/intel/vulkan/genX_query.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c
index 8492716cbb0..396fba29c4f 100644
--- a/src/intel/vulkan/genX_query.c
+++ b/src/intel/vulkan/genX_query.c
@@ -791,6 +791,8 @@ void genX(CmdResetQueryPool)(
                                0);
 
       cmd_buffer->state.pending_query_bits =
+         (cmd_buffer->queue_family->queueFlags & VK_QUEUE_GRAPHICS_BIT) == 0 ?
+         ANV_QUERY_COMPUTE_WRITES_PENDING_BITS :
          ANV_QUERY_RENDER_TARGET_WRITES_PENDING_BITS(cmd_buffer->device->info);
 
       trace_intel_end_query_clear_blorp(&cmd_buffer->trace, queryCount);

Reply via email to