mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-24 00:11:11 +01:00
1112: Expose adapter specific formats features via Extension, support for storage read+write r=kvark a=Wumpf **Connections** Draft until https://github.com/gfx-rs/gfx/pull/3559 landed (then update and comment two lines in) New & improved replacement for #1109 PR for wgpu-rs to be opened once there's some confidence that this is that it should look like. [Preview](https://github.com/gfx-rs/wgpu-rs/compare/master...Wumpf:texture-format-feature-query?expand=1) **Description** Adapter exposes now per texture format specific features. Feature struct defined as allowed usages + flags. Flags describe only storage texture usage so far. Query not used for validation unless `TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES` feature is enabled on a device. Otherwise uses hardcoded feature set guaranteed by webgpu. Storage read/write binding can then be used as a consequence (storage atomic has no effect yet). **Testing** Manual testing with my fluid sim project through wgpu-rs which covers storage r/w for a few different formats and storage in general for formats that don't support this usage by default at all. Ran tests and a couple of samples to see if anything broke with the feature disabled. Co-authored-by: Andreas Reich <r_andreas2@web.de>