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

BREAKING(webgpu/unstable): Replace async .requestAdapterInfo() with sync .info #24783

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

littledivy
Copy link
Member

@littledivy littledivy changed the title BREAKING(unstable/webgpu): Replace async .requestAdapterInfo() with sync .info BREAKING(webgpu/unstable): Replace async .requestAdapterInfo() with sync .info Jul 29, 2024
@littledivy littledivy requested a review from crowlKats July 29, 2024 14:55
@@ -525,7 +525,7 @@ class GPUAdapter {
adapterInfo[_architecture] = architecture;
adapterInfo[_device] = device;
adapterInfo[_description] = description;
return PromiseResolve(adapterInfo);
return adapterInfo;
Copy link
Contributor

Choose a reason for hiding this comment

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

Because of the [SameObject] attribute, the info object must be cached as well as features and limits.

Copy link
Member

Choose a reason for hiding this comment

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

@petamoriken can you open an issue for features and limits?

Copy link
Contributor

@petamoriken petamoriken Aug 6, 2024

Choose a reason for hiding this comment

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

Sorry for my bad English, I meant to say that features and limits are already cached and info should be too 😅

Copy link
Member

Choose a reason for hiding this comment

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

ah my bad, i thought they werent!

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.

LGTM

@littledivy littledivy merged commit c0e9512 into denoland:main Aug 6, 2024
17 checks passed
@littledivy littledivy deleted the replace_requestadapterinfo branch August 6, 2024 10:00
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.

WebGPU: Replace asynchronous .requestAdapterInfo() with synchronous .info
3 participants