From 5f825a1fa8eacf87b18a5b5666080c7c0dd55926 Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Sun, 2 Jun 2024 20:29:10 +0200 Subject: [PATCH] Latte: Always allow views with the same format as base texture Fixes crash/assert in VC N64 titles --- src/Cafe/HW/Latte/Core/LatteTexture.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Cafe/HW/Latte/Core/LatteTexture.cpp b/src/Cafe/HW/Latte/Core/LatteTexture.cpp index 3754fb19..d8852891 100644 --- a/src/Cafe/HW/Latte/Core/LatteTexture.cpp +++ b/src/Cafe/HW/Latte/Core/LatteTexture.cpp @@ -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++) {