diff --git a/content/canvas/src/WebGLContextGL.cpp b/content/canvas/src/WebGLContextGL.cpp index 52c33c1b96d3..709d015636ee 100644 --- a/content/canvas/src/WebGLContextGL.cpp +++ b/content/canvas/src/WebGLContextGL.cpp @@ -46,7 +46,7 @@ static WebGLenum InternalFormatForFormatAndType(WebGLenum format, WebGLenum type void WebGLContext::ActiveTexture(WebGLenum texture) { - if (!IsContextStable()) + if (!IsContextStable()) return; if (texture < LOCAL_GL_TEXTURE0 || @@ -4194,6 +4194,15 @@ WebGLContext::CompileShader(WebGLShader *shader) int compileOptions = SH_ATTRIBUTES_UNIFORMS | SH_ENFORCE_PACKING_RESTRICTIONS; + + // we want to do this everywhere, but: +#ifndef XP_WIN // to do this on Windows, we need ANGLE r1719, 1733, 1734. +#ifndef XP_MACOSX // to do this on Mac, we need to do it only on Mac OSX > 10.6 as this + // causes the shader compiler in 10.6 to crash + compileOptions |= SH_CLAMP_INDIRECT_ARRAY_BOUNDS; +#endif +#endif + if (useShaderSourceTranslation) { compileOptions |= SH_OBJECT_CODE | SH_MAP_LONG_VARIABLE_NAMES;