From 9b1bee04fdacb339f0726894de6ec87b41d1fce0 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 07:57:31 -0700 Subject: [PATCH] gpu: add QueryType enum Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 7 ------- gpu/src/types.zig | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index b5241fcf..7c55dcd8 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,12 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUQueryType { - WGPUQueryType_Occlusion = 0x00000000, - WGPUQueryType_PipelineStatistics = 0x00000001, - WGPUQueryType_Timestamp = 0x00000002, - WGPUQueryType_Force32 = 0x7FFFFFFF -} WGPUQueryType; - typedef enum WGPUQueueWorkDoneStatus { WGPUQueueWorkDoneStatus_Success = 0x00000000, WGPUQueueWorkDoneStatus_Error = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 8c07c457..d6dacc48 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -185,6 +185,12 @@ pub const PrimitiveTopology = enum(u32) { triangle_strip = 0x00000004, }; +pub const QueryType = enum(u32) { + occlusion = 0x00000000, + pipeline_statistics = 0x00000001, + timestamp = 0x00000002, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }