Skip to content

Commit

Permalink
Merge #1471
Browse files Browse the repository at this point in the history
1471: Hardware Abstraction Layer r=msiglreith a=kvark

**Connections**
Closes #1423

**Description**
Prototyping the new hardware abstraction layer for wgpu, which replaces gfx-rs dependencies.
The central piece is "wgpu-hal/src/lib.rs".

### Metrics
| what                     | wgpu-core, LOC | graphics, LOC | Total | Build time |
| ----------------- | ----------------- | -------------- | ---- | ---------- |
| Old: _gfx-hal_      | 23K                       | 28K                 | **51K**  | 62s   |
| New: _wgpu-hal_ | 20.5K                    | 10.5K               | **31K** | 48s   |

### TODO:
- [x] wgpu-hal API
- [x] internal example/bench
- [x] Metal
- [x] Vulkan

**Testing**
examples


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
  • Loading branch information
bors[bot] and kvark authored Jun 17, 2021
2 parents 1920606 + 220f359 commit 0c76819
Show file tree
Hide file tree
Showing 79 changed files with 14,615 additions and 6,250 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ contact_links:
url: https://github.com/gfx-rs/naga/issues/new/choose
about: Issues with or enhancements for the shader translation.
- name: Question about wgpu
url: https://github.com/gfx-rs/wgpu-rs/discussions/new
url: https://github.com/gfx-rs/wgpu/discussions/new
about: Any questions about how to use wgpu should go here.
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

android_build:
name: Android Stable
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
env:
TARGET: aarch64-linux-android
PKG_CONFIG_ALLOW_CROSS: 1
Expand All @@ -35,8 +35,9 @@ jobs:
run: cargo check --manifest-path wgpu-core/Cargo.toml --features trace --target ${{ env.TARGET }}

wasm:
if: false # disable until hal/Gles backend is setup
name: Web Assembly
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
env:
RUSTFLAGS: --cfg=web_sys_unstable_apis
steps:
Expand All @@ -53,7 +54,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-10.15, ubuntu-18.04, windows-2019]
os: [macos-10.15, ubuntu-20.04, windows-2019]
channel: [stable, nightly]
include:
- name: MacOS Stable
Expand All @@ -69,18 +70,18 @@ jobs:
additional_core_features:
additional_player_features:
- name: Ubuntu Stable
os: ubuntu-18.04
os: ubuntu-20.04
channel: stable
prepare_command:
additional_core_features: trace,replay
additional_player_features:
- name: Ubuntu Nightly
os: ubuntu-18.04
os: ubuntu-20.04
channel: nightly
prepare_command: |
echo "Installing Vulkan"
sudo apt-get update -y -qq
sudo add-apt-repository ppa:kisak/kisak-mesa -y
sudo add-apt-repository ppa:ubuntu-x-swat/updates -y
sudo apt-get update
sudo apt install -y libxcb-xfixes0-dev mesa-vulkan-drivers
additional_core_features: serial-pass
Expand Down Expand Up @@ -123,7 +124,7 @@ jobs:
run: cargo test -- --nocapture

docs:
runs-on: [ubuntu-18.04]
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Change Log

TBD:
- Merged wgpu-rs and wgpu back into a single repository
- Crates:
- Merged wgpu-rs and wgpu back into a single repository
- Replaced gfx-rs dependencies by the new `wgpu-hal`

## v0.8 (2021-04-29)
- Naga is used by default to translate shaders, SPIRV-Cross is optional behind `cross` feature
Expand Down
Loading

0 comments on commit 0c76819

Please sign in to comment.