Bug 1243663 - Max uniform and attribute location lengths in WebGL2 should be 1024. r=jgilbert
authorMorris Tseng <mtseng@mozilla.com>
Fri, 29 Jan 2016 14:44:08 +0800
changeset 282281 67fac5ca01516ec090c77303f33bdd9b02b62f96
parent 282273 ac21d6f878e6fdd69ec4140d1b63a94601524abe
child 282282 0e60438e6b9293b48cceb8be1735e31869de9527
push id29955
push userkwierso@gmail.com
push dateFri, 29 Jan 2016 21:12:10 +0000
treeherdermozilla-central@08eddf3af531 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1243663
milestone47.0a1
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 1243663 - Max uniform and attribute location lengths in WebGL2 should be 1024. r=jgilbert
dom/canvas/WebGLValidateStrings.cpp
--- a/dom/canvas/WebGLValidateStrings.cpp
+++ b/dom/canvas/WebGLValidateStrings.cpp
@@ -136,17 +136,17 @@ ValidateGLSLString(const nsAString& stri
 }
 
 bool
 ValidateGLSLVariableName(const nsAString& name, WebGLContext* webgl, const char* funcName)
 {
     if (name.IsEmpty())
         return false;
 
-    const uint32_t maxSize = 256;
+    const uint32_t maxSize = webgl->IsWebGL2() ? 1024 : 256;
     if (name.Length() > maxSize) {
         webgl->ErrorInvalidValue("%s: Identifier is %d characters long, exceeds the"
                                  " maximum allowed length of %d characters.",
                                  funcName, name.Length(), maxSize);
         return false;
     }
 
     if (!ValidateGLSLString(name, webgl, funcName))