From 9398df021117ad3f4b8143a7dcfe311fac98b337 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 16:42:25 -0700 Subject: [PATCH] gpu: add BindGroup.Descriptor Signed-off-by: Stephen Gutekanst --- gpu/src/BindGroup.zig | 8 ++++++++ gpu/src/TODO | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gpu/src/BindGroup.zig b/gpu/src/BindGroup.zig index ec29f67c..f3b858c6 100644 --- a/gpu/src/BindGroup.zig +++ b/gpu/src/BindGroup.zig @@ -1,6 +1,7 @@ const Buffer = @import("Buffer.zig"); const Sampler = @import("Sampler.zig"); const TextureView = @import("TextureView.zig"); +const BindGroupLayout = @import("BindGroupLayout.zig"); const BindGroup = @This(); @@ -36,10 +37,17 @@ pub const Entry = struct { texture_view: TextureView, }; +pub const Descriptor = struct { + label: ?[*:0]const u8 = null, + layout: BindGroupLayout, + entries: []const Entry, +}; + test "syntax" { _ = VTable; _ = reference; _ = release; _ = setLabel; _ = Entry; + _ = Descriptor; } diff --git a/gpu/src/TODO b/gpu/src/TODO index 7c278856..8347ca3c 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -57,14 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor { -typedef struct WGPUBindGroupDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUBindGroupLayout layout; - uint32_t entryCount; - WGPUBindGroupEntry const * entries; -} WGPUBindGroupDescriptor; - typedef struct WGPUComputePassDescriptor { WGPUChainedStruct const * nextInChain; char const * label;