From 327b0f92578396e6069b4386921cad2a0196020e Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 07:56:07 -0700 Subject: [PATCH] gpu: add PresentMode 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 f8ec9f2d..cb0f5fdd 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,12 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUPresentMode { - WGPUPresentMode_Immediate = 0x00000000, - WGPUPresentMode_Mailbox = 0x00000001, - WGPUPresentMode_Fifo = 0x00000002, - WGPUPresentMode_Force32 = 0x7FFFFFFF -} WGPUPresentMode; - typedef enum WGPUPrimitiveTopology { WGPUPrimitiveTopology_PointList = 0x00000000, WGPUPrimitiveTopology_LineList = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index fea39f2c..0c348992 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -171,6 +171,12 @@ pub const PowerPreference = enum(u32) { high_performance = 0x00000002, }; +pub const PresentMode = enum(u32) { + immediate = 0x00000000, + mailbox = 0x00000001, + fifo = 0x00000002, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }