gpu: convert RenderPipeline from enum(usize) to *opaque
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
26d2aa0099
commit
cb8c874536
1 changed files with 10 additions and 15 deletions
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue