Andrew Gutekanst
c11d818c89
examples: add license information
2022-04-14 10:46:31 -07:00
Andrew Gutekanst
a7727c6b54
examples: add ported boids example
...
Ported from https://github.com/austinEng/webgpu-samples/
2022-04-14 10:46:31 -07:00
Andrew Gutekanst
9e945ce951
gpu: improve optional handling
...
Helps hexops/mach#182
2022-04-14 10:46:31 -07:00
Andrew Gutekanst
9489fe7083
examples: prepare for adding more examples
2022-04-14 10:46:31 -07:00
Release automation
2496b50b16
gpu-dawn: update to latest binary release
2022-04-12 19:48:01 +00:00
Michal Ziulek
fe8e0e7c98
gpu: Add default values for some structs (taken from the spec). ( #218 )
...
Helps hexops/mach#182
2022-04-12 12:09:48 -07:00
Isaac Freund
02e357ab44
build: never use pkg-config to link system libraries ( #217 )
...
Every library we want to link against is either provided by the Zig
toolchain or part of our SDK. Therefore, using pkg-config to link
against libraries on the host system is never what we intend.
To fix this, use linkSystemLibraryName() everywhere instead of
linkSystemLibrary() as the latter integrates with pkg-config while the
former just passes -lfoo to the zig compiler.
In combination with Zig commit 38d6e1d8a8 fixing an std.build bug,
this change fixes the linking of the necessary X11 libraries on my
x86_64 glibc based Void Linux system.
2022-04-12 12:08:30 -07:00
Michal Ziulek
f2ce208aa1
gpu: Added helpers to BindGroup.Entry; make dynamic_offset a const slice ( #215 )
...
Helps hexops/mach#
2022-04-11 11:47:02 -07:00
Michal Ziulek
8c8534e609
gpu: Default values for BindGroup.Entry ( #214 )
...
simplifies creating BindGroup - all resources are null by default and the user sets only the one needed.
Helps hexops/mach#182
2022-04-10 15:17:20 -07:00
Michal Ziulek
9ed6f6ca8b
Added helper functions to BindGroupLayout.Entry ( #213 )
...
* gpu: Added helper functions to BindGroupLayout.Entry
* gpu: Changed default values for *.BindingLayout structures. Added comments for helpers.
2022-04-10 14:28:44 -07:00
Michal Ziulek
a943fbed3e
gpu: make RenderPipeline.fragment optional ( #212 )
...
pipeline with vertex stage only is perfectly valid
Helps hexops/mach#182
2022-04-10 10:30:34 -07:00
Michal Ziulek
d0782d24d1
gpu: VertexBufferLayout.attributes field needs to be a pointer to multiple structures.
2022-04-09 12:33:27 -07:00
Release automation
6d8e39a247
gpu-dawn: update to latest binary release
2022-04-09 01:14:08 +00:00
Stephen Gutekanst
ea93eea21f
gpu-dawn: use buffered reader (reduce gzip extraction time 76s -> 5.5s)
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-08 17:23:12 -07:00
Stephen Gutekanst
eac7efa5d1
gpu: fix regression in example causing it not to compile
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-08 16:58:27 -07:00
Stephen Gutekanst
d2d5bdc892
glfw: zig fmt
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-08 16:54:37 -07:00
Release automation
5c194cfc07
gpu-dawn: update to latest binary release
2022-04-08 18:45:23 +00:00
Silver
786d8181b4
gpu-dawn: fix formatting of .gitmodules
2022-04-08 11:03:00 -07:00
Silver
6fb3ec6fd8
gpu: make writeBuffer API nicer to use
2022-04-08 11:03:00 -07:00
Silver
5ecb980b5f
gpu: fix signature of CommandEncoder.writeBuffer
2022-04-08 11:03:00 -07:00
Silver
614322edc7
gpu: convert Texture.Usage to packed struct
2022-04-08 11:03:00 -07:00
Silver
adf5332969
app: add resize callback function
2022-04-08 11:03:00 -07:00
Silver
c62b5ba52f
gpu: replace &slice[0] with slice.ptr
...
This avoids UB if the slice is empty
2022-04-08 11:03:00 -07:00
Silver
f4c8a1908d
gpu: fix BindGroup.Entry so that optional things are optional
2022-04-08 11:03:00 -07:00
Silver
35b38dfa96
gpu: fix typo in writeBuffer and writeTexture
2022-04-08 11:03:00 -07:00
Silver
47cd84f8ff
gpu: use packed structs to wrap WebGPU's bitfield enums
2022-04-08 11:03:00 -07:00
Silver
232d0dc5ad
gpu: rename BlendFactor.oneMinusSrcAlpha to match Zig naming style
2022-04-08 11:03:00 -07:00
Silver
d82b3f6cbb
publicize gpu and glfw from toplevel build.zig
2022-04-07 18:42:15 -07:00
Silver
04da4565c1
gpu: add type to pkg def in build.zig
2022-04-07 18:42:15 -07:00
Silver
017ca6dd08
glfw: add type to pkg def in build.zig
2022-04-07 18:42:15 -07:00
Silver
6ec499cf70
clean up build.zig and add type to pkg def
2022-04-07 18:42:15 -07:00
Stephen Gutekanst
8b2ae06121
CI: temporarily disable macOS 11 test
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
f7cea5f304
CI: use macos-latest runners (macos-12 runners rarely available)
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
3bf471ccf9
CI: fix x86_64-windows -> macOS build
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
51b1f36d0a
CI: correct build for macOS 12
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
d3d17ec570
CI: build on macos-12 not 11
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
c3f8f9a4d5
correct glfw package dependency
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
d0c55db017
CI: more explicitly denote cross-compilation targets
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
49f80de6ab
add higher-level app library
...
Fixes hexops/mach#190
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
38095942d9
gpu: make Options public
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
451b437322
gpu: add std.build.Pkg definition
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
0161ccef37
glfw: add std.build.Pkg definition
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Stephen Gutekanst
cd88057edd
gpu: add gpu.link to make using library elsewhere easier
...
Helps hexops/mach#189
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-05 00:16:51 -07:00
Roman Frołow
73c145819a
README: fix URL to build-an-ecs blog series ( #204 )
2022-04-04 22:09:39 -07:00
Release automation
3d0be5ad53
gpu-dawn: update to latest binary release
2022-03-31 17:58:16 +00:00
Stephen Gutekanst
f321651c62
gpu-dawn: fix bad merge
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-31 17:18:08 +00:00
Stephen Gutekanst
a361f807a9
gpu-dawn: fix error when curl is unavailable / not installed
...
Fixes hexops/mach#197
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-31 16:57:40 +00:00
Stephen Gutekanst
fbbb0b0ae0
gpu: use Dawn adapter creation API for now so that GPU_BACKEND selection works
...
`webgpu.h` does not expose a method of choosing the GPU backend (vulkan, opengl, opengles, etc.)
at present. The only way to achieve this is to use Dawn's C++ API, which we expose as C shims
under the `machDawnNative*` prefix.
For now, we will use the Dawn adapter creation API so that we can choose between Vulkan/OpenGL/OpenGLES
etc via the `GPU_BACKEND` env var.
In the future, I believe we can do something nicer here. For example, perhaps we extend our `requestAdapter`
method (after all, we do not need to strictly match `webgpu.h`) to take such an option and be Dawn-aware so
that it handles this more seamlessly behind the scenes.
Fixes https://github.com/hexops/mach/issues/192#issuecomment-1080895255
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-31 16:57:30 +00:00
Stephen Gutekanst
1f076da7bf
gpu: add gpu.NativeInstance.fromWGPUAdapter
...
For when you have a native adapter and need a wrapped one.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-31 16:51:18 +00:00
Stephen Gutekanst
354df53523
gpu-dawn: expose dawn::native::Adapter->Get as C shim
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-31 16:50:09 +00:00