turnip: Fix vkCmdCopyQueryPoolResults with available flag
authorBrian Ho <brian@brkho.com>
Fri, 24 Jan 2020 23:04:50 +0000 (18:04 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 30 Jan 2020 20:30:46 +0000 (20:30 +0000)
commit58fd26c4332aa3f3ffd34d99d996ba62476d5acd
tree8ed6ac28748e880caea37d68afcc6b39ac94cda8
parent1a3e2a7fa8bf184b5f9214d4c404e4c2c754aa58
turnip: Fix vkCmdCopyQueryPoolResults with available flag

Previously, calling vkCmdCopyQueryPoolResults with the
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT flag set the query result
field in the buffer to 0 if unavailable and the query result if
available. This was a misunderstanding of the Vulkan spec, and this
commit corrects the behavior to emitting a separate available
result in addition to the query result.

Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3560>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3560>
src/freedreno/vulkan/tu_query.c