From 9b5fb77d7f75864875fc52ae157893986aa9e070 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 16:10:41 -0700 Subject: [PATCH] gpu: add Texture.BindingLayout Signed-off-by: Stephen Gutekanst --- gpu/src/TODO | 7 ------- gpu/src/Texture.zig | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gpu/src/TODO b/gpu/src/TODO index 161ffd47..a07eed0d 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -204,13 +204,6 @@ typedef struct WGPUCopyTextureForBrowserOptions { WGPUAlphaMode dstAlphaMode; } WGPUCopyTextureForBrowserOptions; -typedef struct WGPUTextureBindingLayout { - WGPUChainedStruct const * nextInChain; - WGPUTextureSampleType sampleType; - WGPUTextureViewDimension viewDimension; - bool multisampled; -} WGPUTextureBindingLayout; - typedef struct WGPUTextureDataLayout { WGPUChainedStruct const * nextInChain; uint64_t offset; diff --git a/gpu/src/Texture.zig b/gpu/src/Texture.zig index 18491422..8502af36 100644 --- a/gpu/src/Texture.zig +++ b/gpu/src/Texture.zig @@ -180,6 +180,12 @@ pub const ViewDimension = enum(u32) { dimension_3d = 0x00000006, }; +pub const BindingLayout = struct { + sample_type: SampleType, + view_dimension: ViewDimension, + multisampled: bool, +}; + test "syntax" { _ = VTable; _ = reference; @@ -192,4 +198,5 @@ test "syntax" { _ = Dimension; _ = SampleType; _ = ViewDimension; + _ = BindingLayout; }