gpu: add Adapter.Type

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-10 21:15:15 -07:00 committed by Stephen Gutekanst
parent 7d2ecdf197
commit af9c01d851
2 changed files with 16 additions and 8 deletions

View file

@ -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",
};
}