Mesa (master): radv: Use correct size for availability flag.
Bas Nieuwenhuizen
bnieuwenhuizen at kemper.freedesktop.org
Mon Feb 27 00:34:42 UTC 2017
Module: Mesa
Branch: master
Commit: 43d833ae97daa73a2422b5696b587a7b46750e07
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=43d833ae97daa73a2422b5696b587a7b46750e07
Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date: Sun Feb 26 22:36:10 2017 +0100
radv: Use correct size for availability flag.
Per spec, VK_QUERY_RESULT_64_BIT specifies the integer size and the
availability flag is an integer. We apparently handled this correctly
already for the copy to buffer case.
Signed-off-by: Bas Nieuwenhuizen <basni at google.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>
Cc: 13.0 17.0 <mesa-stable at lists.freedesktop.org>
---
src/amd/vulkan/radv_query.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c
index a2d0889..288bd43 100644
--- a/src/amd/vulkan/radv_query.c
+++ b/src/amd/vulkan/radv_query.c
@@ -205,8 +205,11 @@ VkResult radv_GetQueryPoolResults(
}
if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT) {
- *(uint32_t*)dest = available;
- dest += 4;
+ if (flags & VK_QUERY_RESULT_64_BIT) {
+ *(uint64_t*)dest = available;
+ } else {
+ *(uint32_t*)dest = available;
+ }
}
}
More information about the mesa-commit
mailing list