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

View File

@ -472,8 +472,10 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
cbufid = 5; cbufid = 5;
break; break;
case 12: // Z16L case 12: // Z16L - copy lower 16 depth bits
colmat[2] = colmat[6] = colmat[10] = colmat[13] = 1.0f; // 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; cbufid = 6;
break; break;
@ -483,7 +485,6 @@ void TextureCache::CopyRenderTargetToTexture(u32 dstAddr, unsigned int dstFormat
cbufid = 7; cbufid = 7;
break; break;
} }
} }
else if (isIntensity) else if (isIntensity)
{ {