diff options
| author | Liran <liran@graphtech.co.il> | 2011-08-08 09:08:46 +0300 |
|---|---|---|
| committer | David 'Digit' Turner <digit@android.com> | 2011-08-10 11:00:10 +0200 |
| commit | 2ec2fa1a687390c22492fa6344e45d4c6b3c0ea7 (patch) | |
| tree | ab3c500da9e887f7b7d947b52380011f0425f442 /tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp | |
| parent | d20186af1b4c55b50278189ab29847f78b9f5576 (diff) | |
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
Diffstat (limited to 'tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp')
| -rw-r--r-- | tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp b/tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp index ac360840f..f46889b3d 100644 --- a/tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp +++ b/tools/emulator/opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp @@ -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; } |
