From c0ddbbb5142ba0da0c8961c3d494dbb6346556a2 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Fri, 11 Mar 2022 16:11:20 -0700 Subject: [PATCH] gpu: add Texture.DataLayout 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 a07eed0d..2c75d9f1 100644 --- a/gpu/src/TODO +++ b/gpu/src/TODO @@ -204,13 +204,6 @@ typedef struct WGPUCopyTextureForBrowserOptions { WGPUAlphaMode dstAlphaMode; } WGPUCopyTextureForBrowserOptions; -typedef struct WGPUTextureDataLayout { - WGPUChainedStruct const * nextInChain; - uint64_t offset; - uint32_t bytesPerRow; - uint32_t rowsPerImage; -} WGPUTextureDataLayout; - typedef struct WGPUBindGroupLayoutEntry { WGPUChainedStruct const * nextInChain; uint32_t binding; diff --git a/gpu/src/Texture.zig b/gpu/src/Texture.zig index 8502af36..b1971678 100644 --- a/gpu/src/Texture.zig +++ b/gpu/src/Texture.zig @@ -186,6 +186,12 @@ pub const BindingLayout = struct { multisampled: bool, }; +pub const DataLayout = struct { + offset: u64, + bytes_per_row: u32, + rows_per_image: u32, +}; + test "syntax" { _ = VTable; _ = reference; @@ -199,4 +205,5 @@ test "syntax" { _ = SampleType; _ = ViewDimension; _ = BindingLayout; + _ = DataLayout; }