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

bug(ext/webgpu): requiredFeatures don't work #12721

Closed
DjDeveloperr opened this issue Nov 10, 2021 · 0 comments · Fixed by #17534
Closed

bug(ext/webgpu): requiredFeatures don't work #12721

DjDeveloperr opened this issue Nov 10, 2021 · 0 comments · Fixed by #17534
Assignees
Labels
bug Something isn't working correctly webgpu WebGPU API

Comments

@DjDeveloperr
Copy link
Contributor

DjDeveloperr commented Nov 10, 2021

Even after specifying a required feature in GPUDeviceDescriptor, the device's feature field contains no feature. Not only that, in my case, timestamp query related things seem to fail silently (but can be patched to throw the errors).

Repro 1, device.features don't contain the required feature

const adapter = (await navigator.gpu.requestAdapter())!;
console.log("adapter has timestamp query feature:", adapter.features.has("timestamp-query"));

const device = (await adapter.requestDevice({
  requiredFeatures: ["timestamp-query"],
}))!;
console.log("device has timestamp query feature:", device.features.includes("timestamp-query"));

Output:

image

Repro 2, device.createQuerySet silently fails in validation

import { enableValidationErrors } from "https://crux.land/gpu_err@1.0.0";

const adapter = (await navigator.gpu.requestAdapter())!;

const device = (await adapter.requestDevice({
  requiredFeatures: ["timestamp-query"],
}))!;

enableValidationErrors(device, true);

const querySet = device.createQuerySet({
  type: "timestamp",
  count: 1,
});

Output:

image

deno: v1.16.0
os: windows
webgpu backend: Vulkan, gpu: Intel

@bartlomieju bartlomieju added bug Something isn't working correctly webgpu WebGPU API labels Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly webgpu WebGPU API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants