summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorAndres Rodriguez <[email protected]>2019-07-27 09:44:44 -0400
committerAndres Rodriguez <[email protected]>2019-07-27 10:19:19 -0400
commit2b71b4e79374ee0243de2d83409adab05ee71c69 (patch)
tree9544dc7d3f57ba27b96117f6b934ae5570ff2c1f /src/amd
parentc9b86cf52692f1d76314dce345080af8ce786792 (diff)
radv: fix queries with WAIT_BIT returning VK_NOT_READY
When vkGetQueryPoolResults() is called with VK_QUERY_RESULT_WAIT_BIT set, the driver is supposed to wait for the query to become available before returning. Currently, radv returns once the query is indeed ready, but it returns VK_NOT_READY. It also fails to populate the results. The problem is a missing volatile in the secondary check for query availability. This patch removes the secondary check altogether since it is redundant with the preceding loop. This bug was found with an unreleased version of SteamVR. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_query.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
index 3add078e978..1bdcc998c65 100644
--- a/src/amd/vulkan/radv_query.c
+++ b/src/amd/vulkan/radv_query.c
@@ -1129,7 +1129,7 @@ VkResult radv_GetQueryPoolResults(
if (flags & VK_QUERY_RESULT_WAIT_BIT) {
while (*(volatile uint64_t *)src == TIMESTAMP_NOT_READY)
;
- available = *(uint64_t *)src != TIMESTAMP_NOT_READY;
+ available = true;
}
if (!available && !(flags & VK_QUERY_RESULT_PARTIAL_BIT))