-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add feature gated 16-bit normalized texture support #2282
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
Conversation
Main question is, what usages are guaranteed to be supported by this feature? In Vulkan, not all usages are guaranteed to be supported. Even worse, on Metal these formats can't be resolve targets, even though you can render to them! Since we don't have a RESOLVE usage, this becomes a bit problematic. I filed gpuweb/gpuweb#2408 upstream to discuss this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super solid work! Just one thing to figure out
8247481
to
1bf1fe3
Compare
@kvark Could this also be backported to |
Technically, it changes |
Ah, right, that makes sense. Should And, is |
It's not exactly trivial. Generally, marking an enum as non-exhaustive only affects the public users of a library. That is, library logic can still treat it as any other enum, and do exhaustive matching. wgpu-hal needs to do a lot of matching of texture formats in the backends. However, With this in mind, I think we should just start preparing for wgpu-0.12. Do you have a schedule for Bevy that we'd need to align to? |
I couldn't say when |
* Support buffer resource arrays in IR, wgsl-in, and spv-out * spv-out: refactor non-uniform indexing semantics to support buffers * Update the doc comment on BindingArray type * Improve TypeInfo restrictions on binding arrays * Strip DATA out of binding arrays * Include suggested documentation, more binding array tests, enforce structs
Connections
Fixes #1934
Description
Adds
16-bit
signed and unsigned normalized texture format support for Vulkan, DX12, and Metal backends via a newTEXTURE_FORMAT_16BIT_NORM
feature (I'm open to bikeshedding the name).It appears that
16-bit
normalized formats are supported for filtered sampling everywhere expect older android devices, based on what I can tell from the following sources:Testing
I used a modified version of the
texture-arrays
example to test the Vulkan backend. I have not tested the DX12 or Metal backends.