gpu: add RenderPassDescriptor

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-16 21:03:20 -07:00 committed by Stephen Gutekanst
parent 8484d47e78
commit 2fa5e5adf4
2 changed files with 12 additions and 11 deletions

View file

@ -1,14 +1,3 @@
pub const WGPURenderPassDescriptor = extern struct {
next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
color_attachment_count: u32,
color_attachments: [*]const RenderPassColorAttachment,
depth_stencil_attachment: ?[*]const RenderPassDepthStencilAttachment = null, // nullable
occlusion_query_set: QuerySet = QuerySet.none, // nullable
timestamp_write_count: u32,
timestamp_writes: [*]const RenderPassTimestampWrite,
};
pub const VertexState = extern struct {
next_in_chain: *const ChainedStruct,
module: ShaderModule,

View file

@ -44,6 +44,7 @@ pub const LoadOp = @import("types.zig").LoadOp;
pub const StoreOp = @import("types.zig").StoreOp;
pub const RenderPassTimestampLocation = @import("types.zig").RenderPassTimestampLocation;
pub const PowerPreference = @import("types.zig").PowerPreference;
pub const RenderPassColorAttachment = @import("types.zig").RenderPassColorAttachment;
pub const ComputePassTimestampWrite = struct {
query_set: QuerySet,
@ -85,6 +86,17 @@ pub const ComputePassDescriptor = extern struct {
timestamp_writes: [*]const ComputePassTimestampWrite,
};
pub const RenderPassDescriptor = extern struct {
next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
color_attachment_count: u32,
color_attachments: [*]const RenderPassColorAttachment,
depth_stencil_attachment: ?[*]const RenderPassDepthStencilAttachment = null, // nullable
occlusion_query_set: QuerySet = QuerySet.none, // nullable
timestamp_write_count: u32,
timestamp_writes: [*]const RenderPassTimestampWrite,
};
test {
refAllDecls(@import("adapter.zig"));
refAllDecls(@import("bind_group.zig"));