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

Features::SHADER_INT64 enables 64-bit atomic types #5735

Closed
jimblandy opened this issue May 24, 2024 · 2 comments
Closed

Features::SHADER_INT64 enables 64-bit atomic types #5735

jimblandy opened this issue May 24, 2024 · 2 comments

Comments

@jimblandy
Copy link
Member

When Vulkan sets VkPhysicalDeviceFeatures::shaderInt64, wgpu offers Features::SHADER_INT64, which, if enabled, causes Naga to permit 64-bit atomic types, even though those are covered by the separate VkPhysicalDeviceVulkan12Features::shaderSharedInt64Atomics and shaderBufferInt64Atomics features.

This seems to be fixed by #5383.

@teoxoy
Copy link
Member

teoxoy commented May 24, 2024

I don't think that's the case.

crate::ScalarKind::Sint | crate::ScalarKind::Uint => width == 4,

@jimblandy
Copy link
Member Author

Okay, I see. I was only looking at the validation of Statement::Atomic and Expression::AtomicResult. But validate_atomic does verify that Statement::Atomic::pointer is a pointer to an atomic type, so the validation of the type itself effectively covers the statements.

This means that the call to Validator::check_width when validating Expression::AtomicResult is redundant - but #5742 covers that and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants