From 4ff2e96efd97716bda19733e50adba996de22409 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 24 Jul 2022 14:55:00 -0700 Subject: [PATCH] gpu: convert RenderBundleEncoder from enum(usize) to *opaque Signed-off-by: Stephen Gutekanst --- gpu/src/render_bundle_encoder.zig | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/gpu/src/render_bundle_encoder.zig b/gpu/src/render_bundle_encoder.zig index 6248cc8d..40aa95dc 100644 --- a/gpu/src/render_bundle_encoder.zig +++ b/gpu/src/render_bundle_encoder.zig @@ -1,20 +1,15 @@ const ChainedStruct = @import("types.zig").ChainedStruct; const Texture = @import("texture.zig").Texture; -pub const RenderBundleEncoder = enum(usize) { - _, +pub const RenderBundleEncoder = *opaque {}; - // TODO: verify there is a use case for nullable value of this type. - pub const none: RenderBundleEncoder = @intToEnum(RenderBundleEncoder, 0); - - pub const Descriptor = extern struct { - next_in_chain: *const ChainedStruct, - label: ?[*:0]const u8 = null, - color_formats_count: u32, - color_formats: [*]const Texture.Format, - depth_stencil_format: Texture.Format, - sample_count: u32, - depth_read_only: bool, - stencil_read_only: bool, - }; +pub const RenderBundleEncoderDescriptor = extern struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, + color_formats_count: u32, + color_formats: [*]const Texture.Format, + depth_stencil_format: Texture.Format, + sample_count: u32, + depth_read_only: bool, + stencil_read_only: bool, };