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
Stephen Gutekanst
13de9d6a8c
gpu: make -Ddawn-from-source=true work in gpu/ example
...
Previously this was only working in the gpu-dawn/ example.
Fixes hexops/mach#196
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-31 16:45:46 +00:00
Release automation
263b9708fd
gpu-dawn: update to latest binary release
2022-03-31 01:35:53 +00:00
Mitchell Hashimoto
88ee3bf668
gpu-dawn: build.zig needs to reference thisDir for C file
2022-03-30 17:34:36 -07:00
Mitchell Hashimoto
d26c76b074
system_sdk for linux-aarch64
2022-03-30 10:05:58 -07:00
Stephen Gutekanst
a2f65d5a23
gpu-dawn: error if curl is not installed, less verbose errors
...
Some Linux distro's (e.g. Ubuntu) ship with wget but not curl by default. It's possible
to run into this if you don't use it a lot, e.g. in WSL under Windows - so produce an error
if `curl` is not installed.
Additionally, if the binary download fails, don't throw an entire stack trace to stdout.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-27 12:53:37 -07:00
Stephen Gutekanst
074721ece7
doc: add known issues
2022-03-27 12:03:13 -07:00
Release automation
4d49c673e5
gpu-dawn: update to latest binary release
2022-03-27 06:33:21 +00:00