gpu: add BackendType enum
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
8ca3d666a3
commit
78685c19a0
2 changed files with 24 additions and 12 deletions
|
|
@ -2,3 +2,27 @@ pub const AlphaMode = enum(u32) {
|
|||
premultiplied = 0x00000000,
|
||||
unpremultiplied = 0x00000001,
|
||||
};
|
||||
|
||||
pub const BackendType = enum(u32) {
|
||||
nul,
|
||||
webgpu,
|
||||
d3d11,
|
||||
d3d12,
|
||||
metal,
|
||||
vulkan,
|
||||
opengl,
|
||||
opengles,
|
||||
};
|
||||
|
||||
pub fn backendTypeName(t: BackendType) []const u8 {
|
||||
return switch (t) {
|
||||
.nul => "Null",
|
||||
.webgpu => "WebGPU",
|
||||
.d3d11 => "D3D11",
|
||||
.d3d12 => "D3D12",
|
||||
.metal => "Metal",
|
||||
.vulkan => "Vulkan",
|
||||
.opengl => "OpenGL",
|
||||
.opengles => "OpenGLES",
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue