Stephen Gutekanst
0645429df9
all: move standalone libraries to libs/ subdirectory
...
The root dir of our repository has grown quite a lot the past few months.
I'd like to make it more clear where the bulk of the engine lives (`src/`) and
also make it more clear which Mach libraries are consumable as standalone projects.
As for the name of this directory, `libs` was my first choice but there's a bit of
a convention of that being external libraries in Zig projects _today_, while these
are libraries maintained as part of Mach in this repository - not external ones.
We will name this directory `libs`, and if we have a need for external libraries
we will use `external` or `deps` for that directory name. I considered other names
such as `components`, `systems`, `modules` (which are bad as they overlap with
major ECS / engine concepts), and it seems likely the official Zig package manager
will break the convention of using a `libs` dir anyway.
Performed via:
```sh
mkdir libs/
git mv freetype libs/
git mv basisu libs/
git mv gamemode libs/
git mv glfw libs/
git mv gpu libs/
git mv gpu-dawn libs/
git mv sysaudio libs/
git mv sysjs libs/
git mv ecs libs/
```
git-subtree-dir: glfw
git-subtree-mainline: 0d5b853443
git-subtree-split: 572d1144f11b353abdb64fff828b25a4f0fbb7ca
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
git mv ecs libs/
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-26 15:12:04 -07:00
Stephen Gutekanst
ca028ea038
gpu: improve compatibility with self-hosted compiler
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-19 20:44:11 -07:00
Stephen Gutekanst
381f2fe9c5
gpu: fix redeclaration of function parameter errors
...
This changed in the latest version of Zig to be more strict.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-19 12:34:08 -07:00
Stephen Gutekanst
358baf08e2
gpu: add Device.createShaderModuleWGSL helper
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-16 22:00:22 -07:00
Stephen Gutekanst
ae5bb78e09
gpu: correctly allow unsetting Device.setLoggingCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-16 21:34:32 -07:00
Stephen Gutekanst
2007542231
gpu: correctly allow unsetting Device.setUncapturedErrorCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-16 21:29:06 -07:00
Stephen Gutekanst
612c4420d6
gpu: correctly allow unsetting Device.setLostCallback
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-16 21:13:36 -07:00
Stephen Gutekanst
e4ee5e221b
gpu: add type-safety for chaining dawn.CacheDeviceDescriptor
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-16 20:43:41 -07:00
Stephen Gutekanst
7fa4075714
gpu: add type-safety for chaining dawn.TogglesDeviceDescriptor
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-16 20:42:45 -07:00
Stephen Gutekanst
03a9cbab9a
gpu: add Device.Descriptor.init slice helper
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-16 17:35:18 -07:00
Stephen Gutekanst
f366244a9a
gpu: add TODOs for slice helper candidates
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-16 10:46:49 -07:00
Stephen Gutekanst
58600faa0d
gpu: make ctx parameters in callbacks always first
...
This matches the order of context parameters always being first in the Zig stdlib
with e.g. sorting and similar places where a context parameter exists.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
4429be4f5f
gpu: correct alignment casts of callback helpers
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
5d88387dac
gpu: make setBindGroup methods use slice helper API
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
b369635193
gpu: add Device.enumerateFeaturesOwned helper
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
726bdf3fba
gpu: adopt new dawn.json policy for optionality of slice fields, default zero values
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
8bce5bc0a8
gpu: correct Device.default_queue default value
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
9f4a93cbef
gpu: update to latest revision as of 2022-08-06
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
8a0d47b94b
gpu: correct context pointer alignments
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
4ed932be0f
gpu: simplify callback context types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
0228b50dba
gpu: make Device.setDeviceLostCallback friendlier
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
dec1f08dd1
gpu: make Device.popErrorScope friendlier
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
2e611565b4
gpu: make Device.createRenderPipelineAsync friendlier
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
a452d03589
gpu: make Device.createComputePipelineAsync friendlier
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
29cd383f0e
gpu: make Device.setLoggingCallback friendlier
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
6f2f7056b7
gpu: make Device.setUncapturedErrorCallback friendlier
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
be402d4b6d
gpu: add TODOs about unsetting callbacks
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
a468c51ad4
gpu: correct nullability of userdata pointers
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
cccfef52f9
gpu: internalize Texture types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
e9dcb49328
gpu: internalize SwapChain types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
23fb836ce8
gpu: internalize ShaderModule types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
b0776270d3
gpu: internalize Sampler types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
550c5fd55e
gpu: internalize RenderPipeline types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
836c46cc6c
gpu: internalize RenderBundleEncoder types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
b4830688bb
gpu: internalize Queue types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
f4a6e08357
gpu: internalize QuerySet types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
1a57ae1c4d
gpu: internalize PipelineLayout types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
09bbc8458a
gpu: internalize ExternalTexture types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
0a69ef98fa
gpu: internalize Device types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
b5bf0da50d
gpu: internalize ComputePipeline types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
85fbe41a86
gpu: internalize CommandEncoder types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
9ba109f659
gpu: internalize Buffer types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
e10432834b
gpu: internalize BindGroup types
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
e6f3d3c2f0
gpu: move callbacks to separate file
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
1ce40e1b46
gpu: fix tests
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
f59435f0b0
gpu: convert *opaque -> opaque for SwapChain
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
2c1a8240c5
gpu: convert *opaque -> opaque for ShaderModule
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
397f2eb1c9
gpu: convert *opaque -> opaque for RenderPipeline
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
0372525c91
gpu: convert *opaque -> opaque for RenderBundleEncoder
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00
Stephen Gutekanst
f73621cba2
gpu: convert *opaque -> opaque for Queue
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-08-12 00:43:43 -07:00