diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 40e01af7..eb90309c 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -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, diff --git a/gpu/src/main.zig b/gpu/src/main.zig index d7361021..d87f98a7 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -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"));