mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
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:
@@ -23,6 +23,7 @@ set(SRCS BPFunctions.cpp
|
||||
Statistics.cpp
|
||||
TextureCacheBase.cpp
|
||||
TextureConversionShader.cpp
|
||||
TextureDecoder_Common.cpp
|
||||
VertexLoader.cpp
|
||||
VertexLoaderManager.cpp
|
||||
VertexLoader_Color.cpp
|
||||
|
||||
@@ -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
@@ -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
Reference in New Issue
Block a user