diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-04-11 23:54:58 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-04-12 07:38:58 +0200 |
commit | 2dacb727c2b8365dcf41f32ca864c83d778f3b83 (patch) | |
tree | 266a4c6483de4c0a9c6dde0a1ddd2892ca312d7e /src/amd/vulkan/radv_query.c | |
parent | 03d1de387ef35c69fb11781b31824f6f2f310006 (diff) |
radv: Set query availability bit even if we don't wait.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Fixes: 8475a14302e ("radv: Implement pipeline statistics queries.")
Reviewed-by: Fredrik Höglund <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_query.c')
-rw-r--r-- | src/amd/vulkan/radv_query.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index 07cb6404149..9f54287c363 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -850,9 +850,10 @@ VkResult radv_GetQueryPoolResults( char *src = pool->ptr + query * pool->stride; uint32_t available; - if ((flags & VK_QUERY_RESULT_WAIT_BIT) && pool->type != VK_QUERY_TYPE_OCCLUSION) { - while(!*(volatile uint32_t*)(pool->ptr + pool->availability_offset + 4 * query)) - ; + if (pool->type != VK_QUERY_TYPE_OCCLUSION) { + 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); } |