From 7fa2bb3754194e9f32057b1afed4c68d098a3390 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 16:57:38 -0700 Subject: [PATCH] gpu: add BindGroupLayout.Descriptor Signed-off-by: Stephen Gutekanst --- gpu/src/BindGroupLayout.zig | 7 +++++++ gpu/src/TODO | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gpu/src/BindGroupLayout.zig b/gpu/src/BindGroupLayout.zig index a1a3de65..7f76b261 100644 --- a/gpu/src/BindGroupLayout.zig +++ b/gpu/src/BindGroupLayout.zig @@ -29,6 +29,12 @@ pub inline fn setLabel(group: BindGroupLayout, label: [:0]const u8) void { 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 { binding: u32, visibility: ShaderStage, @@ -43,5 +49,6 @@ test "syntax" { _ = reference; _ = release; _ = setLabel; + _ = Descriptor; _ = Entry; } diff --git a/gpu/src/TODO b/gpu/src/TODO index 3e24b5b8..d1fac777 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -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 { WGPUChainedStruct const * nextInChain; char const * label;