anv: fix pending query bits for compute only command buffers
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 15 Jun 2023 10:41:58 +0000 (13:41 +0300)
committerMarge Bot <emma+marge@anholt.net>
Tue, 20 Jun 2023 02:34:51 +0000 (02:34 +0000)
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 <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23675>

src/intel/vulkan/genX_query.c

index 8492716..396fba2 100644 (file)
@@ -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);