mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-10-17 08:20:33 +02:00
Latte: Use correct surface width/height when creating tex copy target
This commit is contained in:
1 parent
303915a61e
commit
afb97632f0
1 file changed
+8
-1
@@ -84,7 +84,14 @@ void LatteSurfaceCopy_copySurfaceNew(const LatteSurfaceCopyParam& src, const Lat
|
||||
// create destination texture if it doesnt exist
|
||||
if (!destinationTexture)
|
||||
{
|
||||
destinationView = LatteTexture_CreateMapping(dst.physDataAddr, MPTR_NULL, rect.x + rect.width, rect.y + rect.height, 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);
|
||||
uint32 dstSurfaceWidth = dst.pitch;
|
||||
uint32 dstSurfaceHeight = dst.heightInTexels;
|
||||
if (Latte::IsCompressedFormat(dst.surfaceFormat))
|
||||
{
|
||||
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);
|
||||
destinationTexture = destinationView->baseTexture;
|
||||
}
|
||||
// copy texture
|
||||
|
||||
Reference in new issue
Block a user