Bug 1236786 - [WebGL2] pass getVertexAttrib in gl-object-get-calls.html, r=jgilbert
authorpeter chang <pchang@mozilla.com>
Fri, 22 Jan 2016 09:44:01 +0800
changeset 281154 1f7e085bf323474666ef7c2bcedfdae9d7d26b61
parent 281153 ff306df6c9d5b5c736b3ee361dc171a323020dd3
child 281155 df57dc8a8b5e8bf84de62399d9ccc53f556b4990
push id29930
push usercbook@mozilla.com
push dateFri, 22 Jan 2016 11:05:50 +0000
treeherdermozilla-central@7104d650a97d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1236786
milestone46.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 1236786 - [WebGL2] pass getVertexAttrib in gl-object-get-calls.html, r=jgilbert
dom/canvas/WebGLContextVertices.cpp
--- a/dom/canvas/WebGLContextVertices.cpp
+++ b/dom/canvas/WebGLContextVertices.cpp
@@ -352,16 +352,22 @@ WebGLContext::GetVertexAttrib(JSContext*
         return JS::Int32Value(mBoundVertexArray->mAttribs[index].size);
 
     case LOCAL_GL_VERTEX_ATTRIB_ARRAY_TYPE:
         if (!mBoundVertexArray->mAttribs[index].enabled)
             return JS::NumberValue(uint32_t(LOCAL_GL_FLOAT));
 
         return JS::NumberValue(uint32_t(mBoundVertexArray->mAttribs[index].type));
 
+    case LOCAL_GL_VERTEX_ATTRIB_ARRAY_INTEGER:
+        if (IsWebGL2())
+            return JS::BooleanValue(mBoundVertexArray->mAttribs[index].integer);
+
+        break;
+
     case LOCAL_GL_VERTEX_ATTRIB_ARRAY_DIVISOR:
         if (IsWebGL2() ||
             IsExtensionEnabled(WebGLExtensionID::ANGLE_instanced_arrays))
         {
             return JS::Int32Value(mBoundVertexArray->mAttribs[index].divisor);
         }
         break;