Commit graph

1293 commits

Author SHA1 Message Date
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
Stephen Gutekanst
c600431244 gpu-dawn: clarify how to build as separate repository
Fixes hexops/mach#203

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 03:48:36 -07:00
Stephen Gutekanst
a863bde72f Revert "gpu-dawn: update to latest binary release"
This reverts commit c930f4b913.

Helps hexops/mach#248
2022-04-21 03:41:49 -07:00
Stephen Gutekanst
89c9c6c8e1 CI: correct YAML syntax / regression
Helps hexops/mach#248

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 03:41:38 -07:00
Release automation
c930f4b913 gpu-dawn: update to latest binary release 2022-04-21 07:03:52 +00:00
Stephen Gutekanst
58664afbd6 gpu/examples: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-20 23:01:52 -07:00
Stephen Gutekanst
7ebe8cde5e glfw: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-20 23:01:39 -07:00
Stephen Gutekanst
8137f1a914 examples: zig fmt
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-20 23:01:30 -07:00
Johan Forsberg
3b86aa08cc
examples: add instanced-cube example (#246)
add example based on webgpu-samples' instancedCube sample.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-20 23:00:02 -07:00
PiergiorgioZagaria
8f7a20d2e6
examples: fix BlendState for rotating-cube and two-cubes (#244) 2022-04-20 10:59:40 -07:00
iddev5
bb65083561 CI: dont run aarch64-mac workflow on forks
The workflow uses a self hosted runner which is only available for
hexops/mach* repositories. Without this commit, whenever a fork of mach
or mach-* were pushed, it would queue an aarch64-mac job and then crash
after one day due to no machines being found.
2022-04-19 20:12:22 -07:00
iddev5
fde336736d README: Add web (wasm) status 2022-04-19 01:30:13 -07:00