gfx-rs / wgpu-native

Native WebGPU implementation based on wgpu-core
Apache License 2.0
865 stars 103 forks source link

Autogenerated binary modules for C++ does not support StorageTextureAccess ReadOnly and ReadWrite #352

Closed SergeyLebedkin closed 8 months ago

SergeyLebedkin commented 8 months ago

In the original webgpu.h we can see structure as folow:

 typedef enum WGPUStorageTextureAccess {
     WGPUStorageTextureAccess_Undefined = 0x00000000,
     WGPUStorageTextureAccess_WriteOnly = 0x00000001,
     WGPUStorageTextureAccess_ReadOnly = 0x00000002,
     WGPUStorageTextureAccess_ReadWrite = 0x00000003,
     WGPUStorageTextureAccess_Force32 = 0x7FFFFFFF
 } WGPUStorageTextureAccess WGPU_ENUM_ATTRIBUTE;

but in a headers, which are supplied with binary C++ libraries there are no ReadOnly and ReadWrite items:

typedef enum WGPUStorageTextureAccess {
    WGPUStorageTextureAccess_Undefined = 0x00000000,
    WGPUStorageTextureAccess_WriteOnly = 0x00000001,
    WGPUStorageTextureAccess_Force32 = 0x7FFFFFFF
} WGPUStorageTextureAccess WGPU_ENUM_ATTRIBUTE;

Even if try to add them manualy, library fails down: invalid storage texture access for storage texture binding layout

rajveermalviya commented 8 months ago

The current release v0.18.1.4 only supports older version of webgpu.h. The trunk of wgpu-native already supports the newer webgpu.h, and a new release will happen this weekend.