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

Support bgra8unorm texel format #2195

Closed
teoxoy opened this issue Jan 6, 2023 · 1 comment · Fixed by #2542
Closed

Support bgra8unorm texel format #2195

teoxoy opened this issue Jan 6, 2023 · 1 comment · Fixed by #2542
Labels
kind: feature New feature or request

Comments

@teoxoy
Copy link
Member

teoxoy commented Jan 6, 2023

The data written to this format has to be in RGBA order (look for "Texel Formats for Storage Textures" table here).

D3D12 swizzles the reads/writes automatically (see gpuweb/gpuweb#3640 (comment)).
Metal also swizzles (see gpuweb/gpuweb#3640 (comment)).

For SPIR-V, use the Unknown image format and request the StorageImageWriteWithoutFormat capability on writes.
I don't think Vulkan swizzles (or I can't find it does) so we will probably have to swizzle the writes ourselves.

@teoxoy
Copy link
Member Author

teoxoy commented Oct 11, 2023

Turns out we don't need to swizzle in SPIR-V! 🎉

gfx-rs/wgpu#4228 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant