From 2a50f3c3bd31c6aae3c808efc970e648fab96e87 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 16 Jul 2022 20:25:57 -0700 Subject: [PATCH] gpu: add Texture.DataLayout Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 7 ------- gpu/src/texture.zig | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index bf340f90..c6562710 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,10 +1,3 @@ -pub const WGPUTextureDataLayout = extern struct { - next_in_chain: *const ChainedStruct, - offset: u64, - bytes_per_row: u32, - rows_per_image: u32, -}; - pub const WGPUTextureViewDescriptor = extern struct { next_in_chain: *const ChainedStruct, label: ?[*:0]const u8 = null, diff --git a/gpu/src/texture.zig b/gpu/src/texture.zig index 93ffd435..8b10c8d2 100644 --- a/gpu/src/texture.zig +++ b/gpu/src/texture.zig @@ -167,4 +167,11 @@ pub const Texture = enum(usize) { view_dimension: TextureView.Dimension, multisampled: bool, }; + + pub const DataLayout = extern struct { + next_in_chain: *const ChainedStruct, + offset: u64, + bytes_per_row: u32, + rows_per_image: u32, + }; };