From 37b75fe65bfe564105af843f0510b116c5797b50 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 08:12:49 -0700 Subject: [PATCH] gpu: add Texture.Aspect enum Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 9 --------- gpu/src/Texture.zig | 8 ++++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 3c7ec015..d23ab625 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,14 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUTextureAspect { - WGPUTextureAspect_All = 0x00000000, - WGPUTextureAspect_StencilOnly = 0x00000001, - WGPUTextureAspect_DepthOnly = 0x00000002, - WGPUTextureAspect_Plane0Only = 0x00000003, - WGPUTextureAspect_Plane1Only = 0x00000004, - WGPUTextureAspect_Force32 = 0x7FFFFFFF -} WGPUTextureAspect; - typedef enum WGPUTextureComponentType { WGPUTextureComponentType_Float = 0x00000000, WGPUTextureComponentType_Sint = 0x00000001, diff --git a/gpu/src/Texture.zig b/gpu/src/Texture.zig index 1bdfcf23..d1866642 100644 --- a/gpu/src/Texture.zig +++ b/gpu/src/Texture.zig @@ -1 +1,9 @@ ptr: *anyopaque, + +pub const Aspect = enum(u32) { + all = 0x00000000, + stencil_only = 0x00000001, + depth_only = 0x00000002, + plane0_only = 0x00000003, + plane1_only = 0x00000004, +};