Skip to content

Add missing bindingArraySize field#7

Open
jakubmaniak wants to merge 1 commit into
kommander:mainfrom
jakubmaniak:bind-layout-struct
Open

Add missing bindingArraySize field#7
jakubmaniak wants to merge 1 commit into
kommander:mainfrom
jakubmaniak:bind-layout-struct

Conversation

@jakubmaniak

Copy link
Copy Markdown

Add missing bindingArraySize field

According to the WebGPU native headers, WGPUBindGroupLayoutEntry includes the bindingArraySize field:

https://github.com/webgpu-native/webgpu-headers/blob/main/webgpu.h#L3643

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;
    WGPUSamplerBindingLayout sampler;
    WGPUTextureBindingLayout texture;
    WGPUStorageTextureBindingLayout storageTexture;
} WGPUBindGroupLayoutEntry WGPU_STRUCTURE_ATTRIBUTE;

This change may also help resolve the issue described in existing comment in the code.

Tested on:

  • Windows 10 (x86_64)
  • Windows 11 (x86_64)
  • Linux Mint 22.3 (x86_64)

macOS has not been tested yet.

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

Successfully merging this pull request may close these issues.

1 participant