127: gfx update and GFX_METAL_STITCHING environment option r=kvark a=kvark

This is fairly straightforward.
Also notice the new `make molten-links` command.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
This commit is contained in:
bors[bot] 2018-08-09 16:33:53 +00:00
commit 7650048d98
3 changed files with 36 additions and 9 deletions

16
Cargo.lock generated
View file

@ -297,7 +297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "gfx-backend-dx11" name = "gfx-backend-dx11"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/gfx-rs/gfx#9bcdcade4005cfa8aca23ca2fa06ae8a0166d400" source = "git+https://github.com/gfx-rs/gfx#b1d4dc52a1e357a892cb08a634e1b9ac2ae7b400"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -314,7 +314,7 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-dx12" name = "gfx-backend-dx12"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/gfx-rs/gfx#9bcdcade4005cfa8aca23ca2fa06ae8a0166d400" source = "git+https://github.com/gfx-rs/gfx#b1d4dc52a1e357a892cb08a634e1b9ac2ae7b400"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "derivative 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -330,7 +330,7 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-metal" name = "gfx-backend-metal"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/gfx-rs/gfx#9bcdcade4005cfa8aca23ca2fa06ae8a0166d400" source = "git+https://github.com/gfx-rs/gfx#b1d4dc52a1e357a892cb08a634e1b9ac2ae7b400"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -339,7 +339,7 @@ dependencies = [
"foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx)", "gfx-hal 0.1.0 (git+https://github.com/gfx-rs/gfx)",
"log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"metal 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "metal 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)",
"objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"smallvec 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", "smallvec 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -351,7 +351,7 @@ dependencies = [
[[package]] [[package]]
name = "gfx-backend-vulkan" name = "gfx-backend-vulkan"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/gfx-rs/gfx#9bcdcade4005cfa8aca23ca2fa06ae8a0166d400" source = "git+https://github.com/gfx-rs/gfx#b1d4dc52a1e357a892cb08a634e1b9ac2ae7b400"
dependencies = [ dependencies = [
"ash 0.24.4 (registry+https://github.com/rust-lang/crates.io-index)", "ash 0.24.4 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -368,7 +368,7 @@ dependencies = [
[[package]] [[package]]
name = "gfx-hal" name = "gfx-hal"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/gfx-rs/gfx#9bcdcade4005cfa8aca23ca2fa06ae8a0166d400" source = "git+https://github.com/gfx-rs/gfx#b1d4dc52a1e357a892cb08a634e1b9ac2ae7b400"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -508,7 +508,7 @@ dependencies = [
[[package]] [[package]]
name = "metal" name = "metal"
version = "0.11.0" version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1219,7 +1219,7 @@ dependencies = [
"checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" "checksum malloc_buf 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb"
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" "checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
"checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff" "checksum memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e2ffa2c986de11a9df78620c01eeaaf27d94d3ff02bf81bfcca953102dd0c6ff"
"checksum metal 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8151cbdf907826778c8979626f0e76ea5f855e81433f098219914a7ea8e87e21" "checksum metal 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cfcaa9d93f108f30a65a7ae5617e6a78e1ef5ca2c05e59e84d950274ec6743ea"
"checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17" "checksum nix 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37e713a259ff641624b6cb20e3b12b2952313ba36b6823c0f16e6cfd9e5de17"
"checksum objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9833ab0efe5361b1e2122a0544a5d3359576911a42cb098c2e59be8650807367" "checksum objc 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9833ab0efe5361b1e2122a0544a5d3359576911a42cb098c2e59be8650807367"
"checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" "checksum objc-foundation 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9"

View file

@ -73,6 +73,9 @@ version-release:
dota-debug: version-debug $(DOTA_EXE) dota-debug: version-debug $(DOTA_EXE)
DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_PARAMS_GFX)
dota-debugger: version-debug $(DOTA_EXE)
echo "env DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR)" >.lldbinit echo "env DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR)" >.lldbinit
DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR) $(DEBUGGER) $(DOTA_EXE) $(DOTA_PARAMS_GFX) DYLD_LIBRARY_PATH=$(CURDIR)/target/debug:$(CURDIR)/$(DOTA_DIR) $(DEBUGGER) $(DOTA_EXE) $(DOTA_PARAMS_GFX)
@ -94,6 +97,13 @@ dota-bench-orig: $(DOTA_EXE)
dota-bench-gl: $(DOTA_EXE) dota-bench-gl: $(DOTA_EXE)
DYLD_LIBRARY_PATH=$(CURDIR)/target/release:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_BENCHMARK) -gl DYLD_LIBRARY_PATH=$(CURDIR)/target/release:$(CURDIR)/$(DOTA_DIR) $(DOTA_EXE) $(DOTA_BENCHMARK) -gl
ifeq ($(UNAME_S),Darwin)
target/debug/libMoltenVK.dylib: version-debug
cd target/debug && ln -sf libportability.dylib libMoltenVK.dylib
target/release/libMoltenVK.dylib: version-release
cd target/release && ln -sf libportability.dylib libMoltenVK.dylib
molten-links: target/debug/libMoltenVK.dylib target/release/libMoltenVK.dylib
endif
binding: $(BINDING) binding: $(BINDING)

View file

@ -692,7 +692,7 @@ pub extern "C" fn gfxCreateDevice(
//"remote" => OnlineRecording::Remote(dispatch::QueuePriority::Default), //"remote" => OnlineRecording::Remote(dispatch::QueuePriority::Default),
other => panic!("unknown recording option: {}", other), other => panic!("unknown recording option: {}", other),
}; };
println!("GFX: environment override {:?}", gpu.device.online_recording); println!("GFX: recording override {:?}", gpu.device.online_recording);
} }
} }
@ -949,6 +949,23 @@ pub extern "C" fn gfxGetDeviceQueue(
let queue = gpu.queues let queue = gpu.queues
.get(&queueFamilyIndex) .get(&queueFamilyIndex)
.unwrap()[queueIndex as usize]; .unwrap()[queueIndex as usize];
#[cfg(feature = "gfx-backend-metal")]
{
use std::env;
if let Ok(value) = env::var("GFX_METAL_STITCHING") {
let mut q = queue;
q.stitch_deferred = match value.to_lowercase().as_str() {
"yes" => true,
"no" => false,
other => panic!("unknown stitching option: {}", other),
};
println!("GFX: stitching override {:?}", q.stitch_deferred);
}
}
unsafe { unsafe {
*pQueue = queue; *pQueue = queue;
} }