gpu: internalize ShaderModule types
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
b0776270d3
commit
23fb836ce8
3 changed files with 20 additions and 21 deletions
|
|
@ -3,6 +3,22 @@ const CompilationInfoCallback = @import("callbacks.zig").CompilationInfoCallback
|
|||
const Impl = @import("interface.zig").Impl;
|
||||
|
||||
pub const ShaderModule = opaque {
|
||||
pub const Descriptor = extern struct {
|
||||
next_in_chain: ?*const ChainedStruct = null,
|
||||
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 inline fn getCompilationInfo(shader_module: *ShaderModule, callback: CompilationInfoCallback, userdata: *anyopaque) void {
|
||||
Impl.shaderModuleGetCompilationInfo(shader_module, callback, userdata);
|
||||
}
|
||||
|
|
@ -19,19 +35,3 @@ pub const ShaderModule = opaque {
|
|||
Impl.shaderModuleRelease(shader_module);
|
||||
}
|
||||
};
|
||||
|
||||
pub const ShaderModuleDescriptor = extern struct {
|
||||
next_in_chain: ?*const ChainedStruct = null,
|
||||
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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue