gpu: internalize RenderPipeline types

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-29 23:56:14 -07:00 committed by Stephen Gutekanst
parent 0fac1d9336
commit 550c5fd55e
3 changed files with 19 additions and 20 deletions

View file

@ -9,6 +9,17 @@ const BindGroupLayout = @import("bind_group_layout.zig").BindGroupLayout;
const Impl = @import("interface.zig").Impl;
pub const RenderPipeline = opaque {
pub const Descriptor = extern struct {
next_in_chain: ?*const ChainedStruct = null,
label: ?[*:0]const u8 = null,
layout: ?*PipelineLayout,
vertex: VertexState,
primitive: PrimitiveState,
depth_stencil: ?*const DepthStencilState,
multisample: MultisampleState,
fragment: ?*const FragmentState,
};
pub inline fn getBindGroupLayout(render_pipeline: *RenderPipeline, group_index: u32) *BindGroupLayout {
return Impl.renderPipelineGetBindGroupLayout(render_pipeline, group_index);
}
@ -25,14 +36,3 @@ pub const RenderPipeline = opaque {
Impl.renderPipelineRelease(render_pipeline);
}
};
pub const RenderPipelineDescriptor = extern struct {
next_in_chain: ?*const ChainedStruct = null,
label: ?[*:0]const u8 = null,
layout: ?*PipelineLayout,
vertex: VertexState,
primitive: PrimitiveState,
depth_stencil: ?*const DepthStencilState,
multisample: MultisampleState,
fragment: ?*const FragmentState,
};