From 4750abfbdeff1cbea79918c9b26f789b81e6a23e Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 15:54:00 -0700 Subject: [PATCH] gpu: move BindGroupEntry -> BindGroup.Entry Signed-off-by: Stephen Gutekanst --- gpu/src/BindGroup.zig | 14 ++++++++++++++ gpu/src/structs.zig | 10 ---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/gpu/src/BindGroup.zig b/gpu/src/BindGroup.zig index 6f6847f2..ec29f67c 100644 --- a/gpu/src/BindGroup.zig +++ b/gpu/src/BindGroup.zig @@ -1,3 +1,7 @@ +const Buffer = @import("Buffer.zig"); +const Sampler = @import("Sampler.zig"); +const TextureView = @import("TextureView.zig"); + const BindGroup = @This(); /// The type erased pointer to the BindGroup implementation @@ -23,9 +27,19 @@ pub inline fn setLabel(group: BindGroup, label: [:0]const u8) void { group.vtable.setLabel(group.ptr, label); } +pub const Entry = struct { + binding: u32, + buffer: Buffer, + offset: u64, + size: u64, + sampler: Sampler, + texture_view: TextureView, +}; + test "syntax" { _ = VTable; _ = reference; _ = release; _ = setLabel; + _ = Entry; } diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index 239ab1b5..b3460c7b 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -8,15 +8,6 @@ const IndexFormat = @import("enums.zig").IndexFormat; const FrontFace = @import("enums.zig").FrontFace; const CullMode = @import("enums.zig").CullMode; -pub const BindGroupEntry = struct { - binding: u32, - buffer: Buffer, - offset: u64, - size: u64, - sampler: Sampler, - texture_view: TextureView, -}; - pub const CompilationMessage = struct { message: [:0]const u8, type: CompilationMessageType, @@ -40,7 +31,6 @@ pub const PrimitiveState = struct { }; test "syntax" { - _ = BindGroupEntry; _ = CompilationMessage; _ = MultisampleState; _ = PrimitiveState;