Big Commit this will break a lot, fix a lot, but i thing is a good step:

Implemented all the correct format conversions in efb to texture copy.
replaced all the stretcrect calls with quad draws this must improve speed a bit.
A BIGGGGGGGGGG cleanup in the code and reorganization.
reimplemented zpeek using a secondary render target ( this still is buggy so many issues left)
please a lot off feedback.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4520 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2009-11-08 20:35:11 +00:00
parent 84c6135bfd
commit 0ac07e8aa8
13 changed files with 609 additions and 197 deletions

View File

@ -35,6 +35,13 @@ const VertexShaderCache::VSCacheEntry *VertexShaderCache::last_entry;
static float GC_ALIGNED16(lastVSconstants[C_FOGPARAMS+8][4]);
static LPDIRECT3DVERTEXSHADER9 SimpleVertexSahder;
LPDIRECT3DVERTEXSHADER9 VertexShaderCache::GetSimpleVertexSahder()
{
return SimpleVertexSahder;
}
void SetVSConstant4f(int const_number, float f1, float f2, float f3, float f4)
{
if (lastVSconstants[const_number][0] != f1 ||
@ -121,6 +128,21 @@ void SetMultiVSConstant4fv(int const_number, int count, const float *f)
void VertexShaderCache::Init()
{
char vSimpleProg[1024];
sprintf(vSimpleProg,"struct VSOUTPUT\n"
"{\n"
"float4 vPosition : POSITION;\n"
"float4 vTexCoord : TEXCOORD0;\n"
"};\n"
"VSOUTPUT main( float4 inPosition : POSITION, float4 inUV : TEXCOORD0)\n"
"{\n"
"VSOUTPUT OUT = (VSOUTPUT)0;\n"
"OUT.vPosition = inPosition;\n"
"OUT.vTexCoord = inUV;\n"
"return OUT;\n"
"}\n");
SimpleVertexSahder = D3D::CompileVertexShader(vSimpleProg, (int)strlen(vSimpleProg));
Clear();
}
@ -138,6 +160,8 @@ void VertexShaderCache::Clear()
void VertexShaderCache::Shutdown()
{
if(SimpleVertexSahder)
SimpleVertexSahder->Release();
Clear();
}