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

fix(ext/webgpu): fix GPUAdapter#info fails and add GPUDevice#adapterInfo #26844

Closed
wants to merge 18 commits into from

Conversation

petamoriken
Copy link
Contributor

@petamoriken petamoriken commented Nov 12, 2024

Fix #25874
Fix #26760

GPUAdapter cannot be destroyed manually, so this PR adds FinalizationRegistry to release its resource when GC'd.

And, this PR adds GPUDevice#adapterInfo.
gpuweb/gpuweb#4809
https://groups.google.com/a/chromium.org/g/blink-dev/c/q4tpIeEydRI

@petamoriken
Copy link
Contributor Author

@crowlKats Please take a look!

@petamoriken
Copy link
Contributor Author

petamoriken commented Nov 14, 2024

By initializing GPUAdapterInfo at the same time as GPUAdapter, we can release resources when GPUDevice is requested, so that implementation might be better 🤔

@petamoriken petamoriken force-pushed the fix/webgpu-adapter-info branch from 420ea5e to 8f1d20d Compare November 14, 2024 17:54
@dsherret dsherret requested a review from crowlKats November 21, 2024 00:30
@crowlKats
Copy link
Member

FYI @petamoriken i will be reviewing this alongside all other webgpu and graphics related PRs throughout the day today

Copy link
Member

@crowlKats crowlKats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A problem with this is having to disable sanitizeResources. GPUAdapter as far as i know has no plans to be destroyable, which is the reason why we used take. I will have to bring this up in the next wgpu meeting to get a clearer idea of whats going on, so will have to wait until next week.

@dsherret dsherret requested a review from crowlKats January 31, 2025 21:09
@petamoriken
Copy link
Contributor Author

superseded by #27665

@petamoriken petamoriken closed this Feb 5, 2025
@petamoriken petamoriken deleted the fix/webgpu-adapter-info branch February 5, 2025 20:24
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

Successfully merging this pull request may close these issues.

Logging out webgpu adapater causes an assertion error WebGPU adapter.info call fails after device creation
2 participants