From 52c22e0ff2af487e760cb371f1fe8c38eea57a0d Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 16:45:58 -0700 Subject: [PATCH] gpu: add ComputePassEncoder.Descriptor Signed-off-by: Stephen Gutekanst --- gpu/src/ComputePassEncoder.zig | 8 ++++++++ gpu/src/TODO | 7 ------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gpu/src/ComputePassEncoder.zig b/gpu/src/ComputePassEncoder.zig index 1ea4fd22..ff50dd18 100644 --- a/gpu/src/ComputePassEncoder.zig +++ b/gpu/src/ComputePassEncoder.zig @@ -1,3 +1,5 @@ +const ComputePassTimestampWrite = @import("structs.zig").ComputePassTimestampWrite; + const ComputePassEncoder = @This(); /// The type erased pointer to the ComputePassEncoder implementation @@ -34,8 +36,14 @@ pub inline fn setLabel(enc: ComputePassEncoder, label: [:0]const u8) void { enc.vtable.setLabel(enc.ptr, label); } +pub const Descriptor = struct { + label: ?[*:0]const u8 = null, + timestamp_writes: []const ComputePassTimestampWrite, +}; + test "syntax" { _ = VTable; _ = reference; _ = release; + _ = Descriptor; } diff --git a/gpu/src/TODO b/gpu/src/TODO index 8347ca3c..d9b275ab 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -57,13 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor { -typedef struct WGPUComputePassDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - uint32_t timestampWriteCount; - WGPUComputePassTimestampWrite const * timestampWrites; -} WGPUComputePassDescriptor; - typedef struct WGPUProgrammableStageDescriptor { WGPUChainedStruct const * nextInChain; WGPUShaderModule module;