Closed almarklein closed 9 months ago
I wonder 🤔 if we can/should fake float32-filterable by enabling TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES
instead?
FYI bgra8 storage was really hard because it was the first to need to use a special spirv tag for storage textures.
Flost32 filterable should just be some logic checks
Flost32 filterable should just be some logic checks
Ok, you nerd-sniped me now.
The features specified by WebGPU (copied from https://gpuweb.github.io/gpuweb/#gpufeaturename):
Features by wgpy-core: https://docs.rs/wgpu-types/0.18.0/wgpu_types/struct.Features.html
This PR adds one missing feature: "bgra8unorm-storage". (The "timestamp-query" was just moved so the order of the list is the same as in the spec.)
The final missing feature "float32-filterable" I cannot add because wgpu-core does not define it yet.
We are interested in having it, since we rely on it in pygfx because it's somewhat crucial in e.g. volume rendering. So I looked a bit into wgpu-core, and found the pr that adds bgra8unorm-storage. Seems like quite a bit of work, so for now I'm going to leave it at leaving the code for this feature commented here. We can keep using
TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES
(which includes float32-filterable) for now. 😅