Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapter.features() doesn't expose all features in wasm #5685

Open
munrocket opened this issue May 9, 2024 · 1 comment
Open

adapter.features() doesn't expose all features in wasm #5685

munrocket opened this issue May 9, 2024 · 1 comment

Comments

@munrocket
Copy link
Contributor

munrocket commented May 9, 2024

Description
adapter.features() doesn't expose all features in WebAssembly

Repro steps

  1. 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,
  )
  1. Create shader or API with feature
enable chromium_experimental_subgroups; 

@compute @workgroup_size(256)
fn main(@builtin(subgroup_invocation_id) sg_id : u32) {
   //...
}
  1. 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
Copy link
Member

teoxoy commented May 13, 2024

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.

(
wgt::Features::RG11B10UFLOAT_RENDERABLE,
webgpu_sys::GpuFeatureName::Rg11b10ufloatRenderable,
),
(
wgt::Features::BGRA8UNORM_STORAGE,
webgpu_sys::GpuFeatureName::Bgra8unormStorage,
),
(
wgt::Features::FLOAT32_FILTERABLE,
webgpu_sys::GpuFeatureName::Float32Filterable,
),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants