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,13 +1,5 @@
|
||||||
typedef uint32_t WGPUFlags;
|
typedef uint32_t WGPUFlags;
|
||||||
|
|
||||||
typedef enum WGPUAdapterType {
|
|
||||||
WGPUAdapterType_DiscreteGPU = 0x00000000,
|
|
||||||
WGPUAdapterType_IntegratedGPU = 0x00000001,
|
|
||||||
WGPUAdapterType_CPU = 0x00000002,
|
|
||||||
WGPUAdapterType_Unknown = 0x00000003,
|
|
||||||
WGPUAdapterType_Force32 = 0x7FFFFFFF
|
|
||||||
} WGPUAdapterType;
|
|
||||||
|
|
||||||
typedef enum WGPUAddressMode {
|
typedef enum WGPUAddressMode {
|
||||||
WGPUAddressMode_Repeat = 0x00000000,
|
WGPUAddressMode_Repeat = 0x00000000,
|
||||||
WGPUAddressMode_MirrorRepeat = 0x00000001,
|
WGPUAddressMode_MirrorRepeat = 0x00000001,
|
||||||
|
|
|
||||||
|
|
@ -1 +1,17 @@
|
||||||
ptr: *anyopaque,
|
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