From 71e6049ada689fb20a4eb224bfe2199be4a7220e Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 07:53:09 -0700 Subject: [PATCH] gpu: add IndexFormat 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 b3634fcf..18d00e56 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,12 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUIndexFormat { - WGPUIndexFormat_Undefined = 0x00000000, - WGPUIndexFormat_Uint16 = 0x00000001, - WGPUIndexFormat_Uint32 = 0x00000002, - WGPUIndexFormat_Force32 = 0x7FFFFFFF -} WGPUIndexFormat; - typedef enum WGPULoadOp { WGPULoadOp_Undefined = 0x00000000, WGPULoadOp_Clear = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 26dfb44a..63099256 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -138,6 +138,12 @@ pub const FrontFace = enum(u32) { cw = 0x00000001, }; +pub const IndexFormat = enum(u32) { + undef = 0x00000000, + uint16 = 0x00000001, + uint32 = 0x00000002, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }