Backport Donko's hackfix to DX9 plugin. Move some code around. Add a couple of sanity checks.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@937 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-10-22 18:39:46 +00:00
parent ae0f0f8dcd
commit 32820d2036
8 changed files with 83 additions and 74 deletions

View File

@ -18,10 +18,6 @@
#ifndef _VERTEXLOADER_H
#define _VERTEXLOADER_H
#define SHADER_POSMTX_ATTRIB 1
#define SHADER_NORM1_ATTRIB 6
#define SHADER_NORM2_ATTRIB 7
using namespace std;
#include "CPMemory.h"
@ -30,39 +26,6 @@ using namespace std;
#define LOADERDECL __cdecl
typedef void (LOADERDECL *TPipelineFunction)(void*);
// m_components
enum {
VB_HAS_POSMTXIDX =(1<<1),
VB_HAS_TEXMTXIDX0=(1<<2),
VB_HAS_TEXMTXIDX1=(1<<3),
VB_HAS_TEXMTXIDX2=(1<<4),
VB_HAS_TEXMTXIDX3=(1<<5),
VB_HAS_TEXMTXIDX4=(1<<6),
VB_HAS_TEXMTXIDX5=(1<<7),
VB_HAS_TEXMTXIDX6=(1<<8),
VB_HAS_TEXMTXIDX7=(1<<9),
VB_HAS_TEXMTXIDXALL=(0xff<<2),
//VB_HAS_POS=0, // Implied, it always has pos! don't bother testing
VB_HAS_NRM0=(1<<10),
VB_HAS_NRM1=(1<<11),
VB_HAS_NRM2=(1<<12),
VB_HAS_NRMALL=(7<<10),
VB_HAS_COL0=(1<<13),
VB_HAS_COL1=(1<<14),
VB_HAS_UV0=(1<<15),
VB_HAS_UV1=(1<<16),
VB_HAS_UV2=(1<<17),
VB_HAS_UV3=(1<<18),
VB_HAS_UV4=(1<<19),
VB_HAS_UV5=(1<<20),
VB_HAS_UV6=(1<<21),
VB_HAS_UV7=(1<<22),
VB_HAS_UVALL=(0xff<<15),
VB_HAS_UVTEXMTXSHIFT=13,
};
// There are 8 of these. Most games only use the first, and just reconfigure it all the time
// as needed, unfortunately.
// TODO - clarify the role of this class. It seems to have taken on some irrelevant stuff.