mach/gpu/src/shader_module.zig
Stephen Gutekanst cd14f1a195 gpu: add ShaderModule.WGSLDescriptor
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00

24 lines
634 B
Zig

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,
};
pub const SPIRVDescriptor = extern struct {
chain: ChainedStruct,
code_size: u32,
code: [*]const u32,
};
pub const WGSLDescriptor = extern struct {
chain: ChainedStruct,
source: [*:0]const u8,
};
};