From 5b4c30871ea67fcd41059835ed8a8cab90fe75a9 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 16 Jul 2022 20:05:16 -0700 Subject: [PATCH] gpu: add Sampler.BindingLayout Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 5 ----- gpu/src/sampler.zig | 7 +++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 341e7f55..a0c4ec8a 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,8 +1,3 @@ -pub const SamplerBindingLayout = extern struct { - next_in_chain: *const ChainedStruct, - type: SamplerBindingType, -}; - pub const WGPUSamplerDescriptor = extern struct { next_in_chain: *const ChainedStruct, label: ?[*:0]const u8 = null, diff --git a/gpu/src/sampler.zig b/gpu/src/sampler.zig index 72b6c00e..34568fae 100644 --- a/gpu/src/sampler.zig +++ b/gpu/src/sampler.zig @@ -1,3 +1,5 @@ +const ChainedStruct = @import("types.zig").ChainedStruct; + pub const Sampler = enum(usize) { _, @@ -15,4 +17,9 @@ pub const Sampler = enum(usize) { non_filtering = 0x00000002, comparison = 0x00000003, }; + + pub const BindingLayout = extern struct { + next_in_chain: *const ChainedStruct, + type: BindingType, + }; };