From 95413bae6fb97125246d7e7ae0fa759190f8b497 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 15:12:53 -0700 Subject: [PATCH] gpu: add BufferBindingLayout Signed-off-by: Stephen Gutekanst --- gpu/src/TODO | 7 ------- gpu/src/structs.zig | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/gpu/src/TODO b/gpu/src/TODO index 34b27793..eb94cdfa 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -187,13 +187,6 @@ typedef struct WGPURenderPipelineDescriptor { -typedef struct WGPUBufferBindingLayout { - WGPUChainedStruct const * nextInChain; - WGPUBufferBindingType type; - bool hasDynamicOffset; - uint64_t minBindingSize; -} WGPUBufferBindingLayout; - typedef struct WGPUCompilationMessage { WGPUChainedStruct const * nextInChain; char const * message; diff --git a/gpu/src/structs.zig b/gpu/src/structs.zig index b9669a59..b47f56ea 100644 --- a/gpu/src/structs.zig +++ b/gpu/src/structs.zig @@ -2,6 +2,7 @@ const Buffer = @import("Buffer.zig"); const Sampler = @import("Sampler.zig"); const TextureView = @import("TextureView.zig"); +const BufferBindingType = @import("enums.zig").BufferBindingType; pub const BindGroupEntry = struct { binding: u32, @@ -12,6 +13,13 @@ pub const BindGroupEntry = struct { texture_view: TextureView, }; +pub const BufferBindingLayout = struct { + type: BufferBindingType, + has_dynamic_offset: bool, + min_binding_size: u64, +} + test "syntax" { _ = BindGroupEntry; + _ = BufferBindingLayout; }