Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

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)

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
kind: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant