A simple z-buffer fix for the GL plugin, we were setting the nearz as negative nearz, which messed up the fzero stage in Melee at a certain point. Also redundent code moved about
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@685 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
3b346a7d47
commit
015e43340a
|
@ -305,20 +305,15 @@ void VertexLoader::ProcessFormat()
|
|||
|
||||
//_assert_( VertexManager::s_pCurBufferPointer == s_pBaseBufferPointer );
|
||||
|
||||
if (!m_AttrDirty) {
|
||||
|
||||
if (!m_AttrDirty)
|
||||
{
|
||||
if (m_VtxDesc.Hex0 == VertexManager::GetVtxDesc().Hex0 && (m_VtxDesc.Hex1&1)==(VertexManager::GetVtxDesc().Hex1&1))
|
||||
// same
|
||||
return;
|
||||
|
||||
m_VtxDesc.Hex = VertexManager::GetVtxDesc().Hex;
|
||||
return; // same
|
||||
}
|
||||
else {
|
||||
// set anyway
|
||||
m_VtxDesc.Hex = VertexManager::GetVtxDesc().Hex;
|
||||
else
|
||||
m_AttrDirty = 0;
|
||||
}
|
||||
|
||||
m_VtxDesc.Hex = VertexManager::GetVtxDesc().Hex;
|
||||
DVSTARTPROFILE();
|
||||
|
||||
// Reset pipeline
|
||||
|
@ -1054,12 +1049,14 @@ void VertexManager::Flush()
|
|||
nonpow2tex |= 1<<i;
|
||||
if( tentry->mode.wrap_s > 0 ) nonpow2tex |= 1<<(8+i);
|
||||
if( tentry->mode.wrap_t > 0 ) nonpow2tex |= 1<<(16+i);
|
||||
TextureMngr::EnableTexRECT(i);
|
||||
}
|
||||
// if texture is power of two, set to ones (since don't need scaling)
|
||||
else PixelShaderMngr::SetTexDims(i, tentry->w, tentry->h, 0, 0);
|
||||
|
||||
if( tentry->isNonPow2 ) TextureMngr::EnableTexRECT(i);
|
||||
else TextureMngr::EnableTex2D(i);
|
||||
else
|
||||
{
|
||||
PixelShaderMngr::SetTexDims(i, tentry->w, tentry->h, 0, 0);
|
||||
TextureMngr::EnableTex2D(i);
|
||||
}
|
||||
|
||||
if( g_Config.iLog & CONF_PRIMLOG ) {
|
||||
// save the textures
|
||||
|
|
|
@ -324,7 +324,7 @@ void VertexShaderMngr::SetConstants(VERTEXSHADER& vs)
|
|||
INFO_LOG("view: topleft=(%f,%f), wh=(%f,%f), z=(%f,%f)\n",rawViewport[3]-rawViewport[0]-342,rawViewport[4]+rawViewport[1]-342,
|
||||
2 * rawViewport[0], 2 * rawViewport[1], (rawViewport[5]-rawViewport[2])/16777215.0f, rawViewport[5]/16777215.0f);
|
||||
glViewport((int)(rawViewport[3]-rawViewport[0]-342) * MValueX,Renderer::GetTargetHeight()-((int)(rawViewport[4]-rawViewport[1]-342)) * MValueY, abs((int)(2 * rawViewport[0])) * MValueX, abs((int)(2 * rawViewport[1])) * MValueY);
|
||||
glDepthRange((rawViewport[5]-rawViewport[2])/16777215.0f, rawViewport[5]/16777215.0f);
|
||||
glDepthRange((rawViewport[5]-rawViewport[2])/-16777215.0f, rawViewport[5]/16777215.0f);
|
||||
}
|
||||
|
||||
if (bProjectionChanged) {
|
||||
|
|
Loading…
Reference in New Issue