fix: a typo in texture index

This commit is contained in:
Samuliak 2025-01-09 20:34:49 +01:00
parent a0239cb756
commit d9bf99cb20
No known key found for this signature in database

View file

@ -872,6 +872,14 @@ void LatteDecompiler_analyze(LatteDecompilerShaderContext* shaderContext, LatteD
if (dim != Latte::E_DIM::DIM_2D) if (dim != Latte::E_DIM::DIM_2D)
continue; continue;
// Check for mip level
// TODO: uncomment?
/*
auto lastMip = texRegister.word5.get_LAST_LEVEL();
if (lastMip != 0)
continue;
*/
// Check if the texture is used as render target // Check if the texture is used as render target
for (sint32 j = 0; j < LATTE_NUM_COLOR_TARGET; j++) for (sint32 j = 0; j < LATTE_NUM_COLOR_TARGET; j++)
{ {
@ -886,7 +894,7 @@ void LatteDecompiler_analyze(LatteDecompilerShaderContext* shaderContext, LatteD
// TODO: check if mip matches as well? // TODO: check if mip matches as well?
if (physAddr == colorBufferPhysMem) if (physAddr == colorBufferPhysMem)
{ {
shader->textureRenderTargetIndex[i] = j; shader->textureRenderTargetIndex[textureIndex] = j;
break; break;
} }
} }