From c0d782bd9c26871e3cb8e642251e54f23e95f670 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 16 Jul 2022 19:55:41 -0700 Subject: [PATCH] gpu: add RenderBundle.Descriptor Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 5 ----- gpu/src/render_bundle.zig | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index f879bdb3..a4602188 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,8 +1,3 @@ -pub const WGPURenderBundleDescriptor = extern struct { - next_in_chain: *const ChainedStruct, - label: ?[*:0]const u8 = null, -}; - pub const WGPURenderBundleEncoderDescriptor = extern struct { next_in_chain: *const ChainedStruct, label: ?[*:0]const u8 = null, diff --git a/gpu/src/render_bundle.zig b/gpu/src/render_bundle.zig index a194b954..4e66e00f 100644 --- a/gpu/src/render_bundle.zig +++ b/gpu/src/render_bundle.zig @@ -1,6 +1,13 @@ +const ChainedStruct = @import("types.zig").ChainedStruct; + pub const RenderBundle = enum(usize) { _, // TODO: verify there is a use case for nullable value of this type. pub const none: RenderBundle = @intToEnum(RenderBundle, 0); + + pub const Descriptor = extern struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, + }; };