Commit graph

3600 commits

Author SHA1 Message Date
Ali Chraghi
7991053b37 spirv: sqrt instruction 2024-04-21 17:33:22 -07:00
Stephen Gutekanst
487beaabde examples: rename sysaudio example -> piano
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 16:38:15 -07:00
Stephen Gutekanst
58ffa2c870 examples: sysaudio: provide better controls
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 16:34:46 -07:00
Stephen Gutekanst
c90dcb4275 build: update version
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 16:28:11 -07:00
Stephen Gutekanst
fc56f296e9 build: organize dependencies; remove currently-unused spirv deps
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 16:27:14 -07:00
Stephen Gutekanst
f078e8f3f9 build: update mach-glfw (fix linux build)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 15:01:45 -07:00
Stephen Gutekanst
d04cd26c84 use lazyDependency to optimize freetype/font-assets dependency fetching
Helps hexops/mach#1197

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 15:01:45 -07:00
Stephen Gutekanst
38fb23e22a build: fix core example imports
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 15:01:45 -07:00
Stephen Gutekanst
c26d9a40d1 build: use lazy dependencies
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 15:01:45 -07:00
Stephen Gutekanst
51f5721f8b build: remove currently-unused basisu dependency
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 15:01:45 -07:00
Stephen Gutekanst
e8b95d5076 build: cleanup sysjs dependency utilization
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 15:01:45 -07:00
Stephen Gutekanst
a681a10170 build: use lazyDependency to only download required dependencies
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 15:01:45 -07:00
Stephen Gutekanst
2889468c6b build: remove App (not CoreApp)
This removes the old `App` builder, leaving only `CoreApp` as something
to resolve/remove.

Helps hexops/mach#1186

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-21 15:01:45 -07:00
Stephen Gutekanst
7a1efdaa69 core: cleanup sysgpu feature flag logic
* `@import("mach").core.gpu` has been renamed to `@import("mach").gpu`
* `pub const SYSGPUInterface` now has a default value (i.e. you do not need to write it in your main.zig, if you were.)
* You can now check `if (comptime mach.use_sysgpu)` for any conditional code you might have that should only run with sysgpu.

This (old):

```
pub const mach_core_options = core.ComptimeOptions{
    .use_wgpu = false,
    .use_sysgpu = true,
};
```

Has been replaced by this:

```
pub const use_sysgpu = true;
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-19 20:48:33 -07:00
Stephen Gutekanst
6a2358baf8 build: fix WASM builds
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-19 19:34:40 -07:00
Stephen Gutekanst
07d9855f73 core: examples: update import path style
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-19 19:05:18 -07:00
Stephen Gutekanst
78edb10446 build: fix duplicate symbol machDawnGetProcTable
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-19 18:46:04 -07:00
Stephen Gutekanst
2bc17a33fb module: correct alignment of dispatched arguments; move stack space to caller
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-19 18:05:17 -07:00
Stephen Gutekanst
09c01a79b0 build: fix test build
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-19 17:08:36 -07:00
Stephen Gutekanst
d2179e8f2c gfx: correct some zls autofixes
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-18 21:04:43 -07:00
Stephen Gutekanst
87a7cd8ed8 engine: remove mach.Engine in favor of mach.Core for now
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-17 11:30:51 -07:00
Stephen Gutekanst
7011ad4848 audio: handle possible invalidated pointer after buffer growth
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-17 11:28:37 -07:00
Stephen Gutekanst
d045b34f70 {gfx,examples}: update all to new mach.Core module API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-17 11:27:48 -07:00
Stephen Gutekanst
ac4fe65eb2 examples: core-custom-entrypoint: revise based on SYCL24 learnings
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 21:41:37 -07:00
Stephen Gutekanst
4ba8addb3c core: synchronize global .init before first .tick
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 20:48:04 -07:00
Stephen Gutekanst
2c73f8c518 examples: remove gkurve test-bed for now (will come back later)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 19:31:42 -07:00
Stephen Gutekanst
d573a59d67 examples: core-custom-entrypoint: minor cleanup
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 19:15:19 -07:00
Stephen Gutekanst
282c83877e audio: redesign audio module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 19:14:37 -07:00
Stephen Gutekanst
2b7b8f5571 math: add pow
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 19:14:37 -07:00
Stephen Gutekanst
80780054b5 module: fix removeComponent, add TODO about stack space
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 19:14:37 -07:00
Stephen Gutekanst
c7f39f0dbe sysaudio: correct latency comment
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 19:14:37 -07:00
Stephen Gutekanst
3d8c28a361 all: rename parameters foo_mod -> foo
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 19:14:37 -07:00
Stephen Gutekanst
f1dbc3955c audio: cleanup audio module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 11:48:15 -07:00
Ali Chraghi
be3300b80a audio: add audio mixing/playback module 2024-04-16 10:50:59 -07:00
Stephen Gutekanst
b0d6c88f3b audio: reduce alsa and pulseaudio latency to 30ms
Closes #928

Change contributed by Ali in https://github.com/hexops/mach/pull/1138
I am just cleaning up the commit.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 10:48:00 -07:00
Stephen Gutekanst
74595362d3 gfx: add some Text module TODOs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 10:41:32 -07:00
Stephen Gutekanst
b90b70084e examples: glyphs: improve code structure / naming / init logic
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 10:40:36 -07:00
Stephen Gutekanst
8e3f9e21e1 module: add MACH_DEBUG_TRACE option to get logs of event dispatch order
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 10:39:35 -07:00
Stephen Gutekanst
16a895240d gfx: improve Sprite module pipeline management
* No longer abuse event arguments for pipeline information.
* Store pipeline information as entities/components.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-16 10:10:37 -07:00
Stephen Gutekanst
5714a60108 gfx: split text style entity components into a distinct module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-15 02:42:07 -07:00
Stephen Gutekanst
2cf68adcc7 src/gpu: move github.com/hexops/mach-gpu here
This moves github.com/hexops/mach-gpu@528dad0823dafeae5d474c88cc658b091bf2e605 to
this repository in the src/gpu directory. It can be imported via `@import("mach").gpu`.

Soon we will move away from mach-gpu entirely as part of #1166 - but in the meantime
I am giving a workshop at https://sycl.it and it would be nice for people using the
`mach.gpu.*` API to be able to search the API in this single repository.

There's not much harm to moving this code here.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-13 11:25:45 -07:00
Ali Chraghi
c45606c290 sysaudio: disable i24 sample format
Workaround for #1152
2024-04-13 07:25:39 -07:00
Stephen Gutekanst
d1c3d26710 core: provide a default pub const GPUInterface
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-09 21:20:48 -07:00
Stephen Gutekanst
3583e1754f core: add a TODO regarding module API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-09 18:53:18 -07:00
TheHonestHare
f369b31137 added swap chain usage flags to core.init() options 2024-04-08 23:54:43 -07:00
Stephen Gutekanst
27fd19271c examples: migrate custom-renderer to mach.Core module API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-08 23:49:38 -07:00
Stephen Gutekanst
013546b189 core: add mach.Core module API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-08 23:49:38 -07:00
Stephen Gutekanst
69b749879d core: refactor glfw appUpdateThread
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-08 23:49:38 -07:00
Stephen Gutekanst
c32c1df00a module: improve validation of missing mod name
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-08 23:49:38 -07:00
Stephen Gutekanst
c46d949b98 module: improve "cannot inject argument" error message
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2024-04-07 22:37:59 -07:00