Retrieve active uniforms.

TRAC #22239
Signed-off-by: Daniel Koch
Signed-off-by: Shannon Woods
Author: Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1626 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Shader.cpp b/src/libGLESv2/Shader.cpp
index 7051b34..81dde92 100644
--- a/src/libGLESv2/Shader.cpp
+++ b/src/libGLESv2/Shader.cpp
@@ -174,6 +174,11 @@
     getSourceImpl(mHlsl, bufSize, length, buffer);
 }
 
+const sh::ActiveUniforms &Shader::getUniforms()
+{
+    return mActiveUniforms;
+}
+
 bool Shader::isCompiled()
 {
     return mHlsl != NULL;
@@ -310,6 +315,8 @@
     mUsesFrontFacing = false;
     mUsesPointSize = false;
     mUsesPointCoord = false;
+
+    mActiveUniforms.clear();
 }
 
 void Shader::compileToHLSL(void *compiler)
@@ -355,6 +362,10 @@
         ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &objCodeLen);
         mHlsl = new char[objCodeLen];
         ShGetObjectCode(compiler, mHlsl);
+
+        void *activeUniforms;
+        ShGetInfoPointer(compiler, SH_ACTIVE_UNIFORMS_ARRAY, &activeUniforms);
+        mActiveUniforms = *(sh::ActiveUniforms*)activeUniforms;
     }
     else
     {