From cf8922cc331af3e98940fd0a6fa4edab60042d31 Mon Sep 17 00:00:00 2001 From: apple <19359968+apppppppple@users.noreply.github.com> Date: Thu, 5 Jan 2023 03:58:13 -0500 Subject: [PATCH] gpu: fix example build (#663) --- libs/gpu/build.zig | 4 ++-- libs/gpu/examples/sample_utils.zig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/gpu/build.zig b/libs/gpu/build.zig index 41034166..3c987a30 100644 --- a/libs/gpu/build.zig +++ b/libs/gpu/build.zig @@ -28,8 +28,8 @@ pub fn build(b: *std.build.Builder) !void { const example = b.addExecutable("gpu-hello-triangle", "examples/main.zig"); example.setBuildMode(mode); example.setTarget(target); - example.addPackage(gpu.pkg); - example.addPackage(glfw.pkg); + example.addPackage(gpu.pkg(b)); + example.addPackage(glfw.pkg(b)); try gpu.link(b, example, .{ .gpu_dawn_options = gpu_dawn_options }); example.install(); diff --git a/libs/gpu/examples/sample_utils.zig b/libs/gpu/examples/sample_utils.zig index f94dd1bc..55d71d4b 100644 --- a/libs/gpu/examples/sample_utils.zig +++ b/libs/gpu/examples/sample_utils.zig @@ -92,7 +92,7 @@ pub fn setup(allocator: std.mem.Allocator) !Setup { var response: ?RequestAdapterResponse = null; instance.?.requestAdapter(&gpu.RequestAdapterOptions{ .compatible_surface = surface, - .power_preference = .undef, + .power_preference = .undefined, .force_fallback_adapter = false, }, &response, requestAdapterCallback); if (response.?.status != .success) {