You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple threads are submitting commands to the same device/queue pair (e.g. through test cases running with cargo test).
Each thread has a complicated setup of buffers and textures with various combinations of buffer/texture usage flags.
Each thread is submitting both render passes and compute passes.
Occasionally, the Vulkan validation layers produce the error below, but it doesn't seem to be reproducible with --test-threads=1.
The error also seems sensitive to the size of the involved buffers. For example, some of the involved vertex buffers occasionally have a size of 0.
I'm using some unsafe APIs to create shader modules from raw precompiled SPIR-V, and to enable some Vulkan-specific shader extensions, but my understanding is that this validation error is on the host/driver side, and should not be something that an invalid shader can trigger. Could be wrong though? The SPIR-V is generated by slangc and should be correct and matching the environment (flavor profile glsl_460).
Repro steps
Unfortunately I have found it extremely difficult to reproduce outside of my rather complicated code base. My approach has been to take the RUST_LOG=trace output and writing code that produces the same log output using raw wgpu APIs, but no luck. But my attempt to reproduce was also incomplete, in that I did not create all of the same resources (shader modules, pipeline layouts, pipelines, etc.).
Expected vs observed behavior
I see sync validation errors from Vulkan, and I expected wgpu to automatically insert all sync barriers. :-)
Extra materials
Since the bug is only (seemingly) apparent with multithreaded use, it's extremely difficult to get a useful trace output. Let me know if that would be helpful, though.
Platform
MacBook Pro M1 (macOS 15.0 Sequoia), latest MoltenVK on Vulkan apiVersion 1.2.283, custom rendering engine built on top of wgpu.
The text was updated successfully, but these errors were encountered:
Description
Scenario:
cargo test
).--test-threads=1
.slangc
and should be correct and matching the environment (flavor profileglsl_460
).Theories:
SYNC-HAZARD-WRITE-AFTER-WRITE
validation errors with Bevy. #5373 (but is a different sync hazard kind, so potentially a different barrier type).Validation error:
Repro steps
Unfortunately I have found it extremely difficult to reproduce outside of my rather complicated code base. My approach has been to take the
RUST_LOG=trace
output and writing code that produces the same log output using rawwgpu
APIs, but no luck. But my attempt to reproduce was also incomplete, in that I did not create all of the same resources (shader modules, pipeline layouts, pipelines, etc.).Expected vs observed behavior
I see sync validation errors from Vulkan, and I expected
wgpu
to automatically insert all sync barriers. :-)Extra materials
Since the bug is only (seemingly) apparent with multithreaded use, it's extremely difficult to get a useful trace output. Let me know if that would be helpful, though.
Platform
MacBook Pro M1 (macOS 15.0 Sequoia), latest MoltenVK on Vulkan apiVersion 1.2.283, custom rendering engine built on top of wgpu.
The text was updated successfully, but these errors were encountered: