dzn: Add KHR_draw_indirect_count support
authorBoris Brezillon <boris.brezillon@collabora.com>
Thu, 7 Apr 2022 13:49:00 +0000 (06:49 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 22 Apr 2022 10:01:51 +0000 (10:01 +0000)
commite018311b3559896cc6176a50efcd9b9a06020e84
treed7f03d8f4153283214ef582eb9a429603a6376b3
parentece5e27a7fcd50c0a9718b7506b0edee542ec50d
dzn: Add KHR_draw_indirect_count support

Unfortunately it's not as simple as passing the indirect draw count
buffer to ExecuteIndirect. The compute job that populate the execute
buffer also needs to know the number of entries that need to be
patched. Instead of transitioning the indirect count buffer from
GENERIC_READ to INDIRECT_ARGUMENT we just keep at as a read-only
resource and copy the draw_count value to the exec buffer in the
compute job.

Acked-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15914>
src/microsoft/ci/warp-fails.txt
src/microsoft/vulkan/dzn_cmd_buffer.c
src/microsoft/vulkan/dzn_device.c
src/microsoft/vulkan/dzn_meta.c
src/microsoft/vulkan/dzn_nir.c
src/microsoft/vulkan/dzn_nir.h