zink: fix synchronization when drawing from streamout
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 20 Apr 2022 15:29:10 +0000 (11:29 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 21 Apr 2022 00:27:50 +0000 (00:27 +0000)
commita056cbc691843861da417b5bcea9f871fdceeb19
tree859f76581133b35f24a3b664d013faf6826c2e9a
parentdd783d7144932d79ef761810d46e45c3df7148cf
zink: fix synchronization when drawing from streamout

this was well-documented, but ultimately wrong: the synchronization
being used was for binding streamout buffers (not counter buffers) as
vertex buffers, which was already handled just fine in the normal
vertex buffer binding

drawing from streamout ONLY uses the counter buffer, which means
the counter buffer needs to be synchronized for reading

cc: mesa-stable

fixes (nv):
KHR-GL46.transform_feedback.draw_xfb_feedbackk_test
KHR-GL46.transform_feedback.draw_xfb_instanced_test
KHR-GL46.transform_feedback.draw_xfb_stream_instanced_test

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16065>
src/gallium/drivers/zink/ci/zink-nv-fails.txt
src/gallium/drivers/zink/zink_draw.cpp