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 From 8ce04f9a65612b7553015428e617ba7c53913175 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 5 Sep 2015 11:44:21 -0400 Subject: General: Replace GC_ALIGN macros with alignas Standard supported alignment -> out with compiler-specific. --- Source/Core/VideoCommon/TextureDecoder_Common.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 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 8fc1631b93..a1c7bff0c2 100644 --- a/Source/Core/VideoCommon/TextureDecoder_Common.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_Common.cpp @@ -5,7 +5,9 @@ #include #include -#include "Common/Common.h" +#include "Common/CommonFuncs.h" +#include "Common/CommonTypes.h" +#include "Common/Logging/Log.h" #include "VideoCommon/LookUpTables.h" #include "VideoCommon/sfont.inc" @@ -16,7 +18,7 @@ static bool TexFmt_Overlay_Center = false; // TRAM // STATE_TO_SAVE -GC_ALIGNED16(u8 texMem[TMEM_SIZE]); +alignas(16) u8 texMem[TMEM_SIZE]; int TexDecoder_GetTexelSizeInNibbles(int format) { -- cgit v1.2.3 From cc036ca86cdaf709e01221975da734cb64d54a94 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 26 Sep 2015 17:13:07 -0400 Subject: Common: Remove other Common prefixed headers from Common.h --- Source/Core/VideoCommon/TextureDecoder_Common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 a1c7bff0c2..5f8f314a0b 100644 --- a/Source/Core/VideoCommon/TextureDecoder_Common.cpp +++ b/Source/Core/VideoCommon/TextureDecoder_Common.cpp @@ -7,8 +7,8 @@ #include "Common/CommonFuncs.h" #include "Common/CommonTypes.h" +#include "Common/MsgHandler.h" #include "Common/Logging/Log.h" - #include "VideoCommon/LookUpTables.h" #include "VideoCommon/sfont.inc" #include "VideoCommon/TextureDecoder.h" -- cgit v1.2.3