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

[naga spv-in] Atomic tests should use the standard snapshot machinery #6292

Open
jimblandy opened this issue Sep 18, 2024 · 0 comments
Open
Labels
area: naga front-end lang: SPIR-V Vulkan's Shading Language naga Shader Translator

Comments

@jimblandy
Copy link
Member

At the moment, the SPIR-V front end's parsing of atomic operations is tested by custom tests in the test_atomic module in naga/src/front/spv/mod.rs. They should just use the standard snapshot machinery.

I notice that test_atomic::atomic_test parses the SPIR-V, validates it, generates WGSL, and then re-parses and re-validates the WGSL. This should never be necessary. If it is ever the case that passing a validated module to our WGSL back end generates code that our WGSL front end can't handle, that's a separate bug: a valid naga::Module should always generate valid output.

With that, I don't think there's anything that atomic_test does that the convert_spv_all snapshot test won't handle nicely.

@jimblandy jimblandy added naga Shader Translator lang: SPIR-V Vulkan's Shading Language area: naga front-end labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: naga front-end lang: SPIR-V Vulkan's Shading Language naga Shader Translator
Projects
None yet
Development

No branches or pull requests

1 participant