anv: Handle unavailable queries in vkCmdCopyQueryPoolResults
authorBrian Ho <brian@brkho.com>
Mon, 27 Jan 2020 03:50:42 +0000 (19:50 -0800)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Jan 2020 15:17:21 +0000 (15:17 +0000)
commit815a603889b812edc94bed61a260c76c264a8b9d
tree75522e187b6203c40f373843b1690aa63fd00c3e
parentaf92ce50a7e56d313f5623136d3f09e7c76475fa
anv: Handle unavailable queries in vkCmdCopyQueryPoolResults

If VK_QUERY_RESULT_WAIT_BIT is not set, there is currently no
special handling of unavailable queries in vkCmdCopyQueryPoolResults,
and anv will write an invalid value for the query result.

This commit updates vkCmdCopyQueryPoolResults for unavailable
queries to return 0 if the VK_QUERY_RESULT_PARTIAL_BIT flag is set
and if not, skip writing altogether.

Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3586>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3586>
src/intel/vulkan/genX_query.c