VideoCommon: Fix upper and lower depth bytes being switched when performing Z16L EFB copies (EFB to texture only).

Fixes issue 4989.
Fixes issue 5056.
This commit is contained in:
NeoBrainX 2011-12-10 16:08:26 +01:00
parent c04c3bd9d3
commit 3d9c35f58e
1 changed files with 7 additions and 6 deletions

View File

@ -472,8 +472,10 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
cbufid = 5;
break;
case 12: // Z16L
colmat[2] = colmat[6] = colmat[10] = colmat[13] = 1.0f;
case 12: // Z16L - copy lower 16 depth bits
// expected to be used as an IA8 texture (upper 8 bits stored as intensity, lower 8 bits stored as alpha)
// Used e.g. in Zelda: Skyward Sword
colmat[1] = colmat[5] = colmat[9] = colmat[14] = 1.0f;
cbufid = 6;
break;
@ -483,7 +485,6 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
cbufid = 7;
break;
}
}
else if (isIntensity)
{