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

[deno_webgpu] WebGPU GPUSupportedFeatures object doesn't include has method #15702

Closed
haoyunfeix opened this issue Aug 31, 2022 · 2 comments · Fixed by #15853
Closed

[deno_webgpu] WebGPU GPUSupportedFeatures object doesn't include has method #15702

haoyunfeix opened this issue Aug 31, 2022 · 2 comments · Fixed by #15853
Labels
bug Something isn't working correctly good first issue Good for newcomers webgpu WebGPU API

Comments

@haoyunfeix
Copy link

Code:

const adapter = await navigator.gpu.requestAdapter();
const device = await adapter?.requestDevice();

console.log(device.features.has('timestamp-query'));

Output:

error: Uncaught (in promise) TypeError: device.features.has is not a function
console.log(device.features.has('timestamp-query'));

Expected output:
True or False

Due to WebGPU spec and webidl spec, device.features is a setlike Object and should includes has method, but there is not.

@vicary
Copy link
Contributor

vicary commented Sep 10, 2022

Gently ping @crowlKats from #7977, is the current array implementation intentional?

@crowlKats
Copy link
Member

No, this seems to be something that was missed in the implementation

@crowlKats crowlKats added bug Something isn't working correctly webgpu WebGPU API good first issue Good for newcomers labels Sep 10, 2022
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 good first issue Good for newcomers webgpu WebGPU API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants