gpu: add Adapter.Type
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
7d2ecdf197
commit
af9c01d851
2 changed files with 16 additions and 8 deletions
|
|
@ -1 +1,17 @@
|
|||
ptr: *anyopaque,
|
||||
|
||||
pub const Type = enum(u32) {
|
||||
discrete_gpu,
|
||||
integrated_gpu,
|
||||
cpu,
|
||||
unknown,
|
||||
};
|
||||
|
||||
pub fn typeName(t: Type) []const u8 {
|
||||
return switch (t) {
|
||||
.discrete_gpu => "Discrete GPU",
|
||||
.integrated_gpu => "Integrated GPU",
|
||||
.cpu => "CPU",
|
||||
.unknown => "Unknown",
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue