Commit graph

407 commits

Author SHA1 Message Date
Stephen Gutekanst
8f5e9f89e5 gpu: expose API and begin using in example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
d32be19c8b gpu: implement Surface.reference, Surface.release
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
368f53ece1 gpu: implement NativeInstance.createSurface
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
89b1f31de8 gpu: begin implementing Surface
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
64e023c992 gpu: prepare to implement Surface
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
9888d8fe36 gpu: rename native -> NativeInstance
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
5656d3252a gpu: begin plotting how to wrap a WGPUInstance
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
5f7fe4d7e2 gpu: prepare to add Device interface
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
2e0a7019b2 gpu: name the interface gpu.Interface
`gpu.Device` should be reserved for WGPUDevice

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
414887db2a gpu: add foundation for interface
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
bf8076918b gpu: update TODO / remove procs, etc
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
51faaf883c gpu: add webgpu.h TODO
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
4d12f229d6 gpu: document coordinate system, WebGPU spec location
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
Stephen Gutekanst
718a66497c gpu: add gpu-hello-triangle (dawn) example
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-03-19 00:51:48 -07:00
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