Module: Mesa Branch: master Commit: 9d43afa3dc4ecc22317836a8f3c707d69ba8ed50 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d43afa3dc4ecc22317836a8f3c707d69ba8ed50
Author: Jason Ekstrand <[email protected]> Date: Wed Mar 15 16:43:54 2017 -0700 anv/query: Let 32-bit values wrap From the Vulkan 1.0.39 Specification: "If VK_QUERY_RESULT_64_BIT is not set and the result overflows a 32-bit value, the value may either wrap or saturate." So we can either clamp or wrap. Wrapping is both easier and what the user gets if they use vkCmdCopyQueryPoolResults and we should be consistent. We could make vkCmdCopyQueryPoolResults clamp but it's annoying and ends up burning extra batch for something the spec clearly doesn't require. Reviewed-By: Lionel Landwerlin <[email protected]> --- src/intel/vulkan/genX_query.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c index b5955d341b..144ca3b4c6 100644 --- a/src/intel/vulkan/genX_query.c +++ b/src/intel/vulkan/genX_query.c @@ -181,8 +181,6 @@ VkResult genX(GetQueryPoolResults)( dst[1] = slot[firstQuery + i].available; } else { uint32_t *dst = pData; - if (result > UINT32_MAX) - result = UINT32_MAX; if (write_results) dst[0] = result; if (flags & VK_QUERY_RESULT_WITH_AVAILABILITY_BIT) _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
