Bug 1301803 - Add gfxCriticalNote for glGetActiveAttrib. r=jgilbert
authorEthan Lin <ethlin@mozilla.com>
Tue, 13 Sep 2016 19:13:00 +0200
changeset 355323 2b01b2c0df5d623025ea52fb8c9f28212442105e
parent 355322 850159471c686be76390a2ee8dae12afbac7cc32
child 355324 ec434174ad58edba8a05491a35fdc3819a2839bb
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1301803
milestone51.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 1301803 - Add gfxCriticalNote for glGetActiveAttrib. r=jgilbert
dom/canvas/WebGLProgram.cpp
--- a/dom/canvas/WebGLProgram.cpp
+++ b/dom/canvas/WebGLProgram.cpp
@@ -170,16 +170,20 @@ QueryProgramInfo(WebGLProgram* prog, gl:
         nsAutoCString mappedName;
         mappedName.SetLength(maxAttribLenWithNull - 1);
 
         GLsizei lengthWithoutNull = 0;
         GLint elemCount = 0; // `size`
         GLenum elemType = 0; // `type`
         gl->fGetActiveAttrib(prog->mGLName, i, mappedName.Length()+1, &lengthWithoutNull,
                              &elemCount, &elemType, mappedName.BeginWriting());
+        GLenum error = gl->fGetError();
+        if (error != LOCAL_GL_NO_ERROR) {
+            gfxCriticalNote << "Failed to do glGetActiveAttrib: " << error;
+        }
 
         mappedName.SetLength(lengthWithoutNull);
 
         // Attribs can't be arrays, so we can skip some of the mess we have in the Uniform
         // path.
         nsDependentCString userName;
         if (!prog->FindAttribUserNameByMappedName(mappedName, &userName))
             userName.Rebind(mappedName, 0);