From 58fe1b12f7101c595184c8f5275aca6286267f94 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 17:06:41 -0700 Subject: [PATCH] gpu: add RenderPassTimestampWrite Signed-off-by: Stephen Gutekanst --- gpu/src/TODO | 6 ------ gpu/src/main.zig | 1 + gpu/src/structs.zig | 8 ++++++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gpu/src/TODO b/gpu/src/TODO index 4f2c8863..5b64b77c 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -143,12 +143,6 @@ typedef struct WGPUPrimitiveDepthClampingState { bool clampDepth; } WGPUPrimitiveDepthClampingState; -typedef struct WGPURenderPassTimestampWrite { - WGPUQuerySet querySet; - uint32_t queryIndex; - WGPURenderPassTimestampLocation location; -} WGPURenderPassTimestampWrite; - typedef struct WGPURenderPassDepthStencilAttachment { WGPUTextureView view; WGPULoadOp depthLoadOp; diff --git a/gpu/src/main.zig b/gpu/src/main.zig index 763d97d4..be93738a 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -97,6 +97,7 @@ pub const DepthStencilState = @import("structs.zig").DepthStencilState; pub const ConstantEntry = @import("structs.zig").ConstantEntry; pub const ProgrammableStageDescriptor = @import("structs.zig").ProgrammableStageDescriptor; pub const ComputePassTimestampWrite = @import("structs.zig").ComputePassTimestampWrite; +pub const RenderPassTimestampWrite = @import("structs.zig").RenderPassTimestampWrite; // Enumerations pub const Feature = @import("enums.zig").Feature; diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index 24992d37..e2719420 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -14,6 +14,7 @@ const CullMode = @import("enums.zig").CullMode; const StorageTextureAccess = @import("enums.zig").StorageTextureAccess; const CompareFunction = @import("enums.zig").CompareFunction; const ComputePassTimestampLocation = @import("enums.zig").ComputePassTimestampLocation; +const RenderPassTimestampLocation = @import("enums.zig").RenderPassTimestampLocation; pub const CompilationMessage = struct { message: [:0]const u8, @@ -79,6 +80,12 @@ pub const ComputePassTimestampWrite = struct { location: ComputePassTimestampLocation, }; +pub const RenderPassTimestampWrite = struct { + query_set: QuerySet, + query_index: u32, + location: RenderPassTimestampLocation, +}; + test "syntax" { _ = CompilationMessage; _ = CompilationInfo; @@ -89,4 +96,5 @@ test "syntax" { _ = ConstantEntry; _ = ProgrammableStageDescriptor; _ = ComputePassTimestampWrite; + _ = RenderPassTimestampWrite; }