From 26a29e1b2a4cfa17ac1a676e6af0071fd8e410db Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 16 Jul 2022 20:55:06 -0700 Subject: [PATCH] gpu: add VertexBufferLayout Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 7 ------- gpu/src/types.zig | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 24b86407..d667cab4 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,10 +1,3 @@ -pub const VertexBufferLayout = extern struct { - array_stride: u64, - step_mode: VertexStepMode, - attribute_count: u32, - attributes: [*]const VertexAttribute, -}; - pub const WGPUBindGroupLayoutDescriptor = extern struct { next_in_chain: *const ChainedStruct, label: ?[*:0]const u8 = null, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index ce2fb6ae..7e4029ec 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -577,6 +577,13 @@ pub const SupportedLimits = extern struct { limits: Limits, }; +pub const VertexBufferLayout = extern struct { + array_stride: u64, + step_mode: VertexStepMode, + attribute_count: u32, + attributes: [*]const VertexAttribute, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }