diff options
| author | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2009-11-13 11:55:14 +0000 |
|---|---|---|
| committer | Rodolfo Osvaldo Bogado <rodolfoosvaldobogado@gmail.com> | 2009-11-13 11:55:14 +0000 |
| commit | e56ca08b4ff03a9c9500035a4f66404cf9997af7 (patch) | |
| tree | 9bc2b992d814b4abfa86f0cbfba6a8374d4f4a2e /Source/Core/VideoCommon | |
| parent | 654800458fe91cd40370547f2798485ba8aae5f9 (diff) | |
some minor changes preparing for future commits, and a correction to texture alignment that must solve the efb misalignments in various games
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4556 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Src/PixelShaderManager.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureDecoder.cpp | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp index 51bc778aa5..0f7de16c23 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp @@ -120,7 +120,7 @@ void PixelShaderManager::SetConstants() break; case 2: // 24 bits - ftemp[0] = ffrac/65536.0f; ftemp[1] = ffrac/256.0f; ftemp[2] = ffrac; ftemp[3] = ffrac/16777216.0f; + ftemp[0] = ffrac/65536.0f; ftemp[1] = ffrac/256.0f; ftemp[2] = ffrac; ftemp[3] = 0; break; } SetPSConstant4fv(C_ZBIAS, ftemp); diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp index 9c09ad37cb..5f82c25ec1 100644 --- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp +++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp @@ -60,6 +60,25 @@ int TexDecoder_GetTexelSizeInNibbles(int format) case GX_TF_C8: return 2; case GX_TF_C14X2: return 4; case GX_TF_CMPR: return 1; + case GX_CTF_R4: return 1; + case GX_CTF_RA4: return 2; + case GX_CTF_RA8: return 4; + case GX_CTF_YUVA8: return 8; + case GX_CTF_A8: return 2; + case GX_CTF_R8: return 2; + case GX_CTF_G8: return 2; + case GX_CTF_B8: return 2; + case GX_CTF_RG8: return 4; + case GX_CTF_GB8: return 4; + + case GX_TF_Z8: return 2; + case GX_TF_Z16: return 4; + case GX_TF_Z24X8: return 8; + + case GX_CTF_Z4: return 1; + case GX_CTF_Z8M: return 2; + case GX_CTF_Z8L: return 2; + case GX_CTF_Z16L: return 4; default: return 1; } } |
