VideoCommon: Start putting common texture decoding code in TextureDecoder_Common

This pulls all the duplicate code from TextureDecoder_Generic /
TextureDecoder_x64 out and puts it in a common file. Out custom font
used for debugging the texture cache is also pulled out and put in a
common "sfont.inc" file. At some point we should also combine this font
with the other six binary fonts we ship.
This commit is contained in:
Jasper St. Pierre
2014-09-04 18:36:53 -07:00
parent bfb2c04ace
commit 9438a30384
8 changed files with 1368 additions and 2593 deletions
+1
View File
@@ -23,6 +23,7 @@ set(SRCS BPFunctions.cpp
Statistics.cpp
TextureCacheBase.cpp
TextureConversionShader.cpp
TextureDecoder_Common.cpp
VertexLoader.cpp
VertexLoaderManager.cpp
VertexLoader_Color.cpp
+4 -4
View File
@@ -52,10 +52,6 @@ enum TextureFormat
GX_CTF_Z16L = 0xC | _GX_TF_ZTF | _GX_TF_CTF,
};
extern const char* texfmt[];
extern const unsigned char sfont_map[];
extern const unsigned char sfont_raw[][9*10];
int TexDecoder_GetTexelSizeInNibbles(int format);
int TexDecoder_GetTextureSizeInBytes(int width, int height, int format);
int TexDecoder_GetBlockWidthInTexels(u32 format);
@@ -79,4 +75,8 @@ PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, in
void TexDecoder_DecodeTexel(u8 *dst, const u8 *src, int s, int t, int imageWidth, int texformat, int tlutaddr, int tlutfmt);
void TexDecoder_DecodeTexelRGBA8FromTmem(u8 *dst, const u8 *src_ar, const u8* src_gb, int s, int t, int imageWidth);
PC_TexFormat TexDecoder_DecodeRGBA8FromTmem(u8* dst, const u8 *src_ar, const u8 *src_gb, int width, int height);
void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center);
/* Internal method, implemented by TextureDecoder_Generic and TextureDecoder_x64. */
PC_TexFormat _TexDecoder_DecodeImpl(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt,bool rgbaOnly);
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
@@ -73,6 +73,7 @@
<ClCompile Include="VideoBackendBase.cpp" />
<ClCompile Include="VideoConfig.cpp" />
<ClCompile Include="VideoState.cpp" />
<ClCompile Include="TextureDecoder_Common.cpp" />
<ClCompile Include="TextureDecoder_x64.cpp" />
<ClCompile Include="XFMemory.cpp" />
<ClCompile Include="XFStructs.cpp" />
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Base">
@@ -134,6 +134,9 @@
<ClCompile Include="VertexLoaderManager.cpp">
<Filter>Vertex Loading</Filter>
</ClCompile>
<ClCompile Include="TextureDecoder_Common.cpp">
<Filter>Decoding</Filter>
</ClCompile>
<ClCompile Include="TextureDecoder_x64.cpp">
<Filter>Decoding</Filter>
</ClCompile>
File diff suppressed because it is too large Load Diff