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; }