radv: emulate GEOMETRY_SHADER_INVOCATIONS query on RDNA1-2
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 19 Jul 2023 08:02:23 +0000 (10:02 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 27 Jul 2023 07:15:22 +0000 (09:15 +0200)
commit670bd70fa6c1e53b13755a8868ee8cf7708a56f5
tree9e39bc888ec00017339d1768734472dd40b011ef
parentb3aeaee5eb5e5f211b045eb3b96fcca6a55455e4
radv: emulate GEOMETRY_SHADER_INVOCATIONS query on RDNA1-2

The number of geometry shader invocations is correctly counted by the
hardware for both NGG and the legacy GS path but it increments for
NGG VS/TES because they are merged with GS, but it shouldn't. Fix this
by emulating the number of geometry shader invocations.

This fixes piglit/bin/arb_query_buffer_object-qbo and recent
dEQP-VK.query_pool.statistics_query.gs_invocations_no_gs.* failures
with NGG.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24231>
src/amd/vulkan/radv_cmd_buffer.c
src/amd/vulkan/radv_query.c
src/gallium/drivers/zink/ci/zink-radv-navi10-fails.txt
src/gallium/drivers/zink/ci/zink-radv-vangogh-fails.txt