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 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 none: RenderPipeline = @intToEnum(RenderPipeline, 0);
pub const Descriptor = extern struct {
next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
layout: ?PipelineLayout,
vertex: VertexState,
primitive: PrimitiveState,
depth_stencil: ?*const DepthStencilState = null, // nullable
multisample: MultisampleState,
fragment: ?*const FragmentState = null, // nullable
};
pub const RenderPipelineDescriptor = extern struct {
next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
layout: ?PipelineLayout,
vertex: VertexState,
primitive: PrimitiveState,
depth_stencil: ?*const DepthStencilState = null, // nullable
multisample: MultisampleState,
fragment: ?*const FragmentState = null, // nullable
};