From 48a3103bb9db017513052097aec27b07c2127e21 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 17:12:05 -0700 Subject: [PATCH] gpu: add RenderPassColorAttachment Signed-off-by: Stephen Gutekanst --- gpu/src/TODO | 9 --------- gpu/src/main.zig | 1 + gpu/src/structs.zig | 9 +++++++++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gpu/src/TODO b/gpu/src/TODO index 10e261de..e99619ad 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -143,15 +143,6 @@ typedef struct WGPUPrimitiveDepthClampingState { bool clampDepth; } WGPUPrimitiveDepthClampingState; -typedef struct WGPURenderPassColorAttachment { - WGPUTextureView view; - WGPUTextureView resolveTarget; - WGPULoadOp loadOp; - WGPUStoreOp storeOp; - WGPUColor clearColor; - WGPUColor clearValue; -} WGPURenderPassColorAttachment; - diff --git a/gpu/src/main.zig b/gpu/src/main.zig index 4a77d03c..418b4f1e 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -99,6 +99,7 @@ pub const ProgrammableStageDescriptor = @import("structs.zig").ProgrammableStage pub const ComputePassTimestampWrite = @import("structs.zig").ComputePassTimestampWrite; pub const RenderPassTimestampWrite = @import("structs.zig").RenderPassTimestampWrite; pub const RenderPassDepthStencilAttachment = @import("structs.zig").RenderPassDepthStencilAttachment; +pub const RenderPassColorAttachment = @import("structs.zig").RenderPassColorAttachment; // Enumerations pub const Feature = @import("enums.zig").Feature; diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index 34c99fc1..a89fc441 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -102,6 +102,14 @@ pub const RenderPassDepthStencilAttachment = struct { stencil_read_only: bool, }; +pub const RenderPassColorAttachment = struct { + view: TextureView, + resolve_target: TextureView, + load_op: LoadOp, + store_op: StoreOp, + clear_value: Color, +}; + test "syntax" { _ = CompilationMessage; _ = CompilationInfo; @@ -114,4 +122,5 @@ test "syntax" { _ = ComputePassTimestampWrite; _ = RenderPassTimestampWrite; _ = RenderPassDepthStencilAttachment; + _ = RenderPassColorAttachment; }