Bug 1236786 - [WebGL2] pass getVertexAttrib in gl-object-get-calls.html, r?jgilbert
--- 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;