radv: do not reset query pool during creation
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 21 May 2019 11:40:10 +0000 (13:40 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 22 May 2019 06:36:41 +0000 (08:36 +0200)
From the Vulkan spec 1.1.108:
   "After query pool creation, each query must be reset before
    it is used."

So, the driver doesn't need to do this at creation time.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_query.c

index 63a2ab773a83f48a0b32d819f79a4a137d3239c0..0bc7f8390b6cd90a70c5d23edadb12affe7183c8 100644 (file)
@@ -1035,8 +1035,6 @@ VkResult radv_CreateQueryPool(
        struct radv_query_pool *pool = vk_alloc2(&device->alloc, pAllocator,
                                               sizeof(*pool), 8,
                                               VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
-       uint32_t initial_value = pCreateInfo->queryType == VK_QUERY_TYPE_TIMESTAMP
-                                ? TIMESTAMP_NOT_READY : 0;
 
        if (!pool)
                return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
@@ -1082,7 +1080,6 @@ VkResult radv_CreateQueryPool(
                vk_free2(&device->alloc, pAllocator, pool);
                return vk_error(device->instance, VK_ERROR_OUT_OF_DEVICE_MEMORY);
        }
-       memset(pool->ptr, initial_value, pool->size);
 
        *pQueryPool = radv_query_pool_to_handle(pool);
        return VK_SUCCESS;