mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
vulkan: fix one validation error when sending a depth-stencil texture to a shader.
This commit is contained in:
@@ -355,6 +355,10 @@ void Texture::createTextureImageView()
|
|||||||
viewInfo.viewType = Vulkan::getImageViewType(getTextureType());
|
viewInfo.viewType = Vulkan::getImageViewType(getTextureType());
|
||||||
viewInfo.format = vulkanFormat.internalFormat;
|
viewInfo.format = vulkanFormat.internalFormat;
|
||||||
viewInfo.subresourceRange.aspectMask = imageAspect;
|
viewInfo.subresourceRange.aspectMask = imageAspect;
|
||||||
|
// This view is used in descriptor sets, where having both depth and
|
||||||
|
// stencil aspects in the same view isn't allowed.
|
||||||
|
if (imageAspect & VK_IMAGE_ASPECT_DEPTH_BIT)
|
||||||
|
viewInfo.subresourceRange.aspectMask &= ~VK_IMAGE_ASPECT_STENCIL_BIT;
|
||||||
viewInfo.subresourceRange.baseMipLevel = rootView.startMipmap;
|
viewInfo.subresourceRange.baseMipLevel = rootView.startMipmap;
|
||||||
viewInfo.subresourceRange.levelCount = getMipmapCount();
|
viewInfo.subresourceRange.levelCount = getMipmapCount();
|
||||||
viewInfo.subresourceRange.baseArrayLayer = rootView.startLayer;
|
viewInfo.subresourceRange.baseArrayLayer = rootView.startLayer;
|
||||||
|
|||||||
Reference in New Issue
Block a user