Enabling wgpu features for shader widgets

There is currently no option to specify required wgpu::Features for iced program at startup, without going the more complicated way of integrating iced program into an existing wgpu application.

As far as I can see, optional features could be a #[cfg(feature = "wgpu"]conditional field in Settings in which they can be passed to wgpu::Device creation after being filtered with the available feature set of the adapter (in order to pre-empt panics at startup due to missing support for a feature). Because creating device in such safe way does not guaranteed support for all features requested by the user it should be made possible to query the supported features of the device right after startup, which does call for adding a Task for the job, too.

Any thoughts on this approach, or alternative suggestions? I would be happy to try to take a stab on a PR for this if the there is broader support.

If I may, Iā€™d suggest you to also ask this on the Discord or possibly on GitHub as this Discourse is not very active IMHO

1 Like