Commit graph

1454 commits

Author SHA1 Message Date
iddev5
1f95bd48df examples: use engine.core.setKeyCallback() instead of accessing glfw directly 2022-05-09 08:08:01 -07:00
iddev5
5396769227 mach: implement all glfw -> mach key mappings 2022-05-09 08:08:01 -07:00
iddev5
71b7473ee7 mach: implement key press/release callback 2022-05-09 08:08:01 -07:00
iddev5
7a392b2780 mach: Add enums for keys and actions 2022-05-09 08:08:01 -07:00
Michal Ziulek
5a2aebb14b
gpu: correct sending of pointer to a local var to a callback function (#271) 2022-05-08 15:04:25 -07:00
PiergiorgioZagaria
a1daf399a3 examples: created gkurve example 2022-05-08 15:02:39 -07:00
PiergiorgioZagaria
ddf8704559 examples: fixed uniform buffer release and unused var 2022-05-08 09:48:05 -07:00
Stephen Gutekanst
f97af80410
README: fix typo
Closes #268
2022-05-07 09:18:19 -07:00
Stephen Gutekanst
7ea0d84218 Revert "gpu-dawn: update to latest binary release" (CI broken)
This reverts commit c02424c435.
2022-05-05 12:35:35 -07:00
Release automation
c02424c435 gpu-dawn: update to latest binary release 2022-05-04 19:55:25 +00:00
iddev5
5861893752 CI: check compilation of all examples 2022-05-04 11:53:37 -07:00
d3m1gd
09f3adf2b4 examples: fix typo 2022-05-04 11:53:16 -07:00
iddev5
8904536632 mach: comptime interface-like implementation of engine cores 2022-05-01 17:07:29 -07:00
iddev5
2b978a6883 examples: fix unwanted fractal cube resource releases causing validation error 2022-05-01 11:46:43 -07:00
Lee Cannon
4570838304
Update to latest Zig master (0.10.0-dev.2017+a0a2ce92c) (#261)
* use `@ceil` instead of `std.math.ceil`
* `ChildProcess.init` does not allocate anymore
* update CI zig version
* examples: temporarily switch to fork of zigimg compatible with zig-master

Commands executed:

```
git submodule set-url -- examples/libs/zigimg https://github.com/slimsag/zigimg
git submodule set-branch --branch zig-master -- examples/libs/zigimg
git submodule update --init --remote examples/libs/zigimg
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-01 11:44:27 -07:00
Michal Ziulek
0e64b9608c
gpu: 'dynamic_offsets' should be '?[] const u32' everywhere. (#260) 2022-04-30 08:57:10 -07:00
iddev5
e1192877c3 build: compile examples and applications on demand
Without this change, anytime a dependency is modified, all the examples
and applications are rebuilt before tring to run any of them. The
problem with this approach is that it leads to long compile times which
will keep on increasing as more and more examples are added.
2022-04-30 01:10:56 -07:00
Silver
ea76aa0268 gpu: fix store_op 2022-04-29 13:10:04 -07:00
iddev5
7c518f7bd6 shaderexp: port to new API 2022-04-29 13:06:42 -07:00
iddev5
218a6a5c08 examples: port to new API 2022-04-29 13:06:34 -07:00
iddev5
5c984d9795 mach: finalizing changes for now 2022-04-29 12:48:47 -07:00
iddev5
5249e72408 example: finalize triangle example to new API 2022-04-29 12:48:47 -07:00
iddev5
60fd89ec45 mach: make App.options optional 2022-04-29 12:48:47 -07:00
iddev5
7598c2d7b8 mach: Enable App.resize() and verify if all necessary functions are exported by App 2022-04-29 12:48:47 -07:00
iddev5
2aedc4ca01 mach: implement App struct in terms of unified entry point 2022-04-29 12:48:47 -07:00
iddev5
3e87b383d2 examples: workaround fix for testing unified entry point 2022-04-29 12:48:47 -07:00
iddev5
d99359421e mach: begin unified entry point interface 2022-04-29 12:48:47 -07:00
iddev5
ffcd5dfaa8 examples: fix incorrect release of resources in fractal-cube 2022-04-29 12:45:04 -07:00
Stephen Gutekanst
69049da970 correct submodule remote
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 20:14:51 -07:00
Stephen Gutekanst
4a5b37787d correct asset submodule path
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 20:10:17 -07:00
Stephen Gutekanst
d6f1560afd examples: ensure zigimg & assets submodules are cloned
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 20:00:40 -07:00
PiergiorgioZagaria
d6dad96059 examples: added fractal-cube example 2022-04-24 23:24:34 +00:00
Stephen Gutekanst
d0d0db8725 examples: add textured-cube example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 16:07:59 +00:00
Stephen Gutekanst
f8e7f96a4a gpu: correct RenderPassDepthStencilAttachment default values
Helps hexops/mach#182

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 16:07:59 +00:00
Stephen Gutekanst
821117fb26 gpu: correct TextureView.Descriptor default values
Helps hexops/mach#182

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 16:07:59 +00:00
Stephen Gutekanst
99de6a5b11 examples: add assets submodule
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 16:07:59 +00:00
Stephen Gutekanst
77e86f22c5 examples/libs: add zigimg dependency
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-24 16:07:59 +00:00
d3m1gd
ce1aeafa84
choose first adapter (#251)
Related to hexops/mach#216

Co-authored-by: d3m1gd <mach+d3m1gd@users.noreply.github.com>
2022-04-22 18:50:42 -07:00
Stephen Gutekanst
c535e041bd gpu: correct default TextureView.Descriptor.format value
According to kangz `WGPUTextureFormat_Undefined` is the correct default value for
`TextureView.Descriptor.format`. According to the spec, the default should be the
associated _Texture_'s descriptor.format, but it seems Dawn internally handles
this when set to `Undefined` - we will take the same approach.

https://matrix.to/#/!MFogdGJfnZLrDmgkBN:matrix.org/$eVPXZMzewxJMZ_25K5jVV2N6SVriMUovkfXZI62Kq-k?via=matrix.org&via=mozilla.org&via=zinz.dev

Helps hexops/mach#182

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-22 16:19:02 -07:00
Release automation
118a3468ae gpu-dawn: update to latest binary release 2022-04-22 07:47:44 +00:00
Stephen Gutekanst
53e57e8e78
gpu-dawn: update Dawn to latest revision as of 2022-04-21 (#250)
upstream @ c2f9fea56bee11cf573fe90b08a296a38202500b

Includes fix for UB on Linux/Vulkan: https://github.com/hexops/dawn/pull/11

Closes hexops/mach#239

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 23:58:21 -07:00
PiergiorgioZagaria
4e3a58897b
gpu: mirror more WebGPU spec default values (#249)
Helps hexops/mach#182
2022-04-21 18:38:26 -07:00
PiergiorgioZagaria
8df8b043ad
shaderexp: add initial shader explorer tool (#245)
* shaderexp: first commit
* shaderexp: further improve error handling
* shaderexp: attribute ray_marching example

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 04:44:02 -07:00
Stephen Gutekanst
8d574e772c examples: rename texture-light -> advanced-gen-texture-light
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 04:39:24 -07:00
Stephen Gutekanst
417ec654df examples: texture-light: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 04:39:24 -07:00
Stephen Gutekanst
9ec8553cf8 examples: texture-light: more instances, rotate camera by default, make movement independent of frame-rate
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 04:39:24 -07:00
Stephen Gutekanst
e7609c76a2 examples: texture-light: don't crash on window resize (recreate depth buffer)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 04:39:24 -07:00
Stephen Gutekanst
7daff572f3 examples: correct texture size for running on macOS
```
mach: found Metal backend on Discrete GPU adapter: Apple M1, Metal driver on macOS Version 12.1 (Build 21C52)
gpu: validation error: Attachment [TextureView] size (width: 640, height: 480) does not match the size of the other attachments (width: 1280, height: 960).
 - While validating depthStencilAttachment.
 - While encoding [CommandEncoder].BeginRenderPass([RenderPassDescriptor]).
```

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 04:39:24 -07:00
d3m1gd
45df76bdd8 example: texture and light 2022-04-21 04:39:24 -07:00
Release automation
538af3e6df gpu-dawn: update to latest binary release 2022-04-21 11:28:09 +00:00