From 3a4abcef6fd524394612ff03f758288f1cfbe73e Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 10 Jul 2022 22:08:36 -0700 Subject: [PATCH] gpu: add CompareFunction enum Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 13 ------------- gpu/src/types.zig | 12 ++++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index e3d4683f..5846520f 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,18 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUCompareFunction { - WGPUCompareFunction_Undefined = 0x00000000, - WGPUCompareFunction_Never = 0x00000001, - WGPUCompareFunction_Less = 0x00000002, - WGPUCompareFunction_LessEqual = 0x00000003, - WGPUCompareFunction_Greater = 0x00000004, - WGPUCompareFunction_GreaterEqual = 0x00000005, - WGPUCompareFunction_Equal = 0x00000006, - WGPUCompareFunction_NotEqual = 0x00000007, - WGPUCompareFunction_Always = 0x00000008, - WGPUCompareFunction_Force32 = 0x7FFFFFFF -} WGPUCompareFunction; - typedef enum WGPUCompilationInfoRequestStatus { WGPUCompilationInfoRequestStatus_Success = 0x00000000, WGPUCompilationInfoRequestStatus_Error = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 9acedadc..da531750 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -50,3 +50,15 @@ pub const BlendOperation = enum(u32) { min = 0x00000003, max = 0x00000004, }; + +pub const CompareFunction = enum(u32) { + undef = 0x00000000, + never = 0x00000001, + less = 0x00000002, + less_equal = 0x00000003, + greater = 0x00000004, + greater_equal = 0x00000005, + equal = 0x00000006, + not_equal = 0x00000007, + always = 0x00000008, +};