Skip to content

Commit

Permalink
Vulkan: For MSAA surface copies make the target MSAA too
Browse files Browse the repository at this point in the history
Fixes #1108
  • Loading branch information
Exzap committed Mar 8, 2024
1 parent 9f9bc98 commit ea68f78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Core/LatteSurfaceCopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void LatteSurfaceCopy_copySurfaceNew(MPTR srcPhysAddr, MPTR srcMipAddr, uint32 s
if (!destinationTexture)
{
LatteTexture* renderTargetConf = nullptr;
destinationView = LatteTexture_CreateMapping(dstPhysAddr, dstMipAddr, dstWidth, dstHeight, dstDepth, dstPitch, dstTilemode, dstSwizzle, dstLevel, 1, dstSlice, 1, dstSurfaceFormat, dstDim, Latte::E_DIM::DIM_2D, false);
destinationView = LatteTexture_CreateMapping(dstPhysAddr, dstMipAddr, dstWidth, dstHeight, dstDepth, dstPitch, dstTilemode, dstSwizzle, dstLevel, 1, dstSlice, 1, dstSurfaceFormat, dstDim, Latte::IsMSAA(dstDim) ? Latte::E_DIM::DIM_2D_MSAA : Latte::E_DIM::DIM_2D, false);
destinationTexture = destinationView->baseTexture;
}
// copy texture
Expand Down
5 changes: 5 additions & 0 deletions src/Cafe/HW/Latte/ISA/LatteReg.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@ namespace Latte
return IsCompressedFormat((Latte::E_HWSURFFMT)((uint32)format & 0x3F));
}

inline bool IsMSAA(Latte::E_DIM dim)
{
return dim == E_DIM::DIM_2D_MSAA || dim == E_DIM::DIM_2D_ARRAY_MSAA;
}

enum GPU_LIMITS
{
NUM_VERTEX_BUFFERS = 16,
Expand Down

0 comments on commit ea68f78

Please sign in to comment.