diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index 5bb52f9e..2accbcb8 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,11 +1,3 @@ -pub const WGPUProgrammableStageDescriptor = extern struct { - next_in_chain: *const ChainedStruct, - module: ShaderModule, - entry_point: [*:0]const u8, - constant_count: u32, - constants: [*]const ConstantEntry, -}; - pub const WGPURenderPassColorAttachment = extern struct { view: TextureView = TextureView.none, // nullable resolve_target: TextureView = TextureView.none, // nullable diff --git a/gpu/src/types.zig b/gpu/src/types.zig index 2a3ba70f..6cd6a909 100644 --- a/gpu/src/types.zig +++ b/gpu/src/types.zig @@ -3,6 +3,7 @@ const testing = std.testing; const Texture = @import("texture.zig").Texture; const TextureView = @import("texture_view.zig").TextureView; const Buffer = @import("buffer.zig").Buffer; +const ShaderModule = @import("shader_module.zig").ShaderModule; pub const AlphaMode = enum(u32) { premultiplied = 0x00000000, @@ -549,6 +550,14 @@ pub const ImageCopyTexture = extern struct { aspect: Texture.Aspect, }; +pub const ProgrammableStageDescriptor = extern struct { + next_in_chain: *const ChainedStruct, + module: ShaderModule, + entry_point: [*:0]const u8, + constant_count: u32, + constants: [*]const ConstantEntry, +}; + test "BackendType name" { try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name()); }