gpu: add Adapter.enumerateFeatures
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
4d5809cc16
commit
60496259b2
3 changed files with 18 additions and 1 deletions
|
|
@ -2,12 +2,18 @@ const testing = @import("std").testing;
|
|||
const ChainedStructOut = @import("types.zig").ChainedStructOut;
|
||||
const Device = @import("device.zig").Device;
|
||||
const DeviceDescriptor = @import("device.zig").DeviceDescriptor;
|
||||
const FeatureName = @import("types.zig").FeatureName;
|
||||
const impl = @import("interface.zig").impl;
|
||||
|
||||
pub const Adapter = *opaque {
|
||||
pub inline fn createDevice(adapter: Adapter, descriptor: ?*const DeviceDescriptor) ?Device {
|
||||
return impl.createDevice(adapter, descriptor);
|
||||
}
|
||||
|
||||
/// Call once with null to determine the array length, and again to fetch the feature list.
|
||||
pub inline fn enumerateFeatures(adapter: Adapter, features: ?[*]FeatureName) usize {
|
||||
return impl.adapterEnumerateFeatures(adapter, features);
|
||||
}
|
||||
};
|
||||
|
||||
pub const AdapterType = enum(u32) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue