mirror of
https://github.com/italicsjenga/portability.git
synced 2025-02-23 17:47:43 +11:00
Update gfx and use the new feature flags
This commit is contained in:
parent
d5fb1b6f6c
commit
d2ca924a71
2 changed files with 16 additions and 16 deletions
20
Cargo.lock
generated
20
Cargo.lock
generated
|
@ -305,7 +305,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
[[package]]
|
||||
name = "gfx-backend-dx11"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
||||
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||
dependencies = [
|
||||
"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)",
|
||||
|
@ -323,7 +323,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-dx12"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
||||
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||
dependencies = [
|
||||
"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)",
|
||||
|
@ -340,7 +340,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-metal"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
||||
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||
dependencies = [
|
||||
"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)",
|
||||
|
@ -362,7 +362,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-backend-vulkan"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
||||
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||
dependencies = [
|
||||
"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)",
|
||||
|
@ -379,7 +379,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "gfx-hal"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
||||
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||
dependencies = [
|
||||
"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)",
|
||||
|
@ -849,7 +849,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "range-alloc"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/gfx-rs/gfx#5dac01c1be02db9251d8e61098dda204c999ae5f"
|
||||
source = "git+https://github.com/gfx-rs/gfx#9eaee231f04b8e8d9c7672146edc8063a8ba6c9f"
|
||||
|
||||
[[package]]
|
||||
name = "rdrand"
|
||||
|
@ -1049,7 +1049,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tempfile"
|
||||
version = "3.0.5"
|
||||
version = "3.0.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"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 = [
|
||||
"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)",
|
||||
"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]]
|
||||
|
@ -1241,7 +1241,7 @@ version = "0.13.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"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-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 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 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 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"
|
||||
|
|
|
@ -237,20 +237,20 @@ pub extern "C" fn gfxGetPhysicalDeviceFeatures2KHR(
|
|||
if features.contains(hal::Features::SEPARATE_STENCIL_REF_VALUES) {
|
||||
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") {
|
||||
data.standardImageViews = VK_TRUE;
|
||||
data.samplerMipLodBias = VK_TRUE;
|
||||
}
|
||||
}
|
||||
VkStructureType::VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_EXTX => {
|
||||
let data = unsafe {
|
||||
(ptr as *mut VkPhysicalDevicePortabilitySubsetPropertiesEXTX).as_mut().unwrap()
|
||||
};
|
||||
//TODO: turn this into a limit value
|
||||
if cfg!(feature = "gfx-backend-metal") {
|
||||
data.minVertexInputBindingStrideAlignment = 4;
|
||||
}
|
||||
let limits = adapter.physical_device.limits();
|
||||
data.minVertexInputBindingStrideAlignment = limits.min_vertex_input_binding_stride_alignment as u32;
|
||||
}
|
||||
other => {
|
||||
warn!("Unrecognized {:?}, skipping", other);
|
||||
|
|
Loading…
Add table
Reference in a new issue