From 1d8f6f9064565c585c5795fd805424c55e67e148 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 08:09:45 -0700 Subject: [PATCH] gpu: add Sampler.BindingType enum Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 8 -------- gpu/src/Sampler.zig | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 96096115..9cd6c19c 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,13 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUSamplerBindingType { - WGPUSamplerBindingType_Undefined = 0x00000000, - WGPUSamplerBindingType_Filtering = 0x00000001, - WGPUSamplerBindingType_NonFiltering = 0x00000002, - WGPUSamplerBindingType_Comparison = 0x00000003, - WGPUSamplerBindingType_Force32 = 0x7FFFFFFF -} WGPUSamplerBindingType; - typedef enum WGPUStencilOperation { WGPUStencilOperation_Keep = 0x00000000, WGPUStencilOperation_Zero = 0x00000001, diff --git a/gpu/src/Sampler.zig b/gpu/src/Sampler.zig index a690882d..90ba5ad2 100644 --- a/gpu/src/Sampler.zig +++ b/gpu/src/Sampler.zig @@ -5,3 +5,10 @@ pub const AddressMode = enum(u32) { mirror_repeat = 0x00000001, clamp_to_edge = 0x00000002, }; + +pub const BindingType = enum(u32) { + undef = 0x00000000, + filtering = 0x00000001, + non_filtering = 0x00000002, + comparison = 0x00000003, +};