mirror of
https://github.com/italicsjenga/portability.git
synced 2024-10-17 14:51:30 +11:00
Update gfx and use the new feature flags
This commit is contained in:
parent
d5fb1b6f6c
commit
d2ca924a71
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -305,7 +305,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#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"derivative 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"derivative 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -323,7 +323,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#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"d3d12 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"d3d12 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -340,7 +340,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#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.4 (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)",
|
||||||
|
@ -362,7 +362,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#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ash 0.27.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"ash 0.27.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -379,7 +379,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#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -849,7 +849,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "range-alloc"
|
name = "range-alloc"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/gfx-rs/gfx#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rdrand"
|
name = "rdrand"
|
||||||
|
@ -1049,7 +1049,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.0.5"
|
version = "3.0.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
@ -1214,7 +1214,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
"proc-macro2 0.4.27 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"quote 0.6.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"xml-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1241,7 +1241,7 @@ version = "0.13.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"wayland-client 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"wayland-protocols 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"wayland-protocols 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
@ -1495,7 +1495,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
"checksum storage-map 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cb94f167ccba0941876c8e722e888be8b4c05511ffdacc8cfcd4c647adfd424d"
|
"checksum storage-map 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cb94f167ccba0941876c8e722e888be8b4c05511ffdacc8cfcd4c647adfd424d"
|
||||||
"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9"
|
"checksum syn 0.15.26 (registry+https://github.com/rust-lang/crates.io-index)" = "f92e629aa1d9c827b2bb8297046c1ccffc57c99b947a680d3ccff1f136a3bee9"
|
||||||
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
|
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
|
||||||
"checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2"
|
"checksum tempfile 3.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "37daa55a7240c4931c84559f03b3cad7d19535840d1c4a0cc4e9b2fb0dcf70ff"
|
||||||
"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f"
|
"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f"
|
||||||
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
|
"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096"
|
||||||
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
|
"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
|
||||||
|
|
|
@ -237,20 +237,20 @@ pub extern "C" fn gfxGetPhysicalDeviceFeatures2KHR(
|
||||||
if features.contains(hal::Features::SEPARATE_STENCIL_REF_VALUES) {
|
if features.contains(hal::Features::SEPARATE_STENCIL_REF_VALUES) {
|
||||||
data.separateStencilMaskRef = VK_TRUE;
|
data.separateStencilMaskRef = VK_TRUE;
|
||||||
}
|
}
|
||||||
//TODO: turn those into feature flags
|
if features.contains(hal::Features::SAMPLER_MIP_LOD_BIAS) {
|
||||||
|
data.samplerMipLodBias = VK_TRUE;
|
||||||
|
}
|
||||||
|
//TODO: turn this into a feature flag
|
||||||
if !cfg!(feature = "gfx-backend-metal") {
|
if !cfg!(feature = "gfx-backend-metal") {
|
||||||
data.standardImageViews = VK_TRUE;
|
data.standardImageViews = VK_TRUE;
|
||||||
data.samplerMipLodBias = VK_TRUE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VkStructureType::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_EXTX => {
|
VkStructureType::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_EXTX => {
|
||||||
let data = unsafe {
|
let data = unsafe {
|
||||||
(ptr as *mut VkPhysicalDevicePortabilitySubsetPropertiesEXTX).as_mut().unwrap()
|
(ptr as *mut VkPhysicalDevicePortabilitySubsetPropertiesEXTX).as_mut().unwrap()
|
||||||
};
|
};
|
||||||
//TODO: turn this into a limit value
|
let limits = adapter.physical_device.limits();
|
||||||
if cfg!(feature = "gfx-backend-metal") {
|
data.minVertexInputBindingStrideAlignment = limits.min_vertex_input_binding_stride_alignment as u32;
|
||||||
data.minVertexInputBindingStrideAlignment = 4;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
other => {
|
other => {
|
||||||
warn!("Unrecognized {:?}, skipping", other);
|
warn!("Unrecognized {:?}, skipping", other);
|
||||||
|
|
Loading…
Reference in a new issue