Commit graph

1481 commits

Author SHA1 Message Date
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
d3m1gd
6300c85e79
examples: fix blend mode in triangle example (#240)
Co-authored-by: d3m1gd <mach+d3m1gd@users.noreply.github.com>
2022-04-18 23:50:23 -07:00
Stephen Gutekanst
0db0481f01
README: fix formatting, add sponsor section, etc. 2022-04-18 23:48:39 -07:00
Stephen Gutekanst
6901711734
README: polish it up! 2022-04-18 23:29:49 -07:00
Release automation
c9ac61c1c4 gpu-dawn: update to latest binary release 2022-04-19 04:26:30 +00:00
Stephen Gutekanst
954a5d3cc0 gpu-dawn: fix compilation on Linux
Helps hexops/mach#236

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-18 20:47:23 -07:00
Michal Ziulek
bd28946397 gpu: Changes needed for latest Dawn (generated-2022-04-18). 2022-04-18 20:45:33 -07:00
Stephen Gutekanst
b2ac779180 glfw: update vulkan headers to latest (adds v1.3 support)
Produced via `./update-upstream.sh`

Helps hexops/mach#236

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-18 20:44:34 -07:00
Stephen Gutekanst
a127378b19 gpu-dawn: update Dawn to latest revision as of 2022-04-18
Effectively a redo of hexops/mach#231 where I messed up the submodule update by accident.

Updates Dawn to latest revision as of 2022-04-18 c7b7b6def6

* Followed https://github.com/hexops/dawn/tree/main/mach#updating
* The UB issue should now actually get fixed (once CI builds the binary releases.)
* Verified example runs on macOS.

Helps hexops/mach#221

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-18 11:38:32 -07:00
PiergiorgioZagaria
169b1e2a42
gpu: correct alignment in pointer casts; handle void Context in all callbacks (#233)
* Fixed ErrorCallback.init() alignment
* Fixed callbacks alignments
* Fixed more of the callback alignment problems
* Added checks for void Context in callback
2022-04-18 11:38:09 -07:00
Stephen Gutekanst
d664c8e55d
do not produce needless libraries (#220)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-18 10:32:21 -07:00
Stephen Gutekanst
7285fa0f03 gpu-dawn: correct update to latest Dawn revision
In e673e6c5d4 I failed to update the submodule correctly, this
commit fixes that and actually updates us to the latest Dawn revision.

Helps hexops/mach#221

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-18 06:47:00 -07:00
Release automation
3b92e9f2cf gpu-dawn: update to latest binary release 2022-04-18 07:30:07 +00:00