Skip to content

Commit

Permalink
Bug 1575008 - WebGPU implementation basis r=baku,bzbarsky
Browse files Browse the repository at this point in the history
This change vendors `wgpu` library in-tree and hooks up the initialization bits. It implements adapter and device initialization and adds a simple test.
Complementary ecosystem tracker - gfx-rs/wgpu#374

Current status:
  - [x] Architecture
    - [x] figure out the IPC story
    - [ ] move wgpu crates into a dedicated folder (postponed as https://bugzilla.mozilla.org/show_bug.cgi?id=1594182)
  - [x] Linux
    - [x] avoid depending on spirv_cross
  - [x] macOS
    - [x] due to cross-compiling shaders
    - [x] need the dependency update
    - [x] stop using gcc
    - [x] unexpected SSL header collision - https://phabricator.services.mozilla.com/D51148
    - [x] undefined Metal symbols
    - [x] missing webrtc headers for IPDL magic - https://phabricator.services.mozilla.com/D51558
    - [x] spirv-cross linking failure in ASAN - https://phabricator.services.mozilla.com/D52688
  - [x] Windows
    - [x] due to "ipc-channel" not supporting Windows yet
    - [x] due to some exceptional stuff
    - [x] undefined symbol: `D3D12CreateDevice`
    - [x] d3d12.dll is not found, dxgi1_4 doesn't present
    - [x] d3d11.dll and dxgi.dll need to be explicitly loaded on win32 mingw
    - [x] libbacktrace fails to link on win32 mingw
    - [x] cc mislinking C++ standard library
  - [x] Android
    - [x] spirv-cross fails to build due to exceptions

Update-1:
We decided to go with IPDL mechanism instead of Rust based ipc-channel (or any alternatives), which unblocks Windows build.

Update-2:
It appears that WebGPUThreading isn't needed any more as the child thread (and its event loop) is now managed by IPDL infrastructure. This PR removes it 🎉 .

Update-3:
InstanceProvider is also removed.

Update-4:
All set, the try is green, waiting for dependent changes to go in.

Differential Revision: https://phabricator.services.mozilla.com/D49458

UltraBlame original commit: 4d16c3d62cfc0503075206bccfbd3b32ad396e64
  • Loading branch information
marco-c committed Nov 15, 2019
1 parent e763f5f commit debfc36
Show file tree
Hide file tree
Showing 728 changed files with 248,351 additions and 3,036 deletions.
10 changes: 10 additions & 0 deletions .cargo/config.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ branch = "master"
git = "https://github.com/mozilla/neqo"
replace-with = "vendored-sources"

[source."https://github.com/kvark/spirv_cross"]
branch = "wgpu"
git = "https://github.com/kvark/spirv_cross"
replace-with = "vendored-sources"

[source."https://github.com/kvark/rust-objc-exception"]
branch = "cc"
git = "https://github.com/kvark/rust-objc-exception"
replace-with = "vendored-sources"

[source."https://github.com/jfkthame/mapped_hyph.git"]
git = "https://github.com/jfkthame/mapped_hyph.git"
replace-with = "vendored-sources"
Expand Down
1 change: 1 addition & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ layout/style/nsStyleStructList.h
# Autogenerated file
gfx/gl/GLConsts.h
gfx/webrender_bindings/webrender_ffi_generated.h
dom/webgpu/ffi/wgpu_ffi_generated.h
intl/unicharutil/util/nsSpecialCasingData.cpp
intl/unicharutil/util/nsUnicodePropertyData.cpp
intl/unicharutil/util/nsUnicodeScriptCodes.h
Expand Down
Loading

0 comments on commit debfc36

Please sign in to comment.