From 27c4b2a5480eb8e16c71c3fafe51d9c458340677 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 11 Jul 2022 06:40:46 -0700 Subject: [PATCH] gpu: add Device.LostReason enum Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 6 ------ gpu/src/Device.zig | 5 +++++ gpu/src/types.zig | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index b8e027be..6ac0be91 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,11 +1,5 @@ typedef uint32_t WGPUFlags; -typedef enum WGPUDeviceLostReason { - WGPUDeviceLostReason_Undefined = 0x00000000, - WGPUDeviceLostReason_Destroyed = 0x00000001, - WGPUDeviceLostReason_Force32 = 0x7FFFFFFF -} WGPUDeviceLostReason; - typedef enum WGPUErrorFilter { WGPUErrorFilter_Validation = 0x00000000, WGPUErrorFilter_OutOfMemory = 0x00000001, diff --git a/gpu/src/Device.zig b/gpu/src/Device.zig index 1bdfcf23..6046ae59 100644 --- a/gpu/src/Device.zig +++ b/gpu/src/Device.zig @@ -1 +1,6 @@ ptr: *anyopaque, + +pub const LostReason = enum(u32) { + undef = 0x00000000, + destroyed = 0x00000001, +}; diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 7610682a..6763a27b 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -92,7 +92,7 @@ pub const CreatePipelineAsyncStatus = enum(u32) { }; pub const CullMode = enum(u32) { - none = 0x00000000, + undef = 0x00000000, front = 0x00000001, back = 0x00000002, };