Latte: Fix regression in dd7cb74

This commit is contained in:
Exzap 2024-03-12 05:52:53 +01:00
parent 224866c3d2
commit 6fa77feba3
2 changed files with 6 additions and 2 deletions

View File

@ -618,7 +618,7 @@ bool LatteMRT::UpdateCurrentFBO()
} }
// set effective size // set effective size
sint32 effectiveWidth, effectiveHeight; sint32 effectiveWidth, effectiveHeight;
depthBufferView->baseTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, depthBufferViewFirstSlice); depthBufferView->baseTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, 0);
if (rtEffectiveSize->width == 0 && rtEffectiveSize->height == 0) if (rtEffectiveSize->width == 0 && rtEffectiveSize->height == 0)
{ {
rtEffectiveSize->width = effectiveWidth; rtEffectiveSize->width = effectiveWidth;

View File

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