mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-09-26 11:06:25 -05:00
Latte: Copying a cubemap slice should create the target as 2D/2D_ARRAY
This commit is contained in:
@@ -91,7 +91,10 @@ void LatteSurfaceCopy_copySurfaceNew(const LatteSurfaceCopyParam& src, const Lat
|
||||
dstSurfaceWidth *= 4;
|
||||
dstSurfaceHeight *= 4;
|
||||
}
|
||||
destinationView = LatteTexture_CreateMapping(dst.physDataAddr, MPTR_NULL, dstSurfaceWidth, dstSurfaceHeight, dst.sliceIndex + 1, dst.pitch, Latte::MakeHWTileMode(dst.tilemode), dst.swizzle, 0, 1, dst.sliceIndex, 1, dst.surfaceFormat, dst.dim, Latte::IsMSAA(dst.dim) ? Latte::E_DIM::DIM_2D_MSAA : Latte::E_DIM::DIM_2D, false);
|
||||
auto dimBase = dst.dim;
|
||||
if (dst.dim == Latte::E_DIM::DIM_CUBEMAP)
|
||||
dimBase = dst.sliceIndex > 0 ? Latte::E_DIM::DIM_2D_ARRAY : Latte::E_DIM::DIM_2D; // cubemaps need to have a depth that is a multiple of 6, so instead we create the target as 2D/2D_ARRAY
|
||||
destinationView = LatteTexture_CreateMapping(dst.physDataAddr, MPTR_NULL, dstSurfaceWidth, dstSurfaceHeight, dst.sliceIndex + 1, dst.pitch, Latte::MakeHWTileMode(dst.tilemode), dst.swizzle, 0, 1, dst.sliceIndex, 1, dst.surfaceFormat, dimBase, Latte::IsMSAA(dst.dim) ? Latte::E_DIM::DIM_2D_MSAA : Latte::E_DIM::DIM_2D, false);
|
||||
destinationTexture = destinationView->baseTexture;
|
||||
}
|
||||
// copy texture
|
||||
|
||||
Reference in New Issue
Block a user