Skip to content

Definition of struct bindGroupLayoutEntryWire is wrong #34

Description

@Tnze

This is our definition:

webgpu/wgpu/bindgroup.go

Lines 101 to 110 in 907b82e

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;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions