From 918bc6118703d1f7bad05f92deb9dfa4f5e04ed5 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sun, 13 Feb 2022 17:30:19 -0700 Subject: [PATCH] gpu-dawn: clarify desktop_gl support Helps hexops/mach#86 Signed-off-by: Stephen Gutekanst --- gpu-dawn/build.zig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gpu-dawn/build.zig b/gpu-dawn/build.zig index c2455124..9e822e5d 100644 --- a/gpu-dawn/build.zig +++ b/gpu-dawn/build.zig @@ -60,8 +60,7 @@ pub const Options = struct { // TODO(build-system): enable on Windows if we can cross compile Vulkan vulkan: ?bool = null, - /// Defaults to true on Windows, Linux - // TODO(build-system): not respected at all currently + /// Defaults to true on Linux desktop_gl: ?bool = null, /// Defaults to true on Android, Linux, Windows, Emscripten @@ -96,9 +95,9 @@ pub const Options = struct { if (options.metal == null) options.metal = tag.isDarwin(); if (options.vulkan == null) options.vulkan = tag == .fuchsia or linux_desktop_like; - // TODO(build-system): respect these options / defaults - if (options.desktop_gl == null) options.desktop_gl = linux_desktop_like; // TODO(build-system): add windows - options.opengl_es = false; + // TODO(build-system): technically Dawn itself defaults desktop_gl to true on Windows. + if (options.desktop_gl == null) options.desktop_gl = linux_desktop_like; + options.opengl_es = false; // TODO(build-system): OpenGL ES // if (options.opengl_es == null) options.opengl_es = tag == .windows or tag == .emscripten or target.isAndroid() or linux_desktop_like; return options; }