gfx-rs / wgpu

A cross-platform, safe, pure-Rust graphics API.
https://wgpu.rs
Apache License 2.0
11.46k stars 855 forks source link

Check for subgroup support when creating a naga `Validator` #5847

Closed Elabajaba closed 1 week ago

Elabajaba commented 1 week ago

Description Detecting support for subgroup ops in naga validators is currently pretty ugly, as it requires creating a validator then calling 2 separate functions on it. I found this really annoying and ugly when I updated naga_oil to naga 0.20.

Add SUBGROUP_VERTEX_STAGE to naga's Capabilities so that naga automatically detects subgroup support when creating a validator.

Testing I ran the water example and it still worked.

Checklist