gpu: add RenderPipeline.Descriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
48a3103bb9
commit
77810482bd
3 changed files with 19 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
10
gpu/src/TODO
10
gpu/src/TODO
|
|
@ -57,16 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor {
|
|||
|
||||
|
||||
|
||||
typedef struct WGPURenderPipelineDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
WGPUPipelineLayout layout;
|
||||
WGPUVertexState vertex;
|
||||
WGPUPrimitiveState primitive;
|
||||
WGPUDepthStencilState const * depthStencil;
|
||||
WGPUMultisampleState multisample;
|
||||
WGPUFragmentState const * fragment;
|
||||
} WGPURenderPipelineDescriptor;
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ const TextureView = @import("TextureView.zig");
|
|||
const ShaderModule = @import("ShaderModule.zig");
|
||||
const QuerySet = @import("QuerySet.zig");
|
||||
const StencilFaceState = @import("data.zig").StencilFaceState;
|
||||
const Color = @import("data.zig").Color;
|
||||
const CompilationMessageType = @import("enums.zig").CompilationMessageType;
|
||||
const PrimitiveTopology = @import("enums.zig").PrimitiveTopology;
|
||||
const IndexFormat = @import("enums.zig").IndexFormat;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue