This is our definition:
|
type bindGroupLayoutEntryWire struct { |
|
NextInChain uintptr |
|
Binding uint32 |
|
_pad [4]byte // padding to align Visibility to 8 bytes |
|
Visibility uint64 // WGPUShaderStageFlags = uint64 in wgpu-native! |
|
Buffer bufferBindingLayoutWire |
|
Sampler samplerBindingLayoutWire |
|
Texture textureBindingLayoutWire |
|
StorageTexture storageTextureBindingLayoutWire |
|
} |
And this is the original header file:
https://github.com/webgpu-native/webgpu-headers/blob/7d3186c3dd2c708703524027b46b8703534ab3cc/webgpu.h#L3625
The field bindingArraySize is missing, causing the library panicing with invalid bind group layout entry for bind group layout descriptor
typedef struct WGPUBindGroupLayoutEntry {
WGPUChainedStruct * nextInChain;
/**
* The `INIT` macro sets this to `0`.
*/
uint32_t binding;
/**
* The `INIT` macro sets this to @ref WGPUShaderStage_None.
*/
WGPUShaderStage visibility;
/**
* If non-zero, this entry defines a binding array with this size.
*
* The `INIT` macro sets this to `0`.
*/
uint32_t bindingArraySize;
/**
* The `INIT` macro sets this to zero (which sets the entry to `BindingNotUsed`).
*/
WGPUBufferBindingLayout buffer;
/**
* The `INIT` macro sets this to zero (which sets the entry to `BindingNotUsed`).
*/
WGPUSamplerBindingLayout sampler;
/**
* The `INIT` macro sets this to zero (which sets the entry to `BindingNotUsed`).
*/
WGPUTextureBindingLayout texture;
/**
* The `INIT` macro sets this to zero (which sets the entry to `BindingNotUsed`).
*/
WGPUStorageTextureBindingLayout storageTexture;
} WGPUBindGroupLayoutEntry WGPU_STRUCTURE_ATTRIBUTE;
This is our definition:
webgpu/wgpu/bindgroup.go
Lines 101 to 110 in 907b82e
And this is the original header file:
https://github.com/webgpu-native/webgpu-headers/blob/7d3186c3dd2c708703524027b46b8703534ab3cc/webgpu.h#L3625
The field
bindingArraySizeis missing, causing the library panicing withinvalid bind group layout entry for bind group layout descriptor