diff --git a/Cargo.lock b/Cargo.lock index f83d1d4..547612c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,7 @@ name = "backtrace-sys" version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -69,7 +69,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cc" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -297,7 +297,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#e7b3ede00cdaef91eff588694eac7c610fd0d136" +source = "git+https://github.com/gfx-rs/gfx#a381a26218ae03c672aed8ed76307e2e86a812ff" dependencies = [ "bitflags 1.0.4 (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]] name = "gfx-backend-dx12" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#e7b3ede00cdaef91eff588694eac7c610fd0d136" +source = "git+https://github.com/gfx-rs/gfx#a381a26218ae03c672aed8ed76307e2e86a812ff" dependencies = [ "bitflags 1.0.4 (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]] name = "gfx-backend-metal" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#e7b3ede00cdaef91eff588694eac7c610fd0d136" +source = "git+https://github.com/gfx-rs/gfx#a381a26218ae03c672aed8ed76307e2e86a812ff" 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)", @@ -351,7 +351,7 @@ dependencies = [ [[package]] name = "gfx-backend-vulkan" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#e7b3ede00cdaef91eff588694eac7c610fd0d136" +source = "git+https://github.com/gfx-rs/gfx#a381a26218ae03c672aed8ed76307e2e86a812ff" dependencies = [ "ash 0.24.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -368,7 +368,7 @@ dependencies = [ [[package]] name = "gfx-hal" version = "0.1.0" -source = "git+https://github.com/gfx-rs/gfx#e7b3ede00cdaef91eff588694eac7c610fd0d136" +source = "git+https://github.com/gfx-rs/gfx#a381a26218ae03c672aed8ed76307e2e86a812ff" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -460,7 +460,7 @@ name = "libloading" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -529,7 +529,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -812,7 +812,7 @@ name = "spirv_cross" version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1184,7 +1184,7 @@ dependencies = [ "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" "checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" "checksum byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "90492c5858dd7d2e78691cfb89f90d273a2800fc11d98f60786e5d87e2f83781" -"checksum cc 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "70f2a88c2e69ceee91c209d8ef25b81fc1a65f42c7f14dfd59d1fed189e514d1" +"checksum cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "f159dfd43363c4d08055a07703eb7a3406b0dac4d0584d96965a3262db3c9d16" "checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" "checksum cgl 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "55e7ec0b74fe5897894cbc207092c577e87c52f8a59e8ca8d97ef37551f60a49" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" diff --git a/libportability-gfx/src/conv.rs b/libportability-gfx/src/conv.rs index b583598..6b1989a 100644 --- a/libportability-gfx/src/conv.rs +++ b/libportability-gfx/src/conv.rs @@ -195,6 +195,10 @@ pub fn map_aspect(aspects: VkImageAspectFlags) -> format::Aspects { flags } +pub fn map_image_create_flags(flags: VkImageCreateFlags) -> image::ViewCapabilities { + image::ViewCapabilities::from_bits_truncate(flags as u32) +} + pub fn map_image_kind( ty: VkImageType, extent: VkExtent3D, diff --git a/libportability-gfx/src/impls.rs b/libportability-gfx/src/impls.rs index afefc42..c431206 100644 --- a/libportability-gfx/src/impls.rs +++ b/libportability-gfx/src/impls.rs @@ -286,7 +286,7 @@ pub extern "C" fn gfxGetPhysicalDeviceImageFormatProperties( }, conv::map_tiling(tiling), conv::map_image_usage(usage), - unsafe { mem::transmute(create_flags) }, + conv::map_image_create_flags(create_flags), ); match properties { Some(props) => unsafe { @@ -1552,7 +1552,7 @@ pub extern "C" fn gfxCreateImage( .expect(&format!("Unsupported image format: {:?}", info.format)), conv::map_tiling(info.tiling), conv::map_image_usage(info.usage), - unsafe { mem::transmute(info.flags) }, + conv::map_image_create_flags(info.flags), ) .expect("Error on creating image");