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

[msl-out] atomic CompareExchange is not implemented #5257

Open
guusw opened this issue Feb 16, 2024 · 6 comments · May be fixed by #5675
Open

[msl-out] atomic CompareExchange is not implemented #5257

guusw opened this issue Feb 16, 2024 · 6 comments · May be fixed by #5675
Labels
area: naga back-end Outputs of naga shader conversion lang: Metal Metal Shading Language naga Shader Translator

Comments

@guusw
Copy link

guusw commented Feb 16, 2024

Doesn't seem like there's any tracking issue for this currently, I just encountered this while trying to use atomicCompareExchangeWeak

[0216 14:17:07.454] [wgpu] [error] Device::create_render_pipeline error: Internal error in ShaderStages(VERTEX) shader: MSL: FeatureNotImplemented("atomic CompareExchange")
[0216 14:17:07.454] [wgpu] [error] Shader translation error for stage ShaderStages(VERTEX): MSL: FeatureNotImplemented("atomic CompareExchange")
[0216 14:17:07.454] [wgpu] [error] Please report it to https://github.com/gfx-rs/wgpu
[0216 14:17:07.454] [wgpu] [error] Validation Error

Caused by:
    In wgpuDeviceCreateRenderPipeline
    Internal error in ShaderStages(VERTEX) shader: MSL: FeatureNotImplemented("atomic CompareExchange")
 (1)
@teoxoy
Copy link
Member

teoxoy commented Feb 27, 2024

#4364 tracks this but is more like a meta issue.

@guusw
Copy link
Author

guusw commented Mar 4, 2024

For now I implemented a working version for metal for my project using wgpu here:
shards-lang@5f43672

Just leaving that here for anyone looking for a temporary workaround.

@teoxoy teoxoy added api: metal Issues with Metal area: naga back-end Outputs of naga shader conversion naga Shader Translator lang: Metal Metal Shading Language and removed api: metal Issues with Metal labels Mar 4, 2024
@teoxoy
Copy link
Member

teoxoy commented Mar 4, 2024

Would you be open to start a PR to add it upstream?

@guusw
Copy link
Author

guusw commented Mar 8, 2024

Yeah I'm considering it once I have time to clean up that commit.

@9291Sam
Copy link

9291Sam commented May 5, 2024

Any progress on a PR?

@9291Sam
Copy link

9291Sam commented May 6, 2024

I'm going to start work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: naga back-end Outputs of naga shader conversion lang: Metal Metal Shading Language naga Shader Translator
Projects
None yet
3 participants