From a6be646b94f00a0cd36af516c2b2617d93810e6e Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 15:30:02 -0700 Subject: [PATCH] gpu: add MultisampleState Signed-off-by: Stephen Gutekanst --- gpu/src/TODO | 8 +------- gpu/src/main.zig | 1 + gpu/src/structs.zig | 6 ++++++ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gpu/src/TODO b/gpu/src/TODO index bfef63ff..233ff51a 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -192,6 +192,7 @@ typedef struct WGPUConstantEntry { double value; } WGPUConstantEntry; +// TODO: Dawn-specific? typedef struct WGPUCopyTextureForBrowserOptions { WGPUChainedStruct const * nextInChain; bool flipY; @@ -203,13 +204,6 @@ typedef struct WGPUCopyTextureForBrowserOptions { WGPUAlphaMode dstAlphaMode; } WGPUCopyTextureForBrowserOptions; -typedef struct WGPUMultisampleState { - WGPUChainedStruct const * nextInChain; - uint32_t count; - uint32_t mask; - bool alphaToCoverageEnabled; -} WGPUMultisampleState; - typedef struct WGPUPrimitiveState { WGPUChainedStruct const * nextInChain; WGPUPrimitiveTopology topology; diff --git a/gpu/src/main.zig b/gpu/src/main.zig index 28146bba..04597dcf 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -89,6 +89,7 @@ pub const VertexBufferLayout = @import("data.zig").VertexBufferLayout; pub const BindGroupEntry = @import("structs.zig").BindGroupEntry; pub const BufferBindingLayout = @import("structs.zig").BufferBindingLayout; pub const CompilationMessage = @import("structs.zig").CompilationMessage; +pub const MultisampleState = @import("structs.zig").MultisampleState; // Enumerations pub const Feature = @import("enums.zig").Feature; diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index 25feb0ef..503f59b1 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -29,6 +29,12 @@ pub const CompilationMessage = struct { length: u64, }; +pub const MultisampleState = struct { + count: u32, + mask: u32, + alpha_to_coverage_enabled: bool, +}; + test "syntax" { _ = BindGroupEntry; _ = BufferBindingLayout;