From 4fc752723cd58752ec11ba86da7a5f922c5c8a01 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 16 Jul 2022 10:33:52 -0700 Subject: [PATCH] gpu: add MultisampleState Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 7 ------- gpu/src/main.zig | 11 ----------- gpu/src/types.zig | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 36a58ac4..98bb88bc 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,10 +1,3 @@ -typedef struct WGPUMultisampleState { - next_in_chain: *const ChainedStruct, - count: u32, - mask: u32, - alpha_to_coverage_enabled: bool, -} WGPUMultisampleState; - typedef struct WGPUPipelineLayoutDescriptor { next_in_chain: *const ChainedStruct, label: ?[*:0]const u8 = null, diff --git a/gpu/src/main.zig b/gpu/src/main.zig index 7cc83c3a..d0ecc803 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -47,17 +47,6 @@ pub const ComputePassTimestampWrite = struct { location: ComputePassTimestampLocation, }; -pub const CopyTextureForBrowserOptions = extern struct { - next_in_chain: *const ChainedStruct, - flip_y: bool, - needs_color_space_conversion: bool, - src_alpha_mode: AlphaMode, - src_transfer_function_parameters: ?*const f32 = null, - conversion_matrix: ?*const f32 = null, - dst_transfer_function_parameters: ?*const f32 = null, - dst_alpha_mode: AlphaMode, -}; - test { refAllDecls(@import("adapter.zig")); refAllDecls(@import("bind_group.zig")); diff --git a/gpu/src/types.zig b/gpu/src/types.zig index a7f87aa4..816f4525 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -446,6 +446,24 @@ pub const ConstantEntry = extern struct { value: f64, }; +pub const CopyTextureForBrowserOptions = extern struct { + next_in_chain: *const ChainedStruct, + flip_y: bool, + needs_color_space_conversion: bool, + src_alpha_mode: AlphaMode, + src_transfer_function_parameters: ?*const f32 = null, + conversion_matrix: ?*const f32 = null, + dst_transfer_function_parameters: ?*const f32 = null, + dst_alpha_mode: AlphaMode, +}; + +pub const MultisampleState = struct { + next_in_chain: *const ChainedStruct, + count: u32, + mask: u32, + alpha_to_coverage_enabled: bool, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }