Bug 675625 - limit GLSL identifiers to 250 characters to work around a NVIDIA bug - r=jrmuizel
authorBenoit Jacob <bjacob@mozilla.com>
Tue, 02 Aug 2011 18:06:25 -0400
changeset 73692 7813728d68ff9c96278d6612c62268b9f0179671
parent 73691 f185f48d35dc966aff08536b6c599319731271a9
child 73693 d6301744afa92dd3efbbbea7ae2856a682c380a2
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersjrmuizel
bugs675625
milestone8.0a1
Bug 675625 - limit GLSL identifiers to 250 characters to work around a NVIDIA bug - r=jrmuizel
gfx/angle/README.mozilla
gfx/angle/angle-limit-identifiers-to-250-chars.patch
gfx/angle/src/compiler/preprocessor/scanner.h
--- a/gfx/angle/README.mozilla
+++ b/gfx/angle/README.mozilla
@@ -5,16 +5,17 @@ Current revision: r653
 == Applied local patches ==
 
 In this order:
   angle-nspr-misc.patch - don't bother with ANGLE_OS detection with NSPR
   angle-renaming.patch - rename debug.h to compilerdebug.h to avoid conflict in our makefiles
   angle-intrinsic-msvc2005.patch - work around a MSVC 2005 compile error
   angle-amap-arev-fix.patch - plain bug fix, this is ANGLE r699
   angle-r702.patch - this is ANGLE r702
+  angle-limit-identifiers-to-250-chars.patch - see bug 675625
 
 In addition to these patches, the Makefile.in files are ours, they're not present in upsteam ANGLE.
 
 == How to update this ANGLE copy ==
 
 1. Unapply patches
 2. Apply diff with new ANGLE version
 3. Reapply patches.
new file mode 100644
--- /dev/null
+++ b/gfx/angle/angle-limit-identifiers-to-250-chars.patch
@@ -0,0 +1,24 @@
+diff --git a/gfx/angle/src/compiler/preprocessor/scanner.h b/gfx/angle/src/compiler/preprocessor/scanner.h
+--- a/gfx/angle/src/compiler/preprocessor/scanner.h
++++ b/gfx/angle/src/compiler/preprocessor/scanner.h
+@@ -44,17 +44,19 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILI
+ //
+ // scanner.h
+ //
+ 
+ #if !defined(__SCANNER_H)
+ #define __SCANNER_H 1
+ 
+ // These lengths do not include the NULL terminator.
+-#define MAX_SYMBOL_NAME_LEN 256
++// see bug 675625: NVIDIA driver crash with lengths >= 253
++// this is only an interim fix, the real fix is name mapping, see ANGLE bug 144 / r619
++#define MAX_SYMBOL_NAME_LEN 250
+ #define MAX_STRING_LEN 511
+ 
+ #include "compiler/preprocessor/parser.h"
+ 
+ // Not really atom table stuff but needed first...
+ 
+ typedef struct SourceLoc_Rec {
+     unsigned short file, line;
--- a/gfx/angle/src/compiler/preprocessor/scanner.h
+++ b/gfx/angle/src/compiler/preprocessor/scanner.h
@@ -44,17 +44,19 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILI
 //
 // scanner.h
 //
 
 #if !defined(__SCANNER_H)
 #define __SCANNER_H 1
 
 // These lengths do not include the NULL terminator.
-#define MAX_SYMBOL_NAME_LEN 256
+// see bug 675625: NVIDIA driver crash with lengths >= 253
+// this is only an interim fix, the real fix is name mapping, see ANGLE bug 144 / r619
+#define MAX_SYMBOL_NAME_LEN 250
 #define MAX_STRING_LEN 511
 
 #include "compiler/preprocessor/parser.h"
 
 // Not really atom table stuff but needed first...
 
 typedef struct SourceLoc_Rec {
     unsigned short file, line;