From 2ec2fa1a687390c22492fa6344e45d4c6b3c0ea7 Mon Sep 17 00:00:00 2001 From: Liran Date: Mon, 8 Aug 2011 09:08:46 +0300 Subject: [PATCH] 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 --- .../opengl/shared/OpenglCodecCommon/GLSharedGroup.cpp | 4 ++-- 1 file 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; }