From 4ae4ef4e14ee0498be32c647704dc70513b9d3f0 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 16:27:16 -0700 Subject: [PATCH] gpu: add QuerySet.Descriptor Signed-off-by: Stephen Gutekanst --- gpu/src/QuerySet.zig | 10 ++++++++++ gpu/src/TODO | 9 --------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gpu/src/QuerySet.zig b/gpu/src/QuerySet.zig index 2117c71e..51d2cc66 100644 --- a/gpu/src/QuerySet.zig +++ b/gpu/src/QuerySet.zig @@ -1,3 +1,5 @@ +const PipelineStatistic = @import("enums.zig").PipelineStatistic; + const QuerySet = @This(); /// The type erased pointer to the QuerySet implementation @@ -28,9 +30,17 @@ pub inline fn destroy(qset: QuerySet) void { qset.vtable.destroy(qset.ptr); } +pub const Descriptor = struct { + label: ?[*:0]const u8 = null, + type: QueryType, + count: u32, + pipeline_statistics: []PipelineStatistic, +}; + test "syntax" { _ = VTable; _ = reference; _ = release; _ = destroy; + _ = Descriptor; } diff --git a/gpu/src/TODO b/gpu/src/TODO index fe3caee3..f4dc4bee 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -57,15 +57,6 @@ typedef struct WGPUDawnTogglesDeviceDescriptor { -typedef struct WGPUQuerySetDescriptor { - WGPUChainedStruct const * nextInChain; - char const * label; - WGPUQueryType type; - uint32_t count; - WGPUPipelineStatisticName const * pipelineStatistics; - uint32_t pipelineStatisticsCount; -} WGPUQuerySetDescriptor; - typedef struct WGPURenderBundleEncoderDescriptor { WGPUChainedStruct const * nextInChain; char const * label;