Skip to content

Commit

Permalink
gpu-dawn: clarify desktop_gl support
Browse files Browse the repository at this point in the history
Helps #86

Signed-off-by: Stephen Gutekanst <[email protected]>
  • Loading branch information
slimsag committed Feb 21, 2022
1 parent 53e85b8 commit 918bc61
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions gpu-dawn/build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 918bc61

Please sign in to comment.