gpu: convert ShaderModule from enum(usize) to *opaque
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
34edad6a2c
commit
8719bab867
1 changed files with 15 additions and 20 deletions
|
|
@ -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,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue