[rs] Update to gfx from master

This commit is contained in:
Dzmitry Malyshau 2020-11-30 23:32:15 -05:00
parent bc9648a44c
commit adbf0c719f
3 changed files with 41 additions and 42 deletions

View File

@ -9,36 +9,44 @@ on:
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env:
RUSTFLAGS: ${{ matrix.RUSTFLAGS }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [macos-10.15, ubuntu-18.04, windows-2019] os: [macos-10.15, ubuntu-18.04, windows-2019]
wasm: [true, false]
include: include:
- os: macos-10.15 - os: macos-10.15
wasm: false PREPARE_COMMAND: echo "Ready"
CHECK_COMMAND: cargo check --all-targets --all-features CHECK_COMMAND: cargo check --all-targets --all-features
TEST_COMMAND: cargo test --all-targets --no-run TEST_COMMAND: cargo test --all-targets --no-run
- os: ubuntu-18.04 - os: ubuntu-18.04
wasm: false PREPARE_COMMAND: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq libegl1-mesa-dev
CHECK_COMMAND: cargo check --all-targets --all-features CHECK_COMMAND: cargo check --all-targets --all-features
TEST_COMMAND: cargo test --all-targets --no-run TEST_COMMAND: cargo test --all-targets --no-run
- os: windows-2019 - os: windows-2019
wasm: false PREPARE_COMMAND: rustup default stable-msvc
CHECK_COMMAND: rustup default stable-msvc && cargo check --all-targets --all-features CHECK_COMMAND: cargo check --all-targets --all-features
TEST_COMMAND: rustup default stable-msvc && cargo test --all-targets --no-run TEST_COMMAND: cargo test --all-targets --no-run
- wasm: true steps:
CHECK_COMMAND: rustup target add wasm32-unknown-unknown && cargo check --all-targets --all-features --target=wasm32-unknown-unknown - uses: actions/checkout@v2
TEST_COMMAND: rustup target add wasm32-unknown-unknown && cargo test --all-targets --no-run --target=wasm32-unknown-unknown - name: Prepare
run: ${{ matrix.PREPARE_COMMAND }}
- name: Check
run: ${{ matrix.CHECK_COMMAND }}
- name: Test
run: ${{ matrix.TEST_COMMAND }}
wasm:
runs-on: [ubuntu-18.04]
env:
RUSTFLAGS: --cfg=web_sys_unstable_apis RUSTFLAGS: --cfg=web_sys_unstable_apis
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: cargo check - run: rustup target add wasm32-unknown-unknown
run: ${{ matrix.CHECK_COMMAND }} - name: Check
- name: cargo test run: cargo check --all-targets --all-features --target=wasm32-unknown-unknown
run: ${{ matrix.TEST_COMMAND }}
docs: docs:
runs-on: [ubuntu-18.04] runs-on: [ubuntu-18.04]
steps: steps:

View File

@ -20,20 +20,20 @@ default = []
trace = ["serde", "wgc/trace"] trace = ["serde", "wgc/trace"]
replay = ["serde", "wgc/replay"] replay = ["serde", "wgc/replay"]
# Make Vulkan backend available on platforms where it is by default not, e.g. macOS # Make Vulkan backend available on platforms where it is by default not, e.g. macOS
vulkan-portability = ["wgc/gfx-backend-vulkan", "gfx-backend-vulkan"] vulkan-portability = ["wgc/gfx-backend-vulkan"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc] [target.'cfg(not(target_arch = "wasm32"))'.dependencies.wgc]
package = "wgpu-core" package = "wgpu-core"
#version = "0.6" #version = "0.6"
git = "https://github.com/gfx-rs/wgpu" git = "https://github.com/gfx-rs/wgpu"
rev = "67e652f471d5b138a34231666c953f26ec25aa18" rev = "2d87fd9067e6600beea494f83aa27955b0c8e100"
features = ["raw-window-handle"] features = ["raw-window-handle"]
[dependencies.wgt] [dependencies.wgt]
package = "wgpu-types" package = "wgpu-types"
#version = "0.6" #version = "0.6"
git = "https://github.com/gfx-rs/wgpu" git = "https://github.com/gfx-rs/wgpu"
rev = "67e652f471d5b138a34231666c953f26ec25aa18" rev = "2d87fd9067e6600beea494f83aa27955b0c8e100"
[dependencies] [dependencies]
arrayvec = "0.5" arrayvec = "0.5"
@ -45,12 +45,11 @@ tracing = { version = "0.1", default-features = false, features = ["std"] }
typed-arena = "2.0.1" typed-arena = "2.0.1"
serde = { version = "1", features = ["derive"], optional = true } serde = { version = "1", features = ["derive"], optional = true }
# Enable X11 support # Enable X11 support for GL
# Note: we may consider switching this to "dev-dependencies" if users # Note: we may consider switching this to "dev-dependencies" if users
# want to opt into X11 explicitly. # want to opt into X11 explicitly.
[target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies] [target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies]
gfx-backend-vulkan = { version = "0.6", features = ["x11"] } gfx-backend-gl = { git = "https://github.com/gfx-rs/gfx", features = ["x11"] }
gfx-backend-gl = { version = "0.6", features = ["x11"] }
[dev-dependencies] [dev-dependencies]
cgmath = "0.17" cgmath = "0.17"
@ -82,24 +81,20 @@ test = true
[patch."https://github.com/gfx-rs/naga"] [patch."https://github.com/gfx-rs/naga"]
#naga = { path = "../naga" } #naga = { path = "../naga" }
[patch."https://github.com/gfx-rs/gfx-extras"] [patch."https://github.com/zakarumych/gpu-descriptor"]
#gfx-descriptor = { version = "0.2", path = "../gfx-extras/gfx-descriptor" } #gpu-descriptor = { path = "../gpu-descriptor/gpu-descriptor" }
[patch."https://github.com/zakarumych/gpu-alloc"] [patch."https://github.com/zakarumych/gpu-alloc"]
#gpu-alloc = { path = "../gpu-alloc/gpu-alloc" } #gpu-alloc = { path = "../gpu-alloc/gpu-alloc" }
[patch.crates-io] [patch."https://github.com/gfx-rs/gfx"]
#gfx-hal = { version = "0.6", path = "../gfx/src/hal" } #gfx-hal = { path = "../gfx/src/hal" }
#gfx-backend-empty = { version = "0.6", path = "../gfx/src/backend/empty" } #gfx-backend-empty = { path = "../gfx/src/backend/empty" }
#gfx-backend-vulkan = { version = "0.6", path = "../gfx/src/backend/vulkan" } #gfx-backend-vulkan = { path = "../gfx/src/backend/vulkan" }
#gfx-backend-gl = { version = "0.6", path = "../gfx/src/backend/gl" } #gfx-backend-gl = { path = "../gfx/src/backend/gl" }
#gfx-backend-dx12 = { version = "0.6", path = "../gfx/src/backend/dx12" } #gfx-backend-dx12 = { path = "../gfx/src/backend/dx12" }
#gfx-backend-dx11 = { version = "0.6", path = "../gfx/src/backend/dx11" } #gfx-backend-dx11 = { path = "../gfx/src/backend/dx11" }
#gfx-backend-metal = { version = "0.6", path = "../gfx/src/backend/metal" } #gfx-backend-metal = { path = "../gfx/src/backend/metal" }
[target.'cfg(target_os = "macos")'.dependencies]
objc = "0.2.7"
gfx-backend-vulkan = { version = "0.6", optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen = "=0.2.69" # remember to change version in readme as well wasm-bindgen = "=0.2.69" # remember to change version in readme as well

View File

@ -1,11 +1,7 @@
status = [ status = [
"build (macos-10.15, true)", "build (macos-10.15)",
"build (macos-10.15, false)", "build (ubuntu-18.04)",
"build (ubuntu-18.04, true)", "build (windows-2019)",
"build (ubuntu-18.04, false)", "wasm",
"build (windows-2019, true)",
"build (windows-2019, false)",
"docs", "docs",
] ]
timeout_sec = 18000 # 5 hours