From b052600404f73353fc255574eaa80d3e46d893c3 Mon Sep 17 00:00:00 2001 From: Chip Davis Date: Wed, 21 Oct 2020 09:57:30 -0500 Subject: [PATCH] MVKImage: Always set the depth plane when rendering to a 3D image. Even if we used a texture view. We can't constrain the depth planes in a 3D texture using a texture view, so we need to set the render depth plane in that case. --- MoltenVK/MoltenVK/GPUObjects/MVKImage.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm index 0c6167e7..ce164b96 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKImage.mm @@ -1537,7 +1537,7 @@ void MVKImageView::populateMTLRenderPassAttachmentDescriptor(MTLRenderPassAttach mtlAttDesc.level = plane->_useMTLTextureView ? 0 : _subresourceRange.baseMipLevel; if (mtlAttDesc.texture.textureType == MTLTextureType3D) { mtlAttDesc.slice = 0; - mtlAttDesc.depthPlane = plane->_useMTLTextureView ? 0 : _subresourceRange.baseArrayLayer; + mtlAttDesc.depthPlane = _subresourceRange.baseArrayLayer; } else { mtlAttDesc.slice = plane->_useMTLTextureView ? 0 : _subresourceRange.baseArrayLayer; mtlAttDesc.depthPlane = 0;