gpu: add BindGroupLayout.Descriptor

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 16:57:38 -07:00 committed by Stephen Gutekanst
parent 13fcf98436
commit 7fa2bb3754
2 changed files with 7 additions and 7 deletions

View file

@ -29,6 +29,12 @@ pub inline fn setLabel(group: BindGroupLayout, label: [:0]const u8) void {
group.vtable.setLabel(group.ptr, label); group.vtable.setLabel(group.ptr, label);
} }
pub const Descriptor = struct {
label: ?[*:0]const u8 = null,
entries: []const Entry,
};
// TODO: can this be extern struct / ABI compatible?
pub const Entry = struct { pub const Entry = struct {
binding: u32, binding: u32,
visibility: ShaderStage, visibility: ShaderStage,
@ -43,5 +49,6 @@ test "syntax" {
_ = reference; _ = reference;
_ = release; _ = release;
_ = setLabel; _ = setLabel;
_ = Descriptor;
_ = Entry; _ = Entry;
} }

View file

@ -57,13 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor {
typedef struct WGPUBindGroupLayoutDescriptor {
WGPUChainedStruct const * nextInChain;
char const * label;
uint32_t entryCount;
WGPUBindGroupLayoutEntry const * entries;
} WGPUBindGroupLayoutDescriptor;
typedef struct WGPUComputePipelineDescriptor { typedef struct WGPUComputePipelineDescriptor {
WGPUChainedStruct const * nextInChain; WGPUChainedStruct const * nextInChain;
char const * label; char const * label;