gpu: convert PipelineLayout from enum(usize) to *opaque
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
1d07d1784e
commit
d50bc3527b
3 changed files with 8 additions and 13 deletions
|
|
@ -7,6 +7,6 @@ pub const ComputePipeline = *opaque {};
|
|||
pub const ComputePipelineDescriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
layout: PipelineLayout = PipelineLayout.none, // nullable
|
||||
layout: ?PipelineLayout,
|
||||
compute: ProgrammableStageDescriptor,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,16 +1,11 @@
|
|||
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||
const BindGroupLayout = @import("bind_group_layout.zig").BindGroupLayout;
|
||||
|
||||
pub const PipelineLayout = enum(usize) {
|
||||
_,
|
||||
pub const PipelineLayout = *opaque {};
|
||||
|
||||
// TODO: verify there is a use case for nullable value of this type.
|
||||
pub const none: PipelineLayout = @intToEnum(PipelineLayout, 0);
|
||||
|
||||
pub const Descriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
bind_group_layout_count: u32,
|
||||
bind_group_layouts: [*]const BindGroupLayout,
|
||||
};
|
||||
pub const PipelineLayoutDescriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
bind_group_layout_count: u32,
|
||||
bind_group_layouts: [*]const BindGroupLayout,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ pub const RenderPipeline = enum(usize) {
|
|||
pub const Descriptor = extern struct {
|
||||
next_in_chain: *const ChainedStruct,
|
||||
label: ?[*:0]const u8 = null,
|
||||
layout: PipelineLayout = PipelineLayout.none, // nullable
|
||||
layout: ?PipelineLayout,
|
||||
vertex: VertexState,
|
||||
primitive: PrimitiveState,
|
||||
depth_stencil: ?*const DepthStencilState = null, // nullable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue