VideoCommon: Added automatic selection routines for SSSE3/SSE4.1 codes. It selects SSSE3/SSE4.1 codes only if a proper preprocessor definition is defined and the target cpu supports SSSE3/SSE4.1. The selection routines in VertexLoader_* use function pointers. TextureDecoder uses a combination of "#if" and "if" statements.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5302 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nodchip
2010-04-09 15:13:42 +00:00
parent 91c6f5acba
commit 956b8eb54d
8 changed files with 295 additions and 158 deletions

View File

@ -18,17 +18,17 @@
#ifndef VERTEXLOADER_POSITION_H
#define VERTEXLOADER_POSITION_H
typedef void (LOADERDECL *ReadPosision)();
class VertexLoader_Position {
public:
// Hold function pointers of vertex loaders.
// The first dimension corresponds to TVtxDesc.Position.
// The second dimension corresponds to TVtxAttr.PosFormat.
// The third dimension corresponds to TVtxAttr.PosElements.
// The dimensions are aligned to 2^n for speed up.
extern ReadPosision tableReadPosition[4][8][2];
// Init
static void Init(void);
// Hold vertex size of each vertex format.
// The dimensions are same as tableReadPosition.
extern int tableReadPositionVertexSize[4][8][2];
// GetSize
static unsigned int GetSize(unsigned int _type, unsigned int _format, unsigned int _elements);
// GetFunction
static TPipelineFunction GetFunction(unsigned int _type, unsigned int _format, unsigned int _elements);
};
#endif