{mach,gpu}: rename GPU_BACKEND -> MACH_GPU_BACKEND
Per https://github.com/hexops/mach/issues/376#issuecomment-1170374460 Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
7dd1818e70
commit
78675470ae
3 changed files with 7 additions and 7 deletions
|
|
@ -34,8 +34,8 @@ fn getEnvVarOwned(allocator: std.mem.Allocator, key: []const u8) error{ OutOfMem
|
|||
}
|
||||
|
||||
fn detectBackendType(allocator: std.mem.Allocator) !gpu.BackendType {
|
||||
const GPU_BACKEND = try getEnvVarOwned(allocator, "GPU_BACKEND");
|
||||
if (GPU_BACKEND) |backend| {
|
||||
const MACH_GPU_BACKEND = try getEnvVarOwned(allocator, "MACH_GPU_BACKEND");
|
||||
if (MACH_GPU_BACKEND) |backend| {
|
||||
defer allocator.free(backend);
|
||||
if (std.ascii.eqlIgnoreCase(backend, "null")) return .nul;
|
||||
if (std.ascii.eqlIgnoreCase(backend, "webgpu")) return .nul;
|
||||
|
|
@ -45,7 +45,7 @@ fn detectBackendType(allocator: std.mem.Allocator) !gpu.BackendType {
|
|||
if (std.ascii.eqlIgnoreCase(backend, "vulkan")) return .vulkan;
|
||||
if (std.ascii.eqlIgnoreCase(backend, "opengl")) return .opengl;
|
||||
if (std.ascii.eqlIgnoreCase(backend, "opengles")) return .opengles;
|
||||
@panic("unknown BACKEND type");
|
||||
@panic("unknown MACH_GPU_BACKEND type");
|
||||
}
|
||||
|
||||
const target = @import("builtin").target;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue