-
Notifications
You must be signed in to change notification settings - Fork 105
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: Get correct adapter info consistent with wgpuAdapterGetProperties
#418
Fix: Get correct adapter info consistent with wgpuAdapterGetProperties
#418
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching it and pursuing to fix it!
LGTM!
Co-authored-by: Rajesh Malviya <rajveer0malviya@gmail.com>
I pushed a new tag/release. |
So, there are explicit fields for I attempted to check what Dawn maps these strings to and discovered that wgpu-native and Dawn are results are similar:
|
Aha, thanks for the explanation. I am/was a in part confused by the WebGPU docs saying "'device' is a string that may be a PCI device ID.". That "may" is important, because in our case its not 😉 edit: In wgpu-py we need to map this to a WebGPU compliant dict, and this part feels like its not yet well-defined yet |
Yeah I saw that too, it's probably to prevent fingerprinting. |
The PCI ID is given by While creating this PR I had to do a double take and match up with Dawn to check if I was correct or not. 😂 As for the |
wgpuAdapterGetInfo
was returning incorrect adapter info, which was inconsistent with the previous version (wgpuAdapterGetProperties
).With
wgpuAdapterGetProperties
:With
wgpuAdapterGetInfo
:This is what
AdapterInfo
struct contains:And this is the output after my patch:
All outputs were fetched from C++.