WebGL2: Implement some miscellaneous parameters (
bug 1081419, r=jgilbert).
--- a/dom/canvas/WebGLContextState.cpp
+++ b/dom/canvas/WebGLContextState.cpp
@@ -172,16 +172,28 @@ WebGLContext::GetParameter(JSContext* cx
if (mBoundVertexArray == mDefaultVertexArray){
return WebGLObjectAsJSValue(cx, (WebGLVertexArray *) nullptr, rv);
}
return WebGLObjectAsJSValue(cx, mBoundVertexArray.get(), rv);
}
}
+ if (IsWebGL2()) {
+ switch (pname) {
+ case LOCAL_GL_MAX_SAMPLES:
+ case LOCAL_GL_MAX_UNIFORM_BLOCK_SIZE:
+ case LOCAL_GL_MAX_VERTEX_UNIFORM_COMPONENTS: {
+ GLint val;
+ gl->fGetIntegerv(pname, &val);
+ return JS::NumberValue(uint32_t(val));
+ }
+ }
+ }
+
switch (pname) {
//
// String params
//
case LOCAL_GL_VENDOR:
return StringValue(cx, "Mozilla", rv);
case LOCAL_GL_RENDERER:
return StringValue(cx, "Mozilla", rv);