Skip to content

Commit

Permalink
Bug 1575008 - WebGPU implementation basis r=webidl,baku
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.

Current status:
  - [x] Architecture
    - [x] figure out the IPC story
    - [ ] move wgpu crates into a dedicated folder (let's follow up with this)
  - [x] Review
    - [x] WebIDL changes by DOM peers
  - [x] Linux
    - [x] avoid depending on spirv_cross - gfx-rs/wgpu#371
  - [x] macOS
    - [x] due to cross-compiling shaders - gfx-rs/gfx#3047
    - [x] need the dependency update
    - [x] stop using gcc - SSheldon/rust-objc-exception#5
    - [x] unexpected SSL header collision - https://bugzilla.mozilla.org/show_bug.cgi?id=1592398
    - [x] undefined Metal symbols
  - [x] Windows
    - [x] due to "ipc-channel" not supporting Windows yet - servo/ipc-channel#233
    - [x] due to some exceptional stuff - grovesNL/spirv_cross#121
    - [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 - gfx-rs/gfx#3076
    - [x] libbacktrace fails to link on win32 mingw
  - [x] Android
    - [x] spirv-cross fails to build - KhronosGroup/SPIRV-Cross#1193

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: 9c05fa3c0fcceb4f557d81e7a740bf81992aecb8
  • Loading branch information
marco-c committed Nov 6, 2019
1 parent 718c0c5 commit 681d223
Show file tree
Hide file tree
Showing 649 changed files with 1,724,706 additions and 20,737 deletions.
102 changes: 102 additions & 0 deletions .cargo/config.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,108 @@ github
.
com
/
kvark
/
spirv_cross
"
]
branch
=
"
wgpu
-
test
"
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
/
hsivonen
/
packed_simd
Expand Down
9 changes: 9 additions & 0 deletions .clang-format-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ webrender_bindings
webrender_ffi_generated
.
h
dom
/
webgpu
/
ffi
/
wgpu_ffi_generated
.
h
intl
/
unicharutil
Expand Down
Loading

0 comments on commit 681d223

Please sign in to comment.