revert my last change to vertex manager as the performance difference is negligible an causes performance drop in higher definitions

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5658 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado 2010-06-12 15:38:42 +00:00
parent b336617cbf
commit f0d178122e
2 changed files with 11 additions and 18 deletions

View File

@ -22,7 +22,7 @@ static const char ID[4] = {'D', 'C', 'A', 'C'};
// Update this to the current SVN revision every time you change shader generation code.
// We don't automatically get this from SVN_REV because that would mean regenerating the
// shader cache for every revision, graphics-related or not, which is simply annoying.
const int version = 5653;
const int version = 5658;
LinearDiskCache::LinearDiskCache()
: file_(NULL), num_entries_(0) {

View File

@ -19,7 +19,6 @@
#include "FileUtil.h"
#include "D3DBase.h"
#include "D3DUtil.h"
#include "Statistics.h"
#include "Profiler.h"
@ -293,30 +292,24 @@ void Flush()
int stride = g_nativeVertexFmt->GetVertexStride();
g_nativeVertexFmt->SetupVertexPointers();
if(bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate)
{
D3D::SetRenderState(D3DRS_STENCILENABLE, TRUE );
D3D::SetRenderState(D3DRS_STENCILFUNC, D3DCMP_ALWAYS );
D3D::SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_REPLACE );
D3D::SetRenderState(D3DRS_STENCILREF, 1);
}
Draw(stride);
if (bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate)
{
D3D::SetRenderState(D3DRS_STENCILFUNC, D3DCMP_EQUAL );
D3D::SetRenderState(D3DRS_STENCILPASS, D3DSTENCILOP_DECR );
DWORD write = 0;
if (!PixelShaderCache::SetShader(true))
{
DEBUGGER_PAUSE_LOG_AT(NEXT_ERROR,true,{printf("Fail to set pixel shader\n");});
goto shader_fail;
}
// update alpha only
D3D::ChangeRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_ALPHA);
D3D::ChangeRenderState(D3DRS_ALPHABLENDENABLE, false);
D3D::ChangeRenderState(D3DRS_ZWRITEENABLE, false);
D3D::drawClearQuad((bpmem.dstalpha.hex & 0xff)<<24,0.0f,PixelShaderCache::GetClearProgram(),VertexShaderCache::GetClearVertexShader());
D3D::RefreshRenderState(D3DRS_ZWRITEENABLE);
Draw(stride);
D3D::RefreshRenderState(D3DRS_COLORWRITEENABLE);
D3D::RefreshRenderState(D3DRS_ALPHABLENDENABLE);
D3D::SetRenderState(D3DRS_STENCILENABLE, false );
}
DEBUGGER_PAUSE_AT(NEXT_FLUSH,true);