From c91d969c7b5edb83a24df89a235eab481bf98e2c Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 08:11:45 -0700 Subject: [PATCH] gpu: add StoreOp 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 dafcaea1..3c7ec015 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,12 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUStoreOp { - WGPUStoreOp_Undefined = 0x00000000, - WGPUStoreOp_Store = 0x00000001, - WGPUStoreOp_Discard = 0x00000002, - WGPUStoreOp_Force32 = 0x7FFFFFFF -} WGPUStoreOp; - typedef enum WGPUTextureAspect { WGPUTextureAspect_All = 0x00000000, WGPUTextureAspect_StencilOnly = 0x00000001, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 571c320f..8716bd1e 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -249,6 +249,12 @@ pub const StorageTextureAccess = enum(u32) { write_only = 0x00000001, }; +pub const StoreOp = enum(u32) { + undef = 0x00000000, + store = 0x00000001, + discard = 0x00000002, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }