Bug 1301803 - Add gfxCriticalNote for glGetActiveAttrib. r=jgilbert
authorEthan Lin <ethlin@mozilla.com>
Tue, 13 Sep 2016 19:13:00 +0200
changeset 314038 2b01b2c0df5d623025ea52fb8c9f28212442105e
parent 314037 850159471c686be76390a2ee8dae12afbac7cc32
child 314039 ec434174ad58edba8a05491a35fdc3819a2839bb
push id30705
push userkwierso@gmail.com
push dateThu, 15 Sep 2016 23:29:32 +0000
treeherdermozilla-central@7ad3c6ebc11a [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);