Swizzle Uniform Locations

TEST=unit tests and ran OpenGL ES 2.0 conformance tests
BUG=106062

[email protected]


Review URL: http://codereview.chromium.org/9309047

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120743 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 2c56c7b..34c6916e 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -6098,7 +6098,8 @@
   if (*location != -1) {
     return error::kGenericError;
   }
-  *location = info->GetUniformLocation(name_str);
+  *location = program_manager()->SwizzleLocation(
+      info->GetUniformLocation(name_str));
   return error::kNoError;
 }
 
@@ -7137,7 +7138,7 @@
 error::Error GLES2DecoderImpl::HandleGetUniformiv(
     uint32 immediate_data_size, const gles2::GetUniformiv& c) {
   GLuint program = c.program;
-  GLint location = c.location;
+  GLint location = program_manager()->UnswizzleLocation(c.location);
   GLuint service_id;
   GLenum result_type;
   Error error;
@@ -7155,7 +7156,7 @@
 error::Error GLES2DecoderImpl::HandleGetUniformfv(
     uint32 immediate_data_size, const gles2::GetUniformfv& c) {
   GLuint program = c.program;
-  GLint location = c.location;
+  GLint location = program_manager()->UnswizzleLocation(c.location);
   GLuint service_id;
   Error error;
   typedef gles2::GetUniformfv::Result Result;
@@ -7659,7 +7660,7 @@
   if (!info || !info->IsValid()) {
     return error::kNoError;
   }
-  info->GetProgramInfo(bucket);
+  info->GetProgramInfo(program_manager(), bucket);
   return error::kNoError;
 }