-
Notifications
You must be signed in to change notification settings - Fork 345
Description
Vulkan SPIR-V and HLSL both support marking buffers as coherent. In SPIR-V, the Coherent decoration can be applied to variables or structure members. In HLSL the globallycoherent modifier can be applied to some buffer declarations.
In the Vulkan memory model, coherent is replaced by private and non-private memory accesses. Non-atomic memory accesses are private by default. This mean they cannot be location ordered with a system-synchronizes-with operation. That boils down to private memory operations not being visible during the operation of a shader between different invocations. Workgroup memory operations are implicitly coherent.
I think we probably expect that read/write storage buffers should be capable of being synchronized between invocations so I would expect we want to say that something to the effect that memory operations are "non-private" (in whatever terms WGSL ends up using) and that translations to SPIR-V and HLSL should mark read/write storage buffers as coherent. Given MSL's inheritance from C++, I would expect MSL to default to coherent buffers, but I have not tested this.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status