gpu: add Adapter.createDevice and comptime interface strategy
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
2d6dbd3351
commit
5b0ae990e3
3 changed files with 34 additions and 4 deletions
|
|
@ -1,7 +1,14 @@
|
|||
const testing = @import("std").testing;
|
||||
const ChainedStructOut = @import("types.zig").ChainedStructOut;
|
||||
const Device = @import("device.zig").Device;
|
||||
const DeviceDescriptor = @import("device.zig").DeviceDescriptor;
|
||||
const impl = @import("interface.zig").impl;
|
||||
|
||||
pub const Adapter = *opaque {};
|
||||
pub const Adapter = *opaque {
|
||||
pub inline fn createDevice(adapter: Adapter, descriptor: ?*const DeviceDescriptor) ?Device {
|
||||
return impl.createDevice(adapter, descriptor);
|
||||
}
|
||||
};
|
||||
|
||||
pub const AdapterType = enum(u32) {
|
||||
discrete_gpu,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue