diff --git a/gpu/examples/sample_utils.zig b/gpu/examples/sample_utils.zig index 6f2d05de..0458b736 100644 --- a/gpu/examples/sample_utils.zig +++ b/gpu/examples/sample_utils.zig @@ -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; diff --git a/src/platform/native.zig b/src/platform/native.zig index 9f714a64..ae5cc8b0 100644 --- a/src/platform/native.zig +++ b/src/platform/native.zig @@ -95,7 +95,7 @@ pub const Platform = struct { }, &response, util.requestAdapterCallback); if (response.?.status != .success) { std.debug.print("mach: failed to create GPU adapter: {?s}\n", .{response.?.message}); - std.debug.print("-> maybe try GPU_BACKEND=opengl ?\n", .{}); + std.debug.print("-> maybe try MACH_GPU_BACKEND=opengl ?\n", .{}); std.process.exit(1); } diff --git a/src/platform/util.zig b/src/platform/util.zig index 8b958a29..291a027a 100644 --- a/src/platform/util.zig +++ b/src/platform/util.zig @@ -25,8 +25,8 @@ fn getEnvVarOwned(allocator: std.mem.Allocator, key: []const u8) error{ OutOfMem } pub 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, "d3d11")) return .d3d11; @@ -35,7 +35,7 @@ pub 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 GPU_BACKEND type"); + @panic("unknown MACH_GPU_BACKEND type"); } const target = @import("builtin").target;