From 9fd454407a521ba4f08a8c65b450f4afc2947fd0 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 24 Jul 2022 14:50:18 -0700 Subject: [PATCH] gpu: convert ComputePipeline from enum(usize) to *opaque Signed-off-by: Stephen Gutekanst --- gpu/src/compute_pipeline.zig | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/gpu/src/compute_pipeline.zig b/gpu/src/compute_pipeline.zig index 9ed854bd..150eb0b3 100644 --- a/gpu/src/compute_pipeline.zig +++ b/gpu/src/compute_pipeline.zig @@ -2,16 +2,11 @@ const ChainedStruct = @import("types.zig").ChainedStruct; const ProgrammableStageDescriptor = @import("types.zig").ProgrammableStageDescriptor; const PipelineLayout = @import("pipeline_layout.zig").PipelineLayout; -pub const ComputePipeline = enum(usize) { - _, +pub const ComputePipeline = *opaque {}; - // TODO: verify there is a use case for nullable value of this type. - pub const none: ComputePipeline = @intToEnum(ComputePipeline, 0); - - pub const Descriptor = extern struct { - next_in_chain: *const ChainedStruct, - label: ?[*:0]const u8 = null, - layout: PipelineLayout = PipelineLayout.none, // nullable - compute: ProgrammableStageDescriptor, - }; +pub const ComputePipelineDescriptor = extern struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, + layout: PipelineLayout = PipelineLayout.none, // nullable + compute: ProgrammableStageDescriptor, };