Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(ext/webgpu): invalidate GPUAdapter when a device is created #23752

Merged

Conversation

crowlKats
Copy link
Member

This removes the need for using Deno.resources to close the gpuadapter resource, while being more spec compliant.

@lucacasonato
Copy link
Member

Does spec agree that you can only create one device per adapeter?

@crowlKats
Copy link
Member Author

@lucacasonato yes. I discussed this topic with @jimblandy as i asked about a way to destroy gpuadapters, and this is actually what should happen, making having a gpuadapter.destroy unecessary.
Reference: second line of https://gpuweb.github.io/gpuweb/#dom-gpuadapter-requestdevice
No browser follows this behaviour yet as this was a relatively recent change

@crowlKats crowlKats merged commit 6066e06 into denoland:main May 10, 2024
17 checks passed
@crowlKats crowlKats deleted the webgpu-disable-adapter-on-device-creation branch May 10, 2024 11:10
dsherret pushed a commit that referenced this pull request May 10, 2024
This removes the need for using `Deno.resources` to close the gpuadapter
resource, while being more spec compliant.
crowlKats pushed a commit that referenced this pull request Aug 7, 2024
… properties (#24914)

Fixed `GPUAdapter` bugs:

* `GPUAdapter#isFallbackAdapter` being `undefined`
* `GPUAdapter#info` throwing `TypeError`
  * introduced by #24783
* `GPUAdapter#info` closing adapter resources
  * introduced by #23752
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants