From 4318b4bd4dbb91bfd55404f860ca90462b727ddf Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 2 Feb 2021 22:59:46 -0500 Subject: [PATCH] Allow non-attachment usages for the swapchain --- Cargo.lock | 18 +++++++++--------- libportability-gfx/src/impls.rs | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e34559..0945740 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -290,7 +290,7 @@ dependencies = [ [[package]] name = "gfx-auxil" version = "0.8.0" -source = "git+https://github.com/gfx-rs/gfx#457d3d7d6d7cf32926f63eefed54b750781dff18" +source = "git+https://github.com/gfx-rs/gfx#dd034e6cc94c175195137c12bd35d5fa98f51dba" dependencies = [ "fxhash", "gfx-hal", @@ -300,7 +300,7 @@ dependencies = [ [[package]] name = "gfx-backend-dx11" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx#457d3d7d6d7cf32926f63eefed54b750781dff18" +source = "git+https://github.com/gfx-rs/gfx#dd034e6cc94c175195137c12bd35d5fa98f51dba" dependencies = [ "arrayvec", "bitflags", @@ -321,7 +321,7 @@ dependencies = [ [[package]] name = "gfx-backend-dx12" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx#457d3d7d6d7cf32926f63eefed54b750781dff18" +source = "git+https://github.com/gfx-rs/gfx#dd034e6cc94c175195137c12bd35d5fa98f51dba" dependencies = [ "arrayvec", "bit-set", @@ -341,7 +341,7 @@ dependencies = [ [[package]] name = "gfx-backend-empty" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx#457d3d7d6d7cf32926f63eefed54b750781dff18" +source = "git+https://github.com/gfx-rs/gfx#dd034e6cc94c175195137c12bd35d5fa98f51dba" dependencies = [ "gfx-hal", "log", @@ -351,7 +351,7 @@ dependencies = [ [[package]] name = "gfx-backend-gl" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx#457d3d7d6d7cf32926f63eefed54b750781dff18" +source = "git+https://github.com/gfx-rs/gfx#dd034e6cc94c175195137c12bd35d5fa98f51dba" dependencies = [ "arrayvec", "bitflags", @@ -372,7 +372,7 @@ dependencies = [ [[package]] name = "gfx-backend-metal" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx#457d3d7d6d7cf32926f63eefed54b750781dff18" +source = "git+https://github.com/gfx-rs/gfx#dd034e6cc94c175195137c12bd35d5fa98f51dba" dependencies = [ "arrayvec", "bitflags", @@ -395,7 +395,7 @@ dependencies = [ [[package]] name = "gfx-backend-vulkan" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx#457d3d7d6d7cf32926f63eefed54b750781dff18" +source = "git+https://github.com/gfx-rs/gfx#dd034e6cc94c175195137c12bd35d5fa98f51dba" dependencies = [ "arrayvec", "ash", @@ -414,7 +414,7 @@ dependencies = [ [[package]] name = "gfx-hal" version = "0.7.0" -source = "git+https://github.com/gfx-rs/gfx#457d3d7d6d7cf32926f63eefed54b750781dff18" +source = "git+https://github.com/gfx-rs/gfx#dd034e6cc94c175195137c12bd35d5fa98f51dba" dependencies = [ "bitflags", "naga", @@ -837,7 +837,7 @@ dependencies = [ [[package]] name = "range-alloc" version = "0.1.2" -source = "git+https://github.com/gfx-rs/gfx#457d3d7d6d7cf32926f63eefed54b750781dff18" +source = "git+https://github.com/gfx-rs/gfx#dd034e6cc94c175195137c12bd35d5fa98f51dba" [[package]] name = "raw-window-handle" diff --git a/libportability-gfx/src/impls.rs b/libportability-gfx/src/impls.rs index 436f1f5..16ecfd8 100644 --- a/libportability-gfx/src/impls.rs +++ b/libportability-gfx/src/impls.rs @@ -4491,8 +4491,8 @@ pub unsafe extern "C" fn gfxCreateSwapchainKHR( format: conv::map_format(info.imageFormat).unwrap(), extent: conv::map_extent2d(info.imageExtent), image_count: info.minImageCount, - image_layers: 1, - image_usage: hal::image::Usage::COLOR_ATTACHMENT, + image_layers: info.imageArrayLayers as _, + image_usage: conv::map_image_usage(info.imageUsage), }; let framebuffer_attachment = config.framebuffer_attachment();