diff --git a/gpu/src/shader_module.zig b/gpu/src/shader_module.zig index 3aa86ce8..404a4be4 100644 --- a/gpu/src/shader_module.zig +++ b/gpu/src/shader_module.zig @@ -1,24 +1,19 @@ const ChainedStruct = @import("types.zig").ChainedStruct; -pub const ShaderModule = enum(usize) { - _, +pub const ShaderModule = *opaque {}; - // 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, - }; - - pub const SPIRVDescriptor = extern struct { - chain: ChainedStruct, - code_size: u32, - code: [*]const u32, - }; - - pub const WGSLDescriptor = extern struct { - chain: ChainedStruct, - source: [*:0]const u8, - }; +pub const ShaderModuleDescriptor = extern struct { + next_in_chain: *const ChainedStruct, + label: ?[*:0]const u8 = null, +}; + +pub const ShaderModuleSPIRVDescriptor = extern struct { + chain: ChainedStruct, + code_size: u32, + code: [*]const u32, +}; + +pub const ShaderModuleWGSLDescriptor = extern struct { + chain: ChainedStruct, + source: [*:0]const u8, };