Implement gl_DepthRange using a single uniform vector.
TRAC #14504
Signed-off-by: Daniel Koch

Author:    Nicolas Capens

git-svn-id: https://angleproject.googlecode.com/svn/trunk@495 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Program.cpp b/src/libGLESv2/Program.cpp
index eff7fee..3c08642 100644
--- a/src/libGLESv2/Program.cpp
+++ b/src/libGLESv2/Program.cpp
@@ -1536,9 +1536,7 @@
 
             // these uniforms are searched as already-decorated because gl_ and dx_
             // are reserved prefixes, and do not receive additional decoration
-            mDepthRangeNearLocation = getUniformLocation("gl_DepthRange.near", true);
-            mDepthRangeFarLocation = getUniformLocation("gl_DepthRange.far", true);
-            mDepthRangeDiffLocation = getUniformLocation("gl_DepthRange.diff", true);
+            mDxDepthRangeLocation = getUniformLocation("dx_DepthRange", true);
             mDxDepthLocation = getUniformLocation("dx_Depth", true);
             mDxViewportLocation = getUniformLocation("dx_Viewport", true);
             mDxHalfPixelSizeLocation = getUniformLocation("dx_HalfPixelSize", true);
@@ -2457,9 +2455,7 @@
         mUniforms.pop_back();
     }
 
-    mDepthRangeDiffLocation = -1;
-    mDepthRangeNearLocation = -1;
-    mDepthRangeFarLocation = -1;
+    mDxDepthRangeLocation = -1;
     mDxDepthLocation = -1;
     mDxViewportLocation = -1;
     mDxHalfPixelSizeLocation = -1;
@@ -2794,19 +2790,9 @@
     *constantVS = targetUniform->vsHandle;
 }
 
-GLint Program::getDepthRangeDiffLocation() const
+GLint Program::getDxDepthRangeLocation() const
 {
-    return mDepthRangeDiffLocation;
-}
-
-GLint Program::getDepthRangeNearLocation() const
-{
-    return mDepthRangeNearLocation;
-}
-
-GLint Program::getDepthRangeFarLocation() const
-{
-    return mDepthRangeFarLocation;
+    return mDxDepthRangeLocation;
 }
 
 GLint Program::getDxDepthLocation() const