radv: don't overwrite results in VkGetQueryPoolResults() when queries are not available
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Fri, 22 Mar 2019 09:03:29 +0000 (10:03 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Mon, 25 Mar 2019 07:21:22 +0000 (08:21 +0100)
commitcb3ea50ec2c429960e945d073315b61f78fc67b9
tree28d26ba3623aa15d1b27d7a9c0c7d9cb3a795de4
parent2c240a52161f5ff875fc86e22ad688f843dfb356
radv: don't overwrite results in VkGetQueryPoolResults() when queries are not available

If the query is not available and VK_QUERY_RESULT_WAIT_BIT and
VK_QUERY_RESULT_PARTIAL_BIT are both not set, the spec doesn't
allow to modify its result.

From Vulkan spec:

"If VK_QUERY_RESULT_WAIT_BIT and VK_QUERY_RESULT_PARTIAL_BIT are
both not set then no result values are written to pData for queries
that are in the unavailable state at the time of the call, and
vkGetQueryPoolResults returns VK_NOT_READY. However, availability state
is still written to pData for those queries
if VK_QUERY_RESULT_WITH_AVAILABILITY_BIT is set."

v2:
- Move VK_NOT_READY change to next patch (Samuel Pitoiset)

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/vulkan/radv_query.c