From ad45016481cbf44810025eb4b00e6e63fba47f2a Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 15 Jul 2022 20:31:13 -0700 Subject: [PATCH] gpu: add CompilationMessage Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 10 ---------- gpu/src/types.zig | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 1979c70f..101166b9 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,13 +1,3 @@ -typedef struct WGPUCompilationMessage { - next_in_chain: *const ChainedStruct, - char const * message; // nullable - WGPUCompilationMessageType type; - line_num: u64, - line_pos: u64, - offset: u64, - length: u64, -} WGPUCompilationMessage; - typedef struct WGPUConstantEntry { next_in_chain: *const ChainedStruct, char const * key; diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 3c311514..4aeb80d8 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -430,6 +430,16 @@ pub const Origin3D = extern struct { z: u32 = 0, }; +pub const CompilationMessage = extern struct { + next_in_chain: *const ChainedStruct, + message: ?[*:0]const u8 = null, + type: CompilationMessageType, + line_num: u64, + line_pos: u64, + offset: u64, + length: u64, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }