Skip to content

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

@jimblandy

Description

@jimblandy

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions