Metal Autosync Doesn't Barrier Vertex Shader Write -> Copy Source Hazards #4732
Labels
api: metal
Issues with Metal
external: driver-bug
A driver is causing the bug, though we may still want to work around it
type: bug
Something isn't working
Description
Discovered in #4723
In the test code for vertex_indices we do a renderpass that writes to a storage buffer from a vertex shader. It then copies that buffer to a cpu side buffer to read.
If done without a hard cpu-side wait in between the renderpass and read, it appears as though there is no synchronization between the renderpass and the blit.
I know that the M1 has separate blit and vertex engines which metal can use simultanously, so this is my best guess as to what is happening.
See also #3110
Encoder 1 has the renderpass, Encoder 2 has the copy. If you remove the poll, random tests will fail with no data.
Platform
M1, Sonoma 14.1.1
Interestingly it doesn't appear to happen on our CI machine, currently running Monterey (12) also with an M1.
The text was updated successfully, but these errors were encountered: