From 2ec3496478785e87825ec3673edaeec565e3bbfd Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 15 Jul 2022 00:39:10 -0700 Subject: [PATCH] gpu: add BlendComponent type Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 6 ------ gpu/src/types.zig | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index b206205a..6ae0ab36 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,9 +1,3 @@ -typedef struct WGPUBlendComponent { - WGPUBlendOperation operation; - WGPUBlendFactor srcFactor; - WGPUBlendFactor dstFactor; -} WGPUBlendComponent; - typedef struct WGPUBufferBindingLayout { WGPUChainedStruct const * nextInChain; WGPUBufferBindingType type; diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 90b35c01..a72cfce5 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -374,6 +374,12 @@ pub const ChainedStructOut = extern struct { s_type: SType, }; +pub const BlendComponent = extern struct { + operation: BlendOperation = .add, + src_factor: BlendFactor = .one, + dst_factor: BlendFactor = .zero, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }