From 326d66127ef0030afe13460303e2a29fd5c1e52a Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 16 Jul 2022 20:45:38 -0700 Subject: [PATCH] gpu: add ImageCopyBuffer Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 6 ------ gpu/src/types.zig | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 5b5bb7d6..631f708b 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,9 +1,3 @@ -pub const ImageCopyBuffer = extern struct { - next_in_chain: *const ChainedStruct, - layout: TextureDataLayout, - buffer: Buffer -}; - pub const ImageCopyTexture = extern struct { next_in_chain: *const ChainedStruct, texture: Texture, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 3674ce8f..8cdd9e91 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -2,6 +2,7 @@ const std = @import("std"); const testing = std.testing; const Texture = @import("texture.zig").Texture; const TextureView = @import("texture_view.zig").TextureView; +const Buffer = @import("buffer.zig").Buffer; pub const AlphaMode = enum(u32) { premultiplied = 0x00000000, @@ -534,6 +535,12 @@ pub const DepthStencilState = extern struct { depth_bias_clamp: f32, }; +pub const ImageCopyBuffer = extern struct { + next_in_chain: *const ChainedStruct, + layout: Texture.DataLayout, + buffer: Buffer, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }