From 792e64906f9c7c2b6cb32cf2ef8d0cc886c8e3ab Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 07:55:42 -0700 Subject: [PATCH] gpu: add PowerPreference 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 0dc9bb37..f8ec9f2d 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,12 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUPowerPreference { - WGPUPowerPreference_Undefined = 0x00000000, - WGPUPowerPreference_LowPower = 0x00000001, - WGPUPowerPreference_HighPerformance = 0x00000002, - WGPUPowerPreference_Force32 = 0x7FFFFFFF -} WGPUPowerPreference; - typedef enum WGPUPresentMode { WGPUPresentMode_Immediate = 0x00000000, WGPUPresentMode_Mailbox = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 41250532..fea39f2c 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -165,6 +165,12 @@ pub const PipelineStatisticName = enum(u32) { compute_shader_invocations = 0x00000004, }; +pub const PowerPreference = enum(u32) { + undef = 0x00000000, + low_power = 0x00000001, + high_performance = 0x00000002, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }