From 1069889ea6c795fcb592e6429a1afbb86ed036db Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 14:58:32 -0700 Subject: [PATCH] gpu: add VertexAttribute Signed-off-by: Stephen Gutekanst --- gpu/src/TODO | 6 ------ gpu/src/main.zig | 1 + gpu/src/structs.zig | 6 ++++++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gpu/src/TODO b/gpu/src/TODO index 4d4caf84..8cdfdd40 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -392,12 +392,6 @@ typedef struct WGPURenderPassDepthStencilAttachment { -typedef struct WGPUVertexAttribute { - WGPUVertexFormat format; - uint64_t offset; - uint32_t shaderLocation; -} WGPUVertexAttribute; - typedef struct WGPUBlendState { WGPUBlendComponent color; WGPUBlendComponent alpha; diff --git a/gpu/src/main.zig b/gpu/src/main.zig index ba538265..5d023a58 100644 --- a/gpu/src/main.zig +++ b/gpu/src/main.zig @@ -81,6 +81,7 @@ pub const Color = @import("structs.zig").Color; pub const Extent3D = @import("structs.zig").Extent3D; pub const Origin3D = @import("structs.zig").Origin3D; pub const StencilFaceState = @import("structs.zig").StencilFaceState; +pub const VertexAttribute = @import("structs.zig").VertexAttribute; // Enumerations pub const Feature = @import("enums.zig").Feature; diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index bc3ee46a..aeb9c80f 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -64,3 +64,9 @@ pub const StencilFaceState = extern struct { depth_fail_op: StencilOperation, pass_op: StencilOperation, }; + +pub const VertexAttribute = extern struct { + format: VertexFormat, + offset: u64, + shader_location: u32, +};