From bf3cf08e1e36ca583cda37810f436f9b074d9071 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 16:17:42 -0700 Subject: [PATCH] gpu: add CompilationInfo Signed-off-by: Stephen Gutekanst --- gpu/src/TODO | 6 ------ gpu/src/main.zig | 1 + gpu/src/structs.zig | 5 +++++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gpu/src/TODO b/gpu/src/TODO index 2c9ba54b..1bbe7a0f 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -204,12 +204,6 @@ typedef struct WGPUCopyTextureForBrowserOptions { WGPUAlphaMode dstAlphaMode; } WGPUCopyTextureForBrowserOptions; -typedef struct WGPUCompilationInfo { - WGPUChainedStruct const * nextInChain; - uint32_t messageCount; - WGPUCompilationMessage const * messages; -} WGPUCompilationInfo; - typedef struct WGPUDepthStencilState { WGPUChainedStruct const * nextInChain; WGPUTextureFormat format; diff --git a/gpu/src/main.zig b/gpu/src/main.zig index de447529..5b1df2a8 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -89,6 +89,7 @@ pub const VertexBufferLayout = @import("data.zig").VertexBufferLayout; // Data structures not ABI-compatible with webgpu.h pub const CompilationMessage = @import("structs.zig").CompilationMessage; +pub const CompilationInfo = @Import("structs.zig").CompilationInfo; pub const MultisampleState = @import("structs.zig").MultisampleState; pub const PrimitiveState = @import("structs.zig").PrimitiveState; pub const StorageTextureBindingLayout = @import("structs.zig").StorageTextureBindingLayout; diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index ab3e16ed..378f9f05 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -19,6 +19,10 @@ pub const CompilationMessage = struct { length: u64, }; +pub const CompilationInfo = struct { + messages: []const CompilationMessage, +}; + pub const MultisampleState = struct { count: u32, mask: u32, @@ -40,6 +44,7 @@ pub const StorageTextureBindingLayout = struct { test "syntax" { _ = CompilationMessage; + _ = CompilationInfo; _ = MultisampleState; _ = PrimitiveState; _ = StorageTextureBindingLayout;