Bug 1170855 - Part A: Don't error on MAX_ELEMENT_INDEX. r=jgilbert

MAX_ELEMENT_INDEX appears in GL 4.3 or via ES3_compatibility. Work
around on OSX 10.10 where max is GL 4.1.
This commit is contained in:
Dan Glastonbury 2015-06-09 10:37:28 +10:00
parent 3c78a389e6
commit 24cb63088a

View File

@ -86,6 +86,13 @@ WebGL2Context::GetParameter(JSContext* cx, GLenum pname, ErrorResult& rv)
return JS::NumberValue(0); // TODO
case LOCAL_GL_MAX_ELEMENT_INDEX:
// GL_MAX_ELEMENT_INDEX becomes available in GL 4.3 or via ES3
// compatibility
if (!gl->IsSupported(gl::GLFeature::ES3_compatibility))
return JS::NumberValue(0);
/*** fall through to fGetInteger64v ***/
case LOCAL_GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:
case LOCAL_GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:
case LOCAL_GL_MAX_UNIFORM_BLOCK_SIZE: {