Update shader bencher to share some logic with snapshots #8108
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connections
This is to address test failings in #7930 due to not respecting supported backends. In fact, its pulled directly from the last few commits there.
Description
Previously, the shader bencher was using snapshot shaders but not respecting their options, such as which backends they should be tested against. As a result, in #7930, a mesh shader test shader that only can be written to SPIRV was causing the shader bencher to fail. I have updated the shader bencher and snapshots to share more logic.
See this comment
Testing
The change is to testing itself. I have verified that the bencher still fails on bad shader inputs, and that it ignores my mesh shader as it is supposed to.
Squash or Rebase?
Squash
Checklist
cargo fmt
.taplo format
.cargo clippy --tests
. If applicable, add:--target wasm32-unknown-unknown
cargo xtask test
to run tests.CHANGELOG.md
entry.