gpu: convert ShaderModule from enum(usize) to *opaque

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-24 14:58:17 -07:00 committed by Stephen Gutekanst
parent 34edad6a2c
commit 8719bab867

View file

@ -1,24 +1,19 @@
const ChainedStruct = @import("types.zig").ChainedStruct; 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 ShaderModuleDescriptor = extern struct {
pub const none: ShaderModule = @intToEnum(ShaderModule, 0); next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null,
pub const Descriptor = extern struct { };
next_in_chain: *const ChainedStruct,
label: ?[*:0]const u8 = null, pub const ShaderModuleSPIRVDescriptor = extern struct {
}; chain: ChainedStruct,
code_size: u32,
pub const SPIRVDescriptor = extern struct { code: [*]const u32,
chain: ChainedStruct, };
code_size: u32,
code: [*]const u32, pub const ShaderModuleWGSLDescriptor = extern struct {
}; chain: ChainedStruct,
source: [*:0]const u8,
pub const WGSLDescriptor = extern struct {
chain: ChainedStruct,
source: [*:0]const u8,
};
}; };