Bug 649233 - Include ANGLE r611. r=joe
authorBenoit Jacob <bjacob@mozilla.com>
Tue, 12 Apr 2011 00:36:13 -0700
changeset 68002 ce696f2e9cc979c40c128f9cd3cace3d7f51b3c1
parent 68001 38b89e52662803a72566b41827b4eb101f3a7658
child 68003 48d6abe0a436684ba33e958303d27426480a27ba
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe
bugs649233
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 649233 - Include ANGLE r611. r=joe
gfx/angle/src/common/version.h
gfx/angle/src/compiler/compilerdebug.cpp
gfx/angle/src/compiler/compilerdebug.h
gfx/angle/src/compiler/preprocessor/atom.c
gfx/angle/src/libGLESv2/Program.cpp
--- a/gfx/angle/src/common/version.h
+++ b/gfx/angle/src/common/version.h
@@ -1,10 +1,10 @@
 #define MAJOR_VERSION 0
 #define MINOR_VERSION 0
 #define BUILD_VERSION 0
-#define BUILD_REVISION 541
+#define BUILD_REVISION 611
 
 #define STRINGIFY(x) #x
 #define MACRO_STRINGIFY(x) STRINGIFY(x)
 
 #define REVISION_STRING MACRO_STRINGIFY(BUILD_REVISION)
 #define VERSION_STRING MACRO_STRINGIFY(MAJOR_VERSION) "." MACRO_STRINGIFY(MINOR_VERSION) "." MACRO_STRINGIFY(BUILD_VERSION) "." MACRO_STRINGIFY(BUILD_REVISION)
--- a/gfx/angle/src/compiler/preprocessor/atom.c
+++ b/gfx/angle/src/compiler/preprocessor/atom.c
@@ -177,22 +177,23 @@ static int HashString2(const char *s)
  */
 
 static int AddString(StringTable *stable, const char *s)
 {
     int len, loc;
     char *str;
 
     len = (int) strlen(s);
-    if (stable->nextFree + len + 1 >= stable->size) {
+    while (stable->nextFree + len + 1 >= stable->size) {
         assert(stable->size < 1000000);
         str = (char *) malloc(stable->size*2);
         memcpy(str, stable->strings, stable->size);
         free(stable->strings);
         stable->strings = str;
+        stable->size = stable->size*2;
     }
     loc = stable->nextFree;
     strcpy(&stable->strings[loc], s);
     stable->nextFree += len + 1;
     return loc;
 } // AddString
 
 ///////////////////////////////////////////////////////////////////////////////////////////////
--- a/gfx/angle/src/libGLESv2/Program.cpp
+++ b/gfx/angle/src/libGLESv2/Program.cpp
@@ -2727,17 +2727,22 @@ GLint Program::getActiveUniformMaxLength
 {
     int maxLength = 0;
 
     unsigned int numUniforms = mUniforms.size();
     for (unsigned int uniformIndex = 0; uniformIndex < numUniforms; uniformIndex++)
     {
         if (!mUniforms[uniformIndex]->name.empty() && mUniforms[uniformIndex]->name.substr(0, 3) != "dx_")
         {
-            maxLength = std::max((int)(undecorate(mUniforms[uniformIndex]->name).length() + 1), maxLength);
+            int length = (int)(undecorate(mUniforms[uniformIndex]->name).length() + 1);
+            if (mUniforms[uniformIndex]->arraySize != 1)
+            {
+                length += 3;  // Counting in "[0]".
+            }
+            maxLength = std::max(length, maxLength);
         }
     }
 
     return maxLength;
 }
 
 void Program::flagForDeletion()
 {