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

Incompatible WGPUSType declaration in release webgpu.h #428

Closed
EricGrange opened this issue Sep 21, 2024 · 2 comments
Closed

Incompatible WGPUSType declaration in release webgpu.h #428

EricGrange opened this issue Sep 21, 2024 · 2 comments

Comments

@EricGrange
Copy link

In the release include webgpu.h (at least v22.1.0.5 wgpu-windows-x86_64-gnu-release), the WGPUSType are defined like

typedef enum WGPUSType {
    WGPUSType_Invalid = 0x00000000,
    WGPUSType_SurfaceDescriptorFromMetalLayer = 0x00000001,
    WGPUSType_SurfaceDescriptorFromWindowsHWND = 0x00000002,
    WGPUSType_SurfaceDescriptorFromXlibWindow = 0x00000003,

which doesn't match the webgpu-native declaration (https://raw.githubusercontent.com/webgpu-native/webgpu-headers/refs/heads/main/webgpu.h) nor the Dawn declaration (which has the same declaraion as webgpu-native)

typedef enum WGPUSType {
    WGPUSType_Invalid = 0x00000000,
    WGPUSType_ShaderSourceSPIRV = 0x00000001,
    WGPUSType_ShaderSourceWGSL = 0x00000002,
    WGPUSType_RenderPassMaxDrawCount = 0x00000003,
    WGPUSType_SurfaceSourceMetalLayer = 0x00000004,
    WGPUSType_SurfaceSourceWindowsHWND = 0x00000005,

Additionally when trying to call wgpuInstanceCreateSurface with a WGPUSType_SurfaceDescriptorFromWindowsHWND in the surface descriptor chain, and using the standard webgpu.h declaration, this results in a fault.

@almarklein
Copy link
Collaborator

It generally takes a little while for wgpu-native to catch up to changes in webgpu.h(which is developed in a different repo). See e.g. a catchup in progress in #427. The released library should match the webgpu.h that's also in the release archive.

@EricGrange
Copy link
Author

Thanks. I hadn't noticed that particular section of webgpu.h had been reorganized so recently.

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

No branches or pull requests

2 participants