Module: Mesa Branch: master Commit: 0763453291f59531e13c1be916feaf7af14dddaf URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0763453291f59531e13c1be916feaf7af14dddaf
Author: Bas Nieuwenhuizen <[email protected]> Date: Tue Apr 11 23:56:42 2017 +0200 radv: Return VK_NOT_READY if the query results are not available. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Fixes: 8475a14302e ("radv: Implement pipeline statistics queries.") Reviewed-by: Fredrik Höglund <[email protected]> --- src/amd/vulkan/radv_query.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/amd/vulkan/radv_query.c b/src/amd/vulkan/radv_query.c index 9f54287c36..bd293b58e6 100644 --- a/src/amd/vulkan/radv_query.c +++ b/src/amd/vulkan/radv_query.c @@ -910,6 +910,12 @@ VkResult radv_GetQueryPoolResults( break; } case VK_QUERY_TYPE_PIPELINE_STATISTICS: { + if (!available && !(flags & VK_QUERY_RESULT_PARTIAL_BIT)) { + result = VK_NOT_READY; + break; + + } + const uint64_t *start = (uint64_t*)src; const uint64_t *stop = (uint64_t*)(src + pipelinestat_block_size); if (flags & VK_QUERY_RESULT_64_BIT) { _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
