Skip to content

Commit 504373d

Browse files
authored
[breaking] Add binding arrays to WGPUBindGroupLayoutEntry (#530)
Based on https://github.com/gpuweb/gpuweb/blob/main/proposals/sized-binding-arrays.md - [x] but with: gpuweb/gpuweb#5174 Fixes #387 (dawn issue https://crbug.com/415092021)
1 parent c1ae594 commit 504373d

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

webgpu.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3767,6 +3767,12 @@ typedef struct WGPUBindGroupLayoutEntry {
37673767
* The `INIT` macro sets this to @ref WGPUShaderStage_None.
37683768
*/
37693769
WGPUShaderStage visibility;
3770+
/**
3771+
* If non-zero, this entry defines a binding array with this size.
3772+
*
3773+
* The `INIT` macro sets this to `0`.
3774+
*/
3775+
uint32_t bindingArraySize;
37703776
/**
37713777
* The `INIT` macro sets this to zero (which sets the entry to `BindingNotUsed`).
37723778
*/
@@ -3792,6 +3798,7 @@ typedef struct WGPUBindGroupLayoutEntry {
37923798
/*.nextInChain=*/NULL _wgpu_COMMA \
37933799
/*.binding=*/0 _wgpu_COMMA \
37943800
/*.visibility=*/WGPUShaderStage_None _wgpu_COMMA \
3801+
/*.bindingArraySize=*/0 _wgpu_COMMA \
37953802
/*.buffer=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \
37963803
/*.sampler=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \
37973804
/*.texture=*/_wgpu_STRUCT_ZERO_INIT _wgpu_COMMA \

webgpu.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,10 @@ structs:
16811681
TODO
16821682
type: bitflag.shader_stage
16831683
default: none
1684+
- name: binding_array_size
1685+
doc: |
1686+
If non-zero, this entry defines a binding array with this size.
1687+
type: uint32
16841688
- name: buffer
16851689
doc: |
16861690
TODO

0 commit comments

Comments
 (0)