gpu: add type-safety for chaining PrimitiveDepthClipControl

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-16 20:16:16 -07:00
parent 52520d04ef
commit 9a36a74e49

View file

@ -571,14 +571,18 @@ pub const MultisampleState = extern struct {
alpha_to_coverage_enabled: bool = false,
};
/// TODO: Can be chained in gpu.PrimitiveState
pub const PrimitiveDepthClipControl = extern struct {
chain: ChainedStruct = .{ .next = null, .s_type = .primitive_depth_clip_control },
unclipped_depth: bool = false,
};
pub const PrimitiveState = extern struct {
next_in_chain: ?*const ChainedStruct = null,
pub const NextInChain = extern union {
generic: ?*const ChainedStruct,
primitive_depth_clip_control: *const PrimitiveDepthClipControl,
};
next_in_chain: NextInChain = .{ .generic = null },
topology: PrimitiveTopology = .triangle_list,
strip_index_format: IndexFormat = .undef,
front_face: FrontFace = .ccw,