gpu: add RenderPipeline.Descriptor

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-11 17:17:48 -07:00 committed by Stephen Gutekanst
parent 48a3103bb9
commit 77810482bd
3 changed files with 19 additions and 10 deletions

View file

@ -1,3 +1,10 @@
const PipelineLayout = @import("PipelineLayout.zig");
const VertexState = @import("structs.zig").VertexState;
const PrimitiveState = @import("structs.zig").PrimitiveState;
const DepthStencilState = @import("structs.zig").DepthStencilState;
const MultisampleState = @import("structs.zig").MultisampleState;
const FragmentState = @import("structs.zig").FragmentState;
const RenderPipeline = @This();
/// The type erased pointer to the RenderPipeline implementation
@ -25,8 +32,19 @@ pub inline fn setLabel(pipeline: RenderPipeline, label: [:0]const u8) void {
pipeline.vtable.setLabel(pipeline.ptr, label);
}
pub const Descriptor = struct {
label: ?[*:0]const u8 = null,
layout: PipelineLayout,
vertex: VertexState,
primitive: PrimitiveState,
depth_stencil: *const DepthStencilState,
multisample: MultisampleState,
fragment: *const FragmentState,
};
test "syntax" {
_ = VTable;
_ = reference;
_ = release;
_ = Descriptor;
}