Latte: Derive framebuffer size from correct mip of depth buffer

This commit is contained in:
Exzap 2024-03-12 16:16:52 +01:00
parent 6fa77feba3
commit 8bc444bb97
4 changed files with 5 additions and 6 deletions

View file

@ -207,10 +207,10 @@ void LatteTexture_updateTexturesForStage(LatteDecompilerShader* shaderContext, u
bool isDepthSampler = shaderContext->textureUsesDepthCompare[textureIndex];
// look for already existing texture
LatteTextureView* textureView;
if (isDepthSampler == false)
if (!isDepthSampler)
textureView = LatteTextureViewLookupCache::lookup(physAddr, width, height, depth, pitch, viewFirstMip, viewNumMips, viewFirstSlice, viewNumSlices, format, dim);
else
textureView = LatteTextureViewLookupCache::lookup(physAddr, width, height, depth, pitch, viewFirstMip, viewNumMips, viewFirstSlice, viewNumSlices, format, dim, true);
textureView = LatteTextureViewLookupCache::lookupWithColorOrDepthType(physAddr, width, height, depth, pitch, viewFirstMip, viewNumMips, viewFirstSlice, viewNumSlices, format, dim, true);
if (!textureView)
{
// view not found, create a new mapping which will also create a new texture if necessary