From 340739ad44ecfef2f2648ce34425485cd0198f77 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 16 Jul 2022 20:09:48 -0700 Subject: [PATCH] gpu: add StorageTextureBindingLayout Signed-off-by: Stephen Gutekanst --- gpu/TODO-webgpu.h | 7 ------- gpu/src/types.zig | 9 +++++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 27841748..181cf7f4 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,10 +1,3 @@ -pub const StorageTextureBindingLayout = extern struct { - next_in_chain: *const ChainedStruct, - access: StorageTextureAccess, - format: TextureFormat, - view_dimension: TextureViewDimension, -}; - pub const WGPUSurfaceDescriptor = extern struct { next_in_chain: *const ChainedStruct, label: ?[*:0]const u8 = null, diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 4284de48..b724826e 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -1,5 +1,7 @@ const std = @import("std"); const testing = std.testing; +const Texture = @import("texture.zig").Texture; +const TextureView = @import("texture_view.zig").TextureView; pub const AlphaMode = enum(u32) { premultiplied = 0x00000000, @@ -494,6 +496,13 @@ pub const StencilFaceState = extern struct { pass_op: StencilOperation, }; +pub const StorageTextureBindingLayout = extern struct { + next_in_chain: *const ChainedStruct, + access: StorageTextureAccess, + format: Texture.Format, + view_dimension: TextureView.Dimension, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }