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 {
|
pub const ComputePipelineDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
layout: PipelineLayout = PipelineLayout.none, // nullable
|
layout: ?PipelineLayout,
|
||||||
compute: ProgrammableStageDescriptor,
|
compute: ProgrammableStageDescriptor,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,11 @@
|
||||||
const ChainedStruct = @import("types.zig").ChainedStruct;
|
const ChainedStruct = @import("types.zig").ChainedStruct;
|
||||||
const BindGroupLayout = @import("bind_group_layout.zig").BindGroupLayout;
|
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 PipelineLayoutDescriptor = extern struct {
|
||||||
pub const none: PipelineLayout = @intToEnum(PipelineLayout, 0);
|
next_in_chain: *const ChainedStruct,
|
||||||
|
label: ?[*:0]const u8 = null,
|
||||||
pub const Descriptor = extern struct {
|
bind_group_layout_count: u32,
|
||||||
next_in_chain: *const ChainedStruct,
|
bind_group_layouts: [*]const BindGroupLayout,
|
||||||
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 {
|
pub const Descriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
layout: PipelineLayout = PipelineLayout.none, // nullable
|
layout: ?PipelineLayout,
|
||||||
vertex: VertexState,
|
vertex: VertexState,
|
||||||
primitive: PrimitiveState,
|
primitive: PrimitiveState,
|
||||||
depth_stencil: ?*const DepthStencilState = null, // nullable
|
depth_stencil: ?*const DepthStencilState = null, // nullable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue