Only use 2D array depth targets when depth > 1

This commit is contained in:
Billy Laws 2022-11-06 19:22:20 +00:00
parent 7fed971b2d
commit 88cc696c7f

View File

@ -213,7 +213,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
bool thirdDimensionDefinesArraySize{engine->ztSize.control == engine::ZtSize::Control::ThirdDimensionDefinesArraySize}; bool thirdDimensionDefinesArraySize{engine->ztSize.control == engine::ZtSize::Control::ThirdDimensionDefinesArraySize};
if (engine->ztSize.control == engine::ZtSize::Control::ThirdDimensionDefinesArraySize) { if (engine->ztSize.control == engine::ZtSize::Control::ThirdDimensionDefinesArraySize) {
guest.layerCount = engine->ztSize.thirdDimension; guest.layerCount = engine->ztSize.thirdDimension;
guest.viewType = vk::ImageViewType::e2DArray; guest.viewType = engine->ztSize.thirdDimension > 1 ? vk::ImageViewType::e2DArray : vk::ImageViewType::e2D;
} else if (engine->ztSize.control == engine::ZtSize::Control::ArraySizeIsOne) { } else if (engine->ztSize.control == engine::ZtSize::Control::ArraySizeIsOne) {
guest.layerCount = 1; guest.layerCount = 1;
guest.viewType = vk::ImageViewType::e2D; guest.viewType = vk::ImageViewType::e2D;