-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add WGSL intrinsics for synchronization #5114
Add WGSL intrinsics for synchronization #5114
Conversation
@csyonghe I'm a bit unsure about how the WGSL memory model maps to Slang/HLSL. Does Slang adopt HLSL's memory model? |
Slang currently has no official memory model. The behavior around atomics and synchronization is mostly target dependent right now. HLSL is also kind of loose in the front in that there isn't a clear spec on what the memory model is there. |
Please use "Closes #5085" in the description, so that issue can automatically be closed by github when this PR lands. |
b44aac9
to
e426f73
Compare
Ok I changed "addresses" to "closes". |
This closes issue shader-slang#5085.
e426f73
to
7fb99a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need test for those implementation.
@@ -7553,11 +7555,12 @@ void DeviceMemoryBarrier() | |||
{ | |||
OpMemoryBarrier Device AcquireRelease|UniformMemory|ImageMemory; | |||
}; | |||
case wgsl: __intrinsic_asm "storageBarrier(); textureBarrier(); workgroupBarrier();"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need workgroupBarrier here?
This addresses issue #5085.