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

WebGPU: Implement wgpuAdapterGetInfo on GPUAdapter.info #22031

Merged
merged 8 commits into from
Jun 11, 2024

Conversation

beaufortfrancois
Copy link
Contributor

This PR adds support for the upcoming GPUAdapter info attribute in Chromium. You can try the WIP CL at https://chromium-review.googlesource.com/c/chromium/src/+/5458182

image

@beaufortfrancois
Copy link
Contributor Author

@kainino0x Can you review when you have time?

FIXME: I don't know how to properly call _free() on string pointers in wgpuAdapterInfoFreeMembers

system/lib/webgpu/webgpu.cpp Outdated Show resolved Hide resolved
src/library_webgpu.js Outdated Show resolved Hide resolved
@beaufortfrancois
Copy link
Contributor Author

@kainino0x I believe we're in good shape now.

Copy link
Collaborator

@kainino0x kainino0x left a comment

Choose a reason for hiding this comment

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

LGTM!

@kainino0x kainino0x changed the title WebGPU: Add support for the GPUAdapter info attribute WebGPU: Implement wgpuAdapterGetInfo on GPUAdapter.info Jun 11, 2024
@kainino0x kainino0x merged commit 77f9840 into emscripten-core:main Jun 11, 2024
29 checks passed
@kainino0x
Copy link
Collaborator

Summary I wrote into the squash-and-merge commit:

Implements wgpuAdapterGetInfo(), the C equivalent of GPUAdapter.info.
Uses GPUAdapter.info (not GPUAdapter.requestAdapterInfo()), which is
new in the WebGPU spec, so this requires an updated browser.

wgpuAdapterGetProperties() still exists and still doesn't return any real info.

@kainino0x
Copy link
Collaborator

BTW the Chromium version for GPUAdapter.info is 127: https://chromiumdash.appspot.com/commit/9e908a7dca56215132ec7afc8962b18f993bbd2d

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.

4 participants