InKryption
f906bd6c79
glfw: remove accidental re-addition of TODO
2021-12-09 19:42:28 -08:00
InKryption
f953621a40
glfw: add doc-comment
...
Add comment for new `glfw.Window.SizeOptional` struct
Co-authored-by: Stephen Gutekanst <stephen.gutekanst@gmail.com>
2021-12-09 19:42:28 -08:00
InKryption
b50b56760e
glfw: replace usage of glfw.dont_care as sentinel value for parameters in some glfw.Window functions
2021-12-09 19:42:28 -08:00
InKryption
b8c913cd6c
glfw: remove TODOs
2021-12-08 19:30:01 -08:00
Stephen Gutekanst
9ea4d2aa6f
glfw: correctly @errorSetCast when returning errors from createWindowSurface
...
Fixes an issue where `createWindowSurface` would not compile (found when
updating https://github.com/hexops/mach-glfw-vulkan-example to latest.)
Introduced in hexops/mach#115
cc @InKryption
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-06 22:16:06 -07:00
InKryption
3648d6b9c4
glfw: Denormalize errors ( #115 )
...
Closes hexops/mach#96
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-06 21:52:15 -07:00
Stephen Gutekanst
233fc53a17
CI: update to latest Zig master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-06 20:03:38 -08:00
Stephen Gutekanst
32a5addcbb
glfw: update CI to latest Zig master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-06 20:03:38 -08:00
Stephen Gutekanst
7ecef80ec7
gpu: update to latest Zig master version (allocgate)
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-06 20:03:38 -08:00
BratishkaErik
784aa40093
glfw: update system_sdk.zig to latest Zig master
2021-12-06 20:03:38 -08:00
Stephen Gutekanst
5b2cb46700
gpu: reduce debug Dawn static library size from ~947M -> ~53M
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-04 23:01:16 -07:00
Stephen Gutekanst
1c6792a492
gpu: add OpenGL fallback support for Linux
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-05 04:25:19 +00:00
Stephen Gutekanst
6b0129f590
gpu: implement OpenGL / OpenGL ES adapter discovery in example
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-05 04:23:06 +00:00
Stephen Gutekanst
d8d0c85572
glfw: make getProcAddress ABI compatible with C implementation
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-05 04:22:21 +00:00
Stephen Gutekanst
507f4fa6aa
gpu: allow choosing WGPU_BACKEND in example program
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-05 04:21:29 +00:00
Stephen Gutekanst
1fc499922f
gpu: update Dawn to include generated OpenGL desktop sources
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-05 04:19:44 +00:00
Stephen Gutekanst
d9ec84b327
gpu: implement C wrapper for Dawn Instance.discoverAdapters
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-04 21:49:45 +00:00
Stephen Gutekanst
4ebb4571ac
gpu: correctly target ~60hz, not 62,500hz, in Dawn example
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-02 18:05:46 +00:00
Stephen Gutekanst
fd0eeb2662
gpu: handle resize events in example (fixes Vulkan crash on resize)
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-01 10:18:03 +00:00
Stephen Gutekanst
8f3726dfa2
gpu: improve Dawn example backend type detection
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-01 08:46:09 +00:00
Stephen Gutekanst
91728ebde9
gpu: update to latest Dawn version
...
See https://github.com/hexops/dawn/pull/1
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-01 00:01:18 -07:00
Stephen Gutekanst
0fc2876e41
glfw: update Linux SDK (enforce static linkage of libvulkan and libX11-xcb)
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-01 04:04:19 +00:00
Stephen Gutekanst
77a4b5239b
glfw: update Linux system SDK
...
Helps hexops/mach#87
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 16:56:15 -07:00
Stephen Gutekanst
561f9408b8
gpu: add support for building on Linux
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 15:16:09 -07:00
Stephen Gutekanst
e9b481a709
gpu: include Vulkan headers
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 15:02:10 -07:00
Stephen Gutekanst
e1d17f461e
gpu: implement source inclusion for most Vulkan/D3D12/OpenGL backends
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 14:29:53 -07:00
Stephen Gutekanst
3f56f3f964
gpu: make Dawn source inclusion feature-oriented, not target-oriented
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 14:11:28 -07:00
Stephen Gutekanst
30c60162ae
gpu: remove invalid TODOs
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 13:59:34 -07:00
Stephen Gutekanst
17d7d84141
gpu: remove Windows UWP app support (effectively deprecated by Microsoft)
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 13:54:39 -07:00
Stephen Gutekanst
11bc32d21b
gpu: detect platform-specific backend types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 13:53:28 -07:00
Stephen Gutekanst
718ad2a630
gpu: add build-system TODOs
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 11:30:17 -07:00
Stephen Gutekanst
6c93a9d5a4
glfw: add build-system TODOs
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 11:29:56 -07:00
Stephen Gutekanst
5db4ac5bb5
gpu: include system SDK for cross compilation
...
Fixes hexops/mach#85
Fixes hexops/mach#84
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-29 21:59:50 -07:00
Stephen Gutekanst
cbf88d7669
glfw: update system SDKs for macOS 11 cross compilation
...
Fixes hexops/mach#108
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-29 21:24:22 -07:00
Stephen Gutekanst
87ad07a9bf
glfw: CI: re-enable x86_64-macos -> aarch64-macos cross compilation
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-29 21:24:22 -07:00
Stephen Gutekanst
2337d9d832
CI: re-enable x86_64-macos -> aarch64-macos cross compilation
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-29 21:24:22 -07:00
Stephen Gutekanst
256fea8e5f
glfw: do not pin SDK version when using custom dev SDK path
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-29 21:24:22 -07:00
InKryption
cb4f911782
glfw: Fix pointer cast
...
The GLFW implementation takes a constant pointer to a `VkAllocationCallbacks` struct; casting it to a mutable pointer equivalent here doesn't break anything, but does prevent passing a valid const pointer, which is often what one should prefer to do.
As well, the `@alignOf` builtin takes the alignment expected of the type directly, so `@alignOf(*T)` returns the alignment of `*T`, not `T`, so that has also been corrected.
2021-11-29 12:52:46 -07:00
Stephen Gutekanst
979a8bc978
glfw: make system_sdk pin versions, auto-update
...
Prior to this change, an older commit of Mach or mach-glfw would use the latest
version of the native system SDKs, which would sometimes be incompatible. Better
is to ensure that we actually pin the revision we're using, so a given revision
of mach or mach-glfw is using a specific revision of the native SDKs.
Similarly, we previously had no mechanism for updating SDKs: it was either cloned,
or it wasn't. This introduces a simple `git fetch` prior to hard-resetting the SDK
to the target pinned revision - effectively giving us automatic updates for anyone
using an older revision.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-28 18:43:58 -07:00
Stephen Gutekanst
ace36d0542
glfw: rename system_sdk.Options.linux_x86_64_sdk for consistency
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-28 18:43:58 -07:00
Stephen Gutekanst
8447c2fb2a
glfw: correct Apple SDK license prompt
...
Prior to this the Apple SDK license agreement prompt would appear for 11.3 but
not 12.0 by accident. This fixes the issue.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-28 18:43:58 -07:00
Stephen Gutekanst
c68a2881e0
CI: disable x86_64-macos -> aarch64-macos cross compilation
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-27 00:15:15 -07:00
Stephen Gutekanst
eb44c884e4
glfw: CI: disable x86_64-macos -> aarch64-macos cross compilation
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-27 00:15:15 -07:00
Stephen Gutekanst
306789ac73
update CI to latest Zig master version
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-27 00:15:15 -07:00
Stephen Gutekanst
8221a531aa
glfw: update CI to latest Zig master version
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-27 00:15:15 -07:00
Stephen Gutekanst
9b9b53312b
Revert "glfw: patch GLFW sources to workaround a bug where Zig and Mach C headers conflict"
...
This reverts commit 7d47233d7a .
See hexops/mach#102
2021-11-27 00:15:15 -07:00
Stephen Gutekanst
1df13d0509
glfw: update system_sdk to match latest Zig master macOS version targeting
...
The latest Zig master supports specifying a specific macOS version for libc, via
the target triple (ziglang/zig#10215 ):
* x86_64-macos.10 (Catalina)
* x86_64-macos.11 (Big Sur)
* x86_64-macos.12 (Monterey)
* aarch64-macos.11 (Big Sur)
* aarch64-macos.12 (Monterey)
Mach's `system_sdk.zig` can now download the relevant XCode framework stubs
for Big Sur (11) and Monterey (12). Although we don't have an SDK for Catalina (10)
currently, we use the Big Sur (11) SDK in that case and it generally works fine.
By default, Zig targets the N-3 version (e.g. `x86_64-macos` defaults to `x86_64-macos.10`).
Targeting the minimum supported version is useful for compatability, it guarantees the produced
binary will run on any later macOS version. Targeting the newer version can be useful if you
wish to use newer APIs not available in previous versions.
Fixes hexops/mach#102
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-27 00:15:15 -07:00
Stephen Gutekanst
f91ceef291
glfw: support building with latest Zig master
...
This removes a linker hack which was preventing building with the latest
Zig master version. Of particular note, anyone wishing to use this library
will need to ensure they are up to date with latest master.
The binary releases available at https://ziglang.org/download/ (1783+eec825c and
beyond) are sufficient (really, anything released after today.)
Fixes hexops/mach#103
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-26 22:29:58 -07:00
InKryption
7b9b0469cb
glfw: un-hardcode constant
...
Make the constant extracted from GLFW source into `time.setTime`, into a better-documented set of comptime instructions
2021-11-26 22:13:47 -07:00
InKryption
1d648c2256
glfw: Eliminate Error.InvalidValue
2021-11-26 20:50:38 -07:00