This function does not work as expected when the following conditions are met:
- The query has been used before and a non-zero result was ‘stored’ in it.
- The query was reset later using vkCmdResetQueryPool.
- A new occlusion query was made and the final result shall be fully occluded (0).
- While the query is not yet ready, vkGetQueryPoolResults is called with VK_QUERY_RESULT_PARTIAL_BIT.
In this case, step 4 seemingly writes the result from step 1 into result. While in this case the query is yet to be processed, it has been reset. The vulkan spec says anything written into the result would be between 0 and the final result but the result is fully occluded, hence any partials should have been 0. This is very easy to work around with the RESULT_WAIT flag but I thought it would be good to report anyway.