From 83212054e07ba60dace89ee0c513eeb672228f2c Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 10 Jun 2025 14:24:27 -0400 Subject: [PATCH] tu: Use cached coherent memory when possible for query pools It's expected to read back the result on the CPU, so make this cached when cached coherent memory is available. Part-of: --- src/freedreno/vulkan/tu_query_pool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_query_pool.cc b/src/freedreno/vulkan/tu_query_pool.cc index 4f9c5663625..95b0994cdd1 100644 --- a/src/freedreno/vulkan/tu_query_pool.cc +++ b/src/freedreno/vulkan/tu_query_pool.cc @@ -390,7 +390,7 @@ tu_CreateQueryPool(VkDevice _device, slot_size += sizeof(struct perfcntr_query_slot) * collection->num_enabled_perfcntrs; } - VkResult result = tu_bo_init_new(device, &pool->vk.base, &pool->bo, + VkResult result = tu_bo_init_new_cached(device, &pool->vk.base, &pool->bo, pCreateInfo->queryCount * slot_size, TU_BO_ALLOC_NO_FLAGS, "query pool"); if (result != VK_SUCCESS) { vk_query_pool_destroy(&device->vk, pAllocator, &pool->vk);