diff --git a/gpu/TODO-webgpu.h b/gpu/TODO-webgpu.h index e3c8f898..ff434cfd 100644 --- a/gpu/TODO-webgpu.h +++ b/gpu/TODO-webgpu.h @@ -1,8 +1,3 @@ -pub const WGPUShaderModuleDescriptor = extern struct { - next_in_chain: *const ChainedStruct, - label: ?[*:0]const u8 = null, -}; - pub const WGPUShaderModuleSPIRVDescriptor = extern struct { chain: ChainedStruct, code_size: u32, diff --git a/gpu/src/shader_module.zig b/gpu/src/shader_module.zig index 4a06fe18..b04ba081 100644 --- a/gpu/src/shader_module.zig +++ b/gpu/src/shader_module.zig @@ -1,6 +1,13 @@ +const ChainedStruct = @import("types.zig").ChainedStruct; + pub const ShaderModule = enum(usize) { _, // TODO: verify there is a use case for nullable value of this type. pub const none: ShaderModule = @intToEnum(ShaderModule, 0); + + pub const Descriptor = extern struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, + }; };