Files
wgpu/wgpu-core
Erich Gubler 344eeb4bc8 refactor(core): migrate from naga::ShaderStage to new ShaderStageForValidation
In order to prepare for spec.-compliant validation of shader I/O, we
need to create a new `enum` that will have the same set of _variants_ as
`naga::ShaderStage`, but will carry additional information relevant to
validation. As a preparatory step, create the new `enum` (called
`ShaderStageForValidation`), and use it as the source of truth for
details of the stage being validated. This yields several immediate
benefits, even before making adjustments for the new validation:

- Stage-specific stage is now properly encapsulated. `compare_function`,
  which was previously passed as a `Option`al sibling argument, is now
  properly associated with only the vertex shader stage.
  - This led to an odd discovery that `compare_function` was being
    provided to `check_stages` with other stages, but not actually
    actually checked. This seems like a rightfully squashed bug.
- Instead of passing a `wgpu_types::ShaderStages` (with a single bit)
  and `naga::ShaderStage` side-by-side, encapsulate both into conversion
  methods for an instance of `ShaderStageForValidation`, so errors are
  impossible to make.
2025-12-23 16:09:17 -05:00
..
2025-10-01 19:36:18 -04:00
2025-10-01 19:36:18 -04:00
2025-10-01 19:36:18 -04:00