From aa851f19b30282828ed8e886b6145fabdec6e490 Mon Sep 17 00:00:00 2001 From: msiglreith Date: Fri, 20 Jul 2018 23:12:30 +0200 Subject: [PATCH] Handle unused depth stencil subpass attachments --- libportability-gfx/src/impls.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libportability-gfx/src/impls.rs b/libportability-gfx/src/impls.rs index f4a7411..6fb1911 100644 --- a/libportability-gfx/src/impls.rs +++ b/libportability-gfx/src/impls.rs @@ -12,6 +12,7 @@ use hal::queue::RawCommandQueue; use smallvec::SmallVec; use std::ffi::{CStr, CString}; +use std::os::raw::c_int; #[cfg(feature = "renderdoc")] use std::os::raw::c_void; use std::{mem, ptr}; @@ -2713,6 +2714,7 @@ pub extern "C" fn gfxCreateRenderPass( .pDepthStencilAttachment .as_ref() .map(map_attachment_ref) + .filter(|ds| ds.0 as c_int != VK_ATTACHMENT_UNUSED) }; let preserve = unsafe { @@ -3840,7 +3842,7 @@ pub extern "C" fn gfxGetPhysicalDeviceSurfacePresentModesKHR( } unsafe { *pPresentModeCount = count as _ }; - + code }