Commit graph

65 commits

Author SHA1 Message Date
Stephen Gutekanst
225d7891d1 gpu: CI: fix macOS build
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-06-24 21:33:21 -07:00
Stephen Gutekanst
192ca40032 gpu: CI: clone dependencies ourselves
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-06-24 21:25:01 -07:00
Stephen Gutekanst
fdd3270a0f gpu: update to latest webgpu.h API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-06-24 21:00:07 -07:00
Wrench[bot]
08663afbcb gpu-dawn: update to latest version origin/generated-2023-06-18.1687119009
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-06-18 21:31:41 -07:00
Stephen Gutekanst
dc87787133 all: update Zig to version 0.11.0-dev.3380+7e0a02ee2 2023-06-14 15:39:55 -07:00
Stephen Gutekanst
99438db111 Revert "all: update Zig to version 0.11.0-dev.3380+7e0a02ee2"
This reverts commit 6e9ce61254.
2023-06-14 15:37:47 -07:00
Wrench[bot]
6e9ce61254 all: update Zig to version 0.11.0-dev.3380+7e0a02ee2
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-06-13 09:55:03 -07:00
Răzvan C. Rădulescu
b45ad53a11 gpu: make swapChainGetCurrentTextureView() return value optional 2023-06-13 09:54:46 -07:00
Tech0tron
fef0299886
gpu: remove usingnamespace for callbacks.zig and types.zig (#798) 2023-06-04 20:04:56 -07:00
xdBronch
aa69567a1b core/gpu: start on usingnamespace issue and new zig split usage 2023-06-04 12:24:11 -07:00
Wrench[bot]
6135071a0c all: update Zig to version 0.11.0-dev.3379+629f0d23b
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-06-04 12:22:54 -07:00
Stephen Gutekanst
8b8d16bbc8 gpu: add Dawn initialization safety check
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-06-01 00:08:46 -07:00
Wrench[bot]
a48954cdb3 all: update Zig to version 0.11.0-dev.3332+76aa1fffb
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-05-31 22:08:28 -07:00
Wrench[bot]
026dcd4c06 all: update Zig to version 0.11.0-dev.3312+ab37ab33c
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-05-28 14:34:08 -07:00
Stephen Gutekanst
e754f3023e gpu: correct pointer constness of command buffers
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-05-25 16:55:05 -07:00
Wrench[bot]
4f9cf2ab16 all: update Zig to version 0.11.0-dev.3299+34865d693
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-05-25 16:54:41 -07:00
spacecadet
465991d897
gpu: fix few chained struct wrappers (#781)
InstanceDescriptor and TogglesDeviceDescriptor were not compatible with the
definition used in Dawn.
2023-05-25 14:04:07 -07:00
Wrench[bot]
11a0a8b73e all: update Zig to version 0.11.0-dev.2868+1a455b2dd
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-04-28 16:00:21 -07:00
Stephen Gutekanst
1ccec8339f all: use latest Zig build API (do not specify .kind = .test_exe)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-04-25 15:06:11 -07:00
Vivek Roy
ff0258f27d all: use std.Build.installArtifact 2023-04-25 15:06:11 -07:00
Wrench[bot]
beef56a023 all: update Zig to version 0.11.0-dev.2777+b95cdf0ae
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-04-24 21:53:41 -07:00
Ali Chraghi
266b651b34 all: use explicit backing integers for packed structs 2023-03-28 21:01:22 -07:00
Wrench[bot]
2025ac8d17 all: update Zig to version 0.11.0-dev.2160+49d37e2d1
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-03-24 23:23:10 -07:00
Wrench[bot]
d9bcb1e291 all: update Zig to version 0.11.0-dev.1987+a2c6ecd6d
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-03-16 09:47:25 -07:00
Stephen Gutekanst
6bd4d91932 all: cache module() returns to avoid duplicate modules
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-03-15 21:20:28 -07:00
Wrench[bot]
6561c24df5
all: update Zig to version 0.11.0-dev.1824+a7a709aaa (#709)
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-03-05 12:15:06 -07:00
Stephen Gutekanst
f80e02b7c1 gpu: update to latest std.mem.span API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-02-12 10:05:03 -07:00
Stephen Gutekanst
fc45fd594e gpu: update to latest Zig build API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-02-12 10:05:03 -07:00
Wrench[bot]
3d769b9671 all: update Zig to version 0.11.0-dev.1605+abc9530a8
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-02-12 10:05:03 -07:00
Wrench[bot]
31a54cc9c5 all: update Zig to version 0.11.0-dev.1479+97b1a9bb6
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-28 17:07:04 -07:00
Wrench[bot]
79a16f2ad7 gpu-dawn: update to latest version origin/generated-2023-01-28.1674950134
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-28 17:02:29 -07:00
Wrench[bot]
5267233347 gpu-dawn: update to latest version origin/generated-2023-01-20.1674251751
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-20 16:20:36 -07:00
Ali Chraghi
c7b9d9e107 gpu: ci: add workflow 2023-01-20 14:53:22 -07:00
Stephen Gutekanst
988b5c0da8 Revert "gpu-dawn: update to latest version origin/generated-2023-01-19.1674151689"
This reverts commit 858003f6e4.
2023-01-19 18:38:26 -07:00
Wrench[bot]
858003f6e4 gpu-dawn: update to latest version origin/generated-2023-01-19.1674151689
Signed-off-by: Wrench[bot] <wrench@hexops.com>
2023-01-19 18:34:30 -07:00
Austin Rude
f54d584991 gpu: fix getting adapter propeties in example
Dawn now verifies the next chain is null, requiring this change. See
3c9d26a6 and the code review comments for more info.
2023-01-15 17:57:00 -07:00
Austin Rude
77341e2905 gpu: link glfw directly to gpu 2023-01-15 17:57:00 -07:00
Stephen Gutekanst
9d1c96ed0e gpu: improve SupportedLimits query example
`supported` is a better variable name because `supported.limits.foobar` is the actual
way it need be referenced, and `limits.limits.foobar` would be redundant.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-15 13:21:25 -07:00
Ali Chraghi
9f6020e545 {gpu,gpu-dawn}: add X11 linkage back; update to latest WebGPU API 2023-01-14 12:12:00 -07:00
Ali Chraghi
a52c6e5f5c gpu: update interface to latest webgpu headers 2023-01-14 12:12:00 -07:00
Wrench[bot]
e4f2f08431
gpu-dawn: update to latest Dawn version (#656)
* gpu-dawn: update to latest version generated-2023-01-12.1673546526

Signed-off-by: Wrench[bot] <wrench@hexops.com>
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-14 08:26:48 -07:00
Austin Rude
c02578721a gpu: Update example to latest zig/glfw
Update the mach/gpu only example to work with the latest zig and
recent glfw error handling changes.
2023-01-12 21:46:27 -07:00
Ali Chraghi
a97a33334c {mach, gpu-dawn}: don't hardcode linux window manager to X11 2023-01-12 10:51:16 -07:00
Stephen Gutekanst
a750e31d11 Revert "all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)"
This reverts commit a1fe671db8.

Lue suggested reverting #661 because ZLS worked around the issue of @src
being relative in that environment: https://github.com/zigtools/zls/pull/898

This is not a perfect solution (what zls did seems to be a workaround), but
is good enough for us until Zig gets an official package manager.
2023-01-10 01:57:52 -07:00
apple
cf8922cc33
gpu: fix example build (#663) 2023-01-05 01:58:13 -07:00
Lue
a1fe671db8
all: build: fix sdkPath for relative @src.file / fix autocompletion with ZLS / IDEs (#661)
* all: build: fix sdkPath for relative @src.file

Prior to this commit, the build system heavily assumed that the result
`@src.file` would always be absolute, but this is no longer
guaranteed, likely due to there being no such thing as an "absolute
path" in WASI.

It appears that for normal invocations of `zig build`, it is safe to
assume that `@src.file` is absolute. However, when ZLS uses a custom
`build_runner.zig` to collect build configuration, `@src.file` is
actually relative to the current working directory, at least on my
system. For a while, this led to ZLS completions breaking entirely,
but presently it actually causes ZLS to crash!

The solution is not as simple as using relative `sdkPath` results
as-is, because the build system may attempt to resolve these paths
relative to build root, when the paths are actually relative to the
current working directory.

This leads to a sticky situation: the current working directory is a
runtime concept, but `@src.file` is resolved at compile time. However,
it appears that the build runner does not change current working
directory in between compilation and execution, so it is probably safe
to calculate `sdkPath` using runtime current working directory.

Still, this requires major changes with how `sdkPath` works, since
runtime computation and allocations are required. So pretty much
anything that relied on `sdkPath` being comptime-known has been
refactored in this commit.

The most severe result of this is that, for example, `gpu.pkg` can no
longer be a comptime-known constant: it has to be a runtime function
that takes a `*Builder` and returns a `Pkg`.

This commit deals with usages of `*.pkg` and `sdkPath` within Mach
itself, but projects that depend on Mach such as `mach-examples` will
almost certainly require changes as well.

* all: update README to reflect change in pkg usage

For details on updating your code to use this version, see: 88b1106953

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2023-01-02 01:23:46 -07:00
BratishkaErik
b1191cbeb5
{mach,gpu}: more undef/nul -> undefined/null renames (#638)
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2022-12-14 18:20:11 -07:00
Eric Joldasov
94ba8338f5 gpu: use null and undefined in enums
Closes #626
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2022-12-14 02:18:21 -07:00
Stephen Gutekanst
3f51ef6fde gpu: make it easier to query Device/Adapter limits correctly
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-11-24 09:55:18 -07:00
Ian Applegate
839d60c940
{shaderexp,gpu}: fix command buffer coercion (#603) 2022-10-31 08:17:50 -07:00