diff options
Diffstat (limited to 'src/amd/vulkan/radv_query.c')
-rw-r--r-- | src/amd/vulkan/radv_query.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index ff2782bae89..9fee4d2b491 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -1092,11 +1092,15 @@ void radv_CmdBeginQuery( radv_cs_add_buffer(cmd_buffer->device->ws, cs, pool->bo, 8); if (cmd_buffer->pending_reset_query) { - /* Make sure to flush caches if the query pool has been - * previously resetted using the compute shader path. - */ - si_emit_cache_flush(cmd_buffer); - cmd_buffer->pending_reset_query = false; + if (pool->size >= RADV_BUFFER_OPS_CS_THRESHOLD) { + /* Only need to flush caches if the query pool size is + * large enough to be resetted using the compute shader + * path. Small pools don't need any cache flushes + * because we use a CP dma clear. + */ + si_emit_cache_flush(cmd_buffer); + cmd_buffer->pending_reset_query = false; + } } switch (pool->type) { |