Commit graph

443 commits

Author SHA1 Message Date
Stephen Gutekanst
29b83b3118 gpu: README: note community, where to file issues, contributing
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
1ea459a7df gpu: README: record WebGPU version
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
e99aecb944 gpu: add README
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
376311cf16 gpu: initialize project
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
7af784bee7 rename mach/gpu to mach/gpu-dawn
See https://github.com/hexops/mach/issues/133#issuecomment-999940767

Helps #109
Helps #133

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-22 18:04:33 -07:00
Stephen Gutekanst
62fbf78f9a gpu: update to latest Zig (c_void -> anyopaque)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-20 15:36:45 -07:00
Stephen Gutekanst
c279e0c794 gpu: update to latest Dawn revision as of Dec 15, 2021
See hexops/dawn#4

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-15 20:53:20 -07:00
iddev5
97ebee0e00 gpu: Fix invalid parameter type of glfw framebuffer callback function 2021-12-14 23:41:19 -08:00
Stephen Gutekanst
3535c8023f gpu: prevent compiler flags from being repeated for each source file
This previously lead to a very long list of arguments to the compiler, so
long in fact that Windows cannot handle it.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-12 14:51:36 -08:00
Stephen Gutekanst
d07b61787e gpu: reduce compilation units to improve iteration time by ~387ms
See hexops/mach#124

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-12 14:51:36 -08:00
Stephen Gutekanst
fe17507689 gpu: reduce compilation units to improve iteration time by ~763ms
See hexops/mach#124

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-12 14:51:36 -08:00
Stephen Gutekanst
4a9fda49e0 gpu: reduce compilation units to improve iteration time by ~566ms
See hexops/mach#124

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-12 14:51:36 -08:00
Stephen Gutekanst
43ffa1c408 gpu: reduce compilation units to improve iteration time by ~288ms
See hexops/mach#124

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-12 14:51:36 -08:00
Stephen Gutekanst
51aae5e474 gpu: reduce compilation units to improve iteration time by ~121ms
See hexops/mach#124

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-12 14:51:36 -08:00
Stephen Gutekanst
7ecef80ec7 gpu: update to latest Zig master version (allocgate)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-06 20:03:38 -08:00
Stephen Gutekanst
5b2cb46700 gpu: reduce debug Dawn static library size from ~947M -> ~53M
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-04 23:01:16 -07:00
Stephen Gutekanst
1c6792a492 gpu: add OpenGL fallback support for Linux
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-05 04:25:19 +00:00
Stephen Gutekanst
6b0129f590 gpu: implement OpenGL / OpenGL ES adapter discovery in example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-05 04:23:06 +00:00
Stephen Gutekanst
507f4fa6aa gpu: allow choosing WGPU_BACKEND in example program
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-05 04:21:29 +00:00
Stephen Gutekanst
1fc499922f gpu: update Dawn to include generated OpenGL desktop sources
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-05 04:19:44 +00:00
Stephen Gutekanst
d9ec84b327 gpu: implement C wrapper for Dawn Instance.discoverAdapters
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-04 21:49:45 +00:00
Stephen Gutekanst
4ebb4571ac gpu: correctly target ~60hz, not 62,500hz, in Dawn example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-02 18:05:46 +00:00
Stephen Gutekanst
fd0eeb2662 gpu: handle resize events in example (fixes Vulkan crash on resize)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-01 10:18:03 +00:00
Stephen Gutekanst
8f3726dfa2 gpu: improve Dawn example backend type detection
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-01 08:46:09 +00:00
Stephen Gutekanst
91728ebde9 gpu: update to latest Dawn version
See https://github.com/hexops/dawn/pull/1

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-12-01 00:01:18 -07:00
Stephen Gutekanst
561f9408b8 gpu: add support for building on Linux
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 15:16:09 -07:00
Stephen Gutekanst
e9b481a709 gpu: include Vulkan headers
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 15:02:10 -07:00
Stephen Gutekanst
e1d17f461e gpu: implement source inclusion for most Vulkan/D3D12/OpenGL backends
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 14:29:53 -07:00
Stephen Gutekanst
3f56f3f964 gpu: make Dawn source inclusion feature-oriented, not target-oriented
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 14:11:28 -07:00
Stephen Gutekanst
30c60162ae gpu: remove invalid TODOs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 13:59:34 -07:00
Stephen Gutekanst
17d7d84141 gpu: remove Windows UWP app support (effectively deprecated by Microsoft)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 13:54:39 -07:00
Stephen Gutekanst
11bc32d21b gpu: detect platform-specific backend types
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 13:53:28 -07:00
Stephen Gutekanst
718ad2a630 gpu: add build-system TODOs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-30 11:30:17 -07:00
Stephen Gutekanst
5db4ac5bb5 gpu: include system SDK for cross compilation
Fixes hexops/mach#85
Fixes hexops/mach#84

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-29 21:59:50 -07:00
InKryption
aae3ea8577 constify unmutated variables in build files 2021-11-22 12:59:11 -07:00
Stephen Gutekanst
d5d78a2196 gpu: README: clarify Zig version requirements
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-21 08:32:03 -07:00
Stephen Gutekanst
efb7fe9c62 gpu: update dawn C shims to reflect library name
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-21 08:32:03 -07:00
Stephen Gutekanst
882e82f601 gpu: remove TODO about spirv-cross
Mozilla and Google both found SPIRV-Cross to be insufficient and built Naga and
Tint, respectively, so there's no need to support this build option.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-21 08:32:03 -07:00
Stephen Gutekanst
5ce69d0273 gpu: correct Force32 explanation
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-21 08:32:03 -07:00
Stephen Gutekanst
4a76678a62 gpu: remove backend type constant debugging code
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-21 08:32:03 -07:00
Stephen Gutekanst
512da9ae9d gpu: build Null dawn backend
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-21 08:32:03 -07:00
Stephen Gutekanst
ab87f82382 gpu: polish README
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-21 08:32:03 -07:00
Stephen Gutekanst
484f768c0a webgpu: rename to just "gpu"
It's nicer to refer to this in code as `gpu`. Additionally, `webgpu` as a name
gives the impression this is for web only which is absolutely not true but could
understandably be very confusing to newcomers.

Solve both problems by renaming to just `gpu`, and (next) updating the README to
indicate what it does and why, then explain it's WebGPU after as more of an
implementation detail.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2021-11-21 08:32:03 -07:00