opengles emulator: fix uniform name translation to apps

add special handling of locations smaller or equal to 0
do not translate location -1 (this location means the
uniform is not found)

location 0 does not need translation, it has no effect

Change-Id: Idbde51f08433ed70a5a1a2cf1ede51043f3cca76
This commit is contained in:
Liran
2011-08-08 09:08:46 +03:00
committed by David 'Digit' Turner
parent d20186af1b
commit 2ec2fa1a68

View File

@@ -82,13 +82,13 @@ void ProgramData::setupLocationShiftWAR()
GLint ProgramData::locationWARHostToApp(GLint hostLoc)
{
if (m_locShiftWAR) return hostLoc>>16;
if (m_locShiftWAR && hostLoc>0) return hostLoc>>16;
else return hostLoc;
}
GLint ProgramData::locationWARAppToHost(GLint appLoc)
{
if (m_locShiftWAR) return appLoc<<16;
if (m_locShiftWAR && appLoc>0) return appLoc<<16;
else return appLoc;
}