From 3c3a9408339a21722d171352b793141b3c979f3d Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 07:51:04 -0700 Subject: [PATCH] gpu: add FilterMode enum Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 6 ------ gpu/src/types.zig | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index c18613db..c6a1d34d 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,11 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUFilterMode { - WGPUFilterMode_Nearest = 0x00000000, - WGPUFilterMode_Linear = 0x00000001, - WGPUFilterMode_Force32 = 0x7FFFFFFF -} WGPUFilterMode; - typedef enum WGPUFrontFace { WGPUFrontFace_CCW = 0x00000000, WGPUFrontFace_CW = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 5a6c2f13..78144629 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -128,6 +128,11 @@ pub const FeatureName = enum(u32) { chromium_experimental_dp4a = 0x000003ed, }; +pub const FilterMode = enum(u32) { + nearest = 0x00000000, + linear = 0x00000001, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }