Skip to content

Commit

Permalink
Latte: Always allow views with the same format as base texture
Browse files Browse the repository at this point in the history
Fixes crash/assert in VC N64 titles
  • Loading branch information
Exzap committed Jun 2, 2024
1 parent d33337d commit 5f825a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Cafe/HW/Latte/Core/LatteTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,9 @@ void LatteTexture_InitSliceAndMipInfo(LatteTexture* texture)
// if this function returns false, textures will not be synchronized even if their data overlaps
bool LatteTexture_IsFormatViewCompatible(Latte::E_GX2SURFFMT formatA, Latte::E_GX2SURFFMT formatB)
{
if(formatA == formatB)
return true; // if the format is identical then compatibility must be guaranteed (otherwise we can't create the necessary default view of a texture)

// todo - find a better way to handle this
for (sint32 swap = 0; swap < 2; swap++)
{
Expand Down

0 comments on commit 5f825a1

Please sign in to comment.