From b9be3245e1bcd3929baf4d1c66fe5a14b336cdbc Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Sat, 5 Sep 2015 02:45:29 +1200 Subject: Move common EFB copy code into VideoCommon Addded a few duplicated depth copy texture formats to the enum in TextureDecoder.h. These texture formats were already implemented in TextureCacheBase and the ogl/dx11 texture cache implementations. --- Source/Core/VideoCommon/TextureDecoder_Common.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoCommon/TextureDecoder_Common.cpp') diff --git a/Source/Core/VideoCommon/TextureDecoder_Common.cpp b/Source/Core/VideoCommon/TextureDecoder_Common.cpp index 092b8ec1e0..8fc1631b93 100644 --- a/Source/Core/VideoCommon/TextureDecoder_Common.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_Common.cpp @@ -35,7 +35,6 @@ int TexDecoder_GetTexelSizeInNibbles(int format) 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; @@ -48,10 +47,14 @@ int TexDecoder_GetTexelSizeInNibbles(int format) case GX_TF_Z24X8: return 8; case GX_CTF_Z4: return 1; + case GX_CTF_Z8H: return 2; case GX_CTF_Z8M: return 2; case GX_CTF_Z8L: return 2; + case GX_CTF_Z16R: return 4; case GX_CTF_Z16L: return 4; - default: return 1; + default: + PanicAlert("Unsupported Texture Format (%08x)! (GetTexelSizeInNibbles)", format); + return 1; } } @@ -88,11 +91,13 @@ int TexDecoder_GetBlockWidthInTexels(u32 format) case GX_TF_Z16: return 4; case GX_TF_Z24X8: return 4; case GX_CTF_Z4: return 8; + case GX_CTF_Z8H: return 8; case GX_CTF_Z8M: return 8; case GX_CTF_Z8L: return 8; + case GX_CTF_Z16R: return 4; case GX_CTF_Z16L: return 4; default: - ERROR_LOG(VIDEO, "Unsupported Texture Format (%08x)! (GetBlockWidthInTexels)", format); + PanicAlert("Unsupported Texture Format (%08x)! (GetBlockWidthInTexels)", format); return 8; } } @@ -125,11 +130,13 @@ int TexDecoder_GetBlockHeightInTexels(u32 format) case GX_TF_Z16: return 4; case GX_TF_Z24X8: return 4; case GX_CTF_Z4: return 8; + case GX_CTF_Z8H: return 4; case GX_CTF_Z8M: return 4; case GX_CTF_Z8L: return 4; + case GX_CTF_Z16R: return 4; case GX_CTF_Z16L: return 4; default: - ERROR_LOG(VIDEO, "Unsupported Texture Format (%08x)! (GetBlockHeightInTexels)", format); + PanicAlert("Unsupported Texture Format (%08x)! (GetBlockHeightInTexels)", format); return 4; } } -- cgit v1.2.3