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

Fix hlsl storage format generation #6993

Open
wants to merge 8 commits into
base: trunk
Choose a base branch
from

Conversation

Vecvec
Copy link
Contributor

@Vecvec Vecvec commented Jan 26, 2025

Connections

Description
Previously we generated a vec2 for rg8unorm on hlsl as the storage type; however, this is for the output variable, not the stored type. This PR makes this always a vec4 unless it's a one length type because: 1. They seem to be auto convertible to a vec4 2. it breaks image atomics. I would prefer these to be vec4s too but I can't find a way to not break image atomics.

Testing
Adds a new naga snapshot which loads and stores to storage textures which are r8unorm, rg8unorm and rgba8unorm.

Checklist

  • Run cargo fmt.
  • [n/a] Run taplo format.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@Vecvec Vecvec requested a review from a team January 26, 2025 06:30
@cwfitzgerald
Copy link
Member

Have you tested this on an example that is actually run?

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

Successfully merging this pull request may close these issues.

3 participants