adapter.features() doesn't expose all features in wasm
munrocket opened this issue · 1 comments
munrocket commented
Description
adapter.features() doesn't expose all features in WebAssembly
Repro steps
- Create device with features
log::info!("adapter.limits = {:#?}", adapter.features()); // <-- not showing everything
let (device, queue) = adapter
.request_device(
&wgpu::DeviceDescriptor {
label: Some("GPU Device"),
features: adapter.features(), // <-- not allowing everything
limits: wgpu::Limits::default(),
},
None,
)
- Create shader or API with feature
enable chromium_experimental_subgroups;
@compute @workgroup_size(256)
fn main(@builtin(subgroup_invocation_id) sg_id : u32) {
//...
}
- Can't access to features that supported in adapter. Also can't access extensions by name. Can we register it somehow?
Expected vs observed behavior
It is not showing chromium-experimental-subgroups
which can be fun to play with, also float32-filterable
, rg11b10ufloat-renderable
, bgra8unorm-storage
, chromium-experimental-timestamp-query-inside-passes
.
Platform
WebAssembly
teoxoy commented
I think only features from the spec will be present as we can't guarantee compatibility with chromium-experimental
features.
float32-filterable
, rg11b10ufloat-renderable
and bgra8unorm-storage
should work though.
wgpu/wgpu/src/backend/webgpu.rs
Lines 762 to 773 in ca91744