dolphin-emu/dolphin — pull request #207 by Sonicadvance1 (2014-03-25 12:53:56+00:00)
Title: [RFC] Initial cleanup of our texture decoders.

This is the initial cleanup that is required if we want to add backend dependent texture decoding.
The current system in place is a mess if one wants to add new decoding methods.

Basically the current system has you going in to TextureDecoder_{Generic,x64}.cpp and having a check in TexDecoder_Decode to point to the correct decoding function to use. This worked fine for OpenCL since it was backend independant, but it was still a kludge.

New method changes our texture decoder over to a class which is based in TextureCacheBase, and then it is initialized to whichever decoder that one wants to use in the backend's TextureCache.

Currently the only two decoders are Generic and x86, which isn't an issue. Hopefully in the future we'll have a shader based texture decoder.

When implementing the new texture decoder that is backend specific. just derive from the x86TextureDecoder(with fallback to TextureDecoderBase on GENERIC build) and implement the Decode_* functions, whichever ones will "automatically" fall back to the reference C or x86 based decoders.

D3D has been untested, but as long as it compiles it should be fine.