Skip to content
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

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

aleino-nv
Copy link
Collaborator

This addresses issue #5085.

@aleino-nv
Copy link
Collaborator Author

@csyonghe I'm a bit unsure about how the WGSL memory model maps to Slang/HLSL.

Does Slang adopt HLSL's memory model?

@csyonghe
Copy link
Collaborator

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.

@csyonghe
Copy link
Collaborator

Please use "Closes #5085" in the description, so that issue can automatically be closed by github when this PR lands.

@aleino-nv
Copy link
Collaborator Author

Please use "Closes #5085" in the description, so that issue can automatically be closed by github when this PR lands.

Ok I changed "addresses" to "closes".

@aleino-nv aleino-nv added the pr: non-breaking PRs without breaking changes label Sep 19, 2024
@aleino-nv aleino-nv merged commit fe71eaf into shader-slang:master Sep 19, 2024
12 checks passed
Copy link
Collaborator

@jkwak-work jkwak-work left a 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();";
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants