mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 14:28:34 +00:00
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.
This commit is contained in:
parent
52948bb3ef
commit
b9be3245e1
14 changed files with 151 additions and 249 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue