gpu: convert RenderPipeline from enum(usize) to *opaque

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-24 14:56:10 -07:00 committed by Stephen Gutekanst
parent 26d2aa0099
commit cb8c874536

View file

@ -6,20 +6,15 @@ const PrimitiveState = @import("types.zig").PrimitiveState;
const FragmentState = @import("types.zig").FragmentState; const FragmentState = @import("types.zig").FragmentState;
const PipelineLayout = @import("pipeline_layout.zig").PipelineLayout; const PipelineLayout = @import("pipeline_layout.zig").PipelineLayout;
pub const RenderPipeline = enum(usize) { pub const RenderPipeline = *opaque {};
_,
// TODO: verify there is a use case for nullable value of this type. pub const RenderPipelineDescriptor = extern struct {
pub const none: RenderPipeline = @intToEnum(RenderPipeline, 0); next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
pub const Descriptor = extern struct { layout: ?PipelineLayout,
next_in_chain: *const ChainedStruct, vertex: VertexState,
label: ?[*:0]const u8 = null, primitive: PrimitiveState,
layout: ?PipelineLayout, depth_stencil: ?*const DepthStencilState = null, // nullable
vertex: VertexState, multisample: MultisampleState,
primitive: PrimitiveState, fragment: ?*const FragmentState = null, // nullable
depth_stencil: ?*const DepthStencilState = null, // nullable
multisample: MultisampleState,
fragment: ?*const FragmentState = null, // nullable
};
}; };