diff options
author | Samuel Pitoiset <[email protected]> | 2019-05-22 17:46:33 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-05-27 08:50:55 +0200 |
commit | 2d2e7954c3628d7002ef2363484d04bd7933fab1 (patch) | |
tree | 4120db0531a0591be692a0ded492121bb343b9a6 /src/amd/vulkan | |
parent | b5fa3abfc281c652de9fe8b10c7cab8b252bb428 (diff) |
radv: tidy up GetQueryPoolResults for occlusion queries
Just move the block that checks the availability bit into the
switch like other query types.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan')
-rw-r--r-- | src/amd/vulkan/radv_query.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index 0bc7f8390b6..c0f470da888 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -1121,13 +1121,6 @@ VkResult radv_GetQueryPoolResults( char *src = pool->ptr + query * pool->stride; uint32_t available; - if (pool->type == VK_QUERY_TYPE_PIPELINE_STATISTICS) { - if (flags & VK_QUERY_RESULT_WAIT_BIT) - while(!*(volatile uint32_t*)(pool->ptr + pool->availability_offset + 4 * query)) - ; - available = *(uint32_t*)(pool->ptr + pool->availability_offset + 4 * query); - } - switch (pool->type) { case VK_QUERY_TYPE_TIMESTAMP: { available = *(uint64_t *)src != TIMESTAMP_NOT_READY; @@ -1187,6 +1180,11 @@ VkResult radv_GetQueryPoolResults( break; } case VK_QUERY_TYPE_PIPELINE_STATISTICS: { + if (flags & VK_QUERY_RESULT_WAIT_BIT) + while(!*(volatile uint32_t*)(pool->ptr + pool->availability_offset + 4 * query)) + ; + available = *(uint32_t*)(pool->ptr + pool->availability_offset + 4 * query); + if (!available && !(flags & VK_QUERY_RESULT_PARTIAL_BIT)) result = VK_NOT_READY; |