Commit graph

2890 commits

Author SHA1 Message Date
Stephen Gutekanst
cf1e870688 shaderexp: update to latest mach/core API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-26 00:19:45 -07:00
Stephen Gutekanst
40351f85ba core: make Core.pollEvents return an iterator, remove Core.hasEvent
After this change:

* `Core.pollEvents` returns an iterator. At the time of polling events, Mach core
  will perform work to poll for events, handle resizing of the framebuffer, etc.
  and the iterator allows the caller to consume all available events.
* The event queue is now baced by a `std.fifo.LinearFifo`, which removes the need
  for dynamic allocation of each event. Instead, the event queue starts with a generous
  size suitable for most high-end gaming setups (high-precision mouse, etc.) and can
  grow, but never shrink, up to the maximum event queue size experienced by the app
  within any given frame. Effectively, this means we find the maximum capacity needed
  to store events and avoid runtime allocations.
* `Core.hasEvent` is removed.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-26 00:19:45 -07:00
Stephen Gutekanst
b497a1bbeb mach: expose build step/etc info from App
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 21:57:42 -07:00
Stephen Gutekanst
3ff4bcc2a3 mach: finish splitting Core and Engine
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
603dc4c17f core: follow Sdk build pattern
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
c4cc1e79a3 core: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
cf8f94d36c core: fix test binary name
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
2094e59627 core: correct standalone build
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
f7277441a2 core: add libs symlinks
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
9bbada90b2 {mach,core}: move core sources to libs/core
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Stephen Gutekanst
562b908c84 libs/core: initialize subproject from dev/template
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-24 18:14:52 -07:00
Ali Chraghi
c6b8b979bc build: serve app on / 2023-01-23 00:20:54 -07:00
Ali Chraghi
82a853045f sysaudio: rename dummy to default in webaudio 2023-01-23 00:20:54 -07:00
Ali Chraghi
3947e51025 build: set rdynamic=true to export symbols 2023-01-23 00:20:54 -07:00
Stephen Gutekanst
cb156a46d6 dev: template: fix broken link
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-22 14:58:09 -07:00
Stephen Gutekanst
8f8b173729 dev/template: do not attempt to run cross compilation
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-22 14:54:00 -07:00
Stephen Gutekanst
044288e5a0 basisu: do not attempt to run cross compilation
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-22 14:53:41 -07:00
Stephen Gutekanst
a5aa410ddb earcut: do not attempt to run cross compilation
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-22 14:53:27 -07:00
Stephen Gutekanst
21ac70827e dev: update ensure-standard-files script
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-22 14:50:51 -07:00
Wrench[bot]
5267233347 gpu-dawn: update to latest version origin/generated-2023-01-20.1674251751
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-20 16:20:36 -07:00
Ali Chraghi
dac31d6d7c system_sdk: update to latest revision 2023-01-20 14:53:22 -07:00
Ali Chraghi
05968f0496 sysaudio: load libpipewire-0.3.so dynamically 2023-01-20 14:53:22 -07:00
Ali Chraghi
655e061d50 sysaudio: load libasound.so dynamically 2023-01-20 14:53:22 -07:00
Ali Chraghi
ea8ff67ae4 sysaudio: load libjack.so dynamically 2023-01-20 14:53:22 -07:00
Ali Chraghi
13ad66b7ad sysaudio: load libpulse.so dynamically 2023-01-20 14:53:22 -07:00
Ali Chraghi
ee84f6ab70 sysaudio: move DeviceChaneFn to Context and rename ConnectError to InitError 2023-01-20 14:53:22 -07:00
Ali Chraghi
192cacb85d mach: put logFn function to std_options 2023-01-20 14:53:22 -07:00
Ali Chraghi
c7b9d9e107 gpu: ci: add workflow 2023-01-20 14:53:22 -07:00
Ali Chraghi
cd61c631f2 glfw: ci: don't run tests when cross-compiling 2023-01-20 14:53:22 -07:00
Ali Chraghi
320090ee42 freetype: ci: don't run tests when cross-compiling 2023-01-20 14:53:22 -07:00
Ali Chraghi
36a40dc51a sysaudio: add workaround for wine
wine crashes when using AudioClient3. it's weird since it returns success when quering
2023-01-20 14:53:22 -07:00
Ali Chraghi
7315d1ab62 sysaudio: access sample rate from field (except for jack) and add media role option 2023-01-20 14:53:22 -07:00
Ali Chraghi
bb6a654c90 sysaudio: pipewire backend
missing features:\n - volume adjustment\n - device watcher\n - device listing (default device)
2023-01-20 14:53:22 -07:00
Stephen Gutekanst
1b375f70ce Revert "gpu-dawn: update to latest binary release"
This reverts commit 2edfa729ec.
2023-01-20 04:46:27 -07:00
Stephen Gutekanst
0e9746d2e2 gpu-dawn: pin Dawn version using branch name not SHA
so that Wrench can automatically update it (and because branch name is already
versioned)

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-19 20:47:25 -07:00
Release automation
2edfa729ec gpu-dawn: update to latest binary release 2023-01-20 02:30:57 +00:00
Release automation
9873ec5c1c gpu-dawn: update to latest binary release 2023-01-20 02:15:28 +00:00
Stephen Gutekanst
988b5c0da8 Revert "gpu-dawn: update to latest version origin/generated-2023-01-19.1674151689"
This reverts commit 858003f6e4.
2023-01-19 18:38:26 -07:00
Wrench[bot]
858003f6e4 gpu-dawn: update to latest version origin/generated-2023-01-19.1674151689
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-19 18:34:30 -07:00
Release automation
c694f50295 gpu-dawn: update to latest binary release 2023-01-18 18:15:58 +00:00
Wrench[bot]
4681425f56 all: update Zig to version 0.11.0-dev.1350+bbab4beda
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-18 10:34:40 -07:00
Stephen Gutekanst
0eaa56b4ad mach: platform/libmach: update to latest mach/core API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-17 09:49:40 -07:00
Stephen Gutekanst
a15b9bb5f6 mach: platform/wasm: correct return signature
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-17 09:49:40 -07:00
Stephen Gutekanst
02ba76a95b shaderexp: update to latest mach/core API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-17 09:49:40 -07:00
Stephen Gutekanst
8082228186 mach: eliminate heap allocation of Core
Prior to this change `mach.Core.init` would heap allocate the structure, returning `*Core`:

```zig
app.core = try mach.Core.init(allocator, .{});
```

This was obviously not ideal, but wasn't possible to eliminate before due to how Core was
entangled with the platform abstraction. Now that it has been removed, we can reduce Core
initialization to take a `*Core` to initialize. In practice this means initialization looks
something like this:

```zig
try mach.Core.init(&app.core, alloctor, .{});
```

Or more simply:

```zig
try app.core.init(allocator, .{});
```

And we eliminate the `*Core` allocation entirely in most cases.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-17 09:49:40 -07:00
Austin Rude
f54d584991 gpu: fix getting adapter propeties in example
Dawn now verifies the next chain is null, requiring this change. See
3c9d26a6 and the code review comments for more info.
2023-01-15 17:57:00 -07:00
Austin Rude
77341e2905 gpu: link glfw directly to gpu 2023-01-15 17:57:00 -07:00
Stephen Gutekanst
9d1c96ed0e gpu: improve SupportedLimits query example
`supported` is a better variable name because `supported.limits.foobar` is the actual
way it need be referenced, and `limits.limits.foobar` would be redundant.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-15 13:21:25 -07:00
Ali Chraghi
2fd8e876fd mach: re-create swapchain on vsync mode change 2023-01-15 09:45:17 -07:00
Release automation
24132ad4d9 gpu-dawn: update to latest binary release 2023-01-15 16:09:14 +00:00