summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureDecoder_Common.cpp
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2015-09-05 02:45:29 +1200
committerScott Mansell <phiren@gmail.com>2015-09-06 21:16:51 +1200
commitb9be3245e1bcd3929baf4d1c66fe5a14b336cdbc (patch)
tree74ad51f328cce90485ee1fdf1f97f2546b01e2bc /Source/Core/VideoCommon/TextureDecoder_Common.cpp
parent52948bb3ef016abd7e35e775b17b7cf3f487d49c (diff)
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.
Diffstat (limited to 'Source/Core/VideoCommon/TextureDecoder_Common.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureDecoder_Common.cpp15
1 files changed, 11 insertions, 4 deletions
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;
}
}