Skip to content

Commit

Permalink
Latte: Fix regression in dd7cb74
Browse files Browse the repository at this point in the history
  • Loading branch information
Exzap committed Mar 12, 2024
1 parent 224866c commit 6fa77fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Cafe/HW/Latte/Core/LatteRenderTarget.cpp
Expand Up @@ -618,7 +618,7 @@ bool LatteMRT::UpdateCurrentFBO()
}
// set effective size
sint32 effectiveWidth, effectiveHeight;
depthBufferView->baseTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, depthBufferViewFirstSlice);
depthBufferView->baseTexture->GetEffectiveSize(effectiveWidth, effectiveHeight, 0);
if (rtEffectiveSize->width == 0 && rtEffectiveSize->height == 0)
{
rtEffectiveSize->width = effectiveWidth;
Expand Down
6 changes: 5 additions & 1 deletion src/Cafe/HW/Latte/Core/LatteTextureLegacy.cpp
Expand Up @@ -206,7 +206,11 @@ void LatteTexture_updateTexturesForStage(LatteDecompilerShader* shaderContext, u

bool isDepthSampler = shaderContext->textureUsesDepthCompare[textureIndex];
// 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)
{
// view not found, create a new mapping which will also create a new texture if necessary
Expand Down

0 comments on commit 6fa77fe

Please sign in to comment.