Merge pull request #1118 from cdavis5e/3d-image-view-render

MVKImage: Always set the depth plane when rendering to a 3D image.
This commit is contained in:
Bill Hollings 2020-10-21 20:07:00 -04:00 committed by GitHub
commit 6595ac8987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;