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

Expose conversions between TextureFormat and naga::StorageFormat #6185

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

caelunshun
Copy link

Connections
none

Description
Exposes conversions between TextureFormat and naga::StorageFormat.

This is useful when generating compute shaders at runtime that need to support arbitrary storage texture formats.

Due to the orphan rule, I placed these functions in an extension trait in wgpu::util.

Testing
Doctests included.

Checklist

  • Run cargo fmt.
  • 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.

This is useful when generating compute shaders at runtime that need
to support arbitrary storage texture formats.

Due to the orphan rule, I placed these functions in an extension trait
in wgpu::util.
@caelunshun caelunshun requested a review from a team as a code owner August 30, 2024 23:04
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.

1 participant