diff --git a/dom/canvas/WebGL2Context.cpp b/dom/canvas/WebGL2Context.cpp index 0a0b0edf34a5..346d7a096ed0 100644 --- a/dom/canvas/WebGL2Context.cpp +++ b/dom/canvas/WebGL2Context.cpp @@ -180,8 +180,6 @@ WebGLContext::InitWebGL2() mDefaultTransformFeedback = new WebGLTransformFeedback(this, 0); mBoundTransformFeedback = mDefaultTransformFeedback; - mBypassShaderValidation = true; - return true; } diff --git a/dom/canvas/WebGLShaderValidator.cpp b/dom/canvas/WebGLShaderValidator.cpp index 5553ad8f72ec..9933026ea1e8 100644 --- a/dom/canvas/WebGLShaderValidator.cpp +++ b/dom/canvas/WebGLShaderValidator.cpp @@ -99,7 +99,7 @@ WebGLContext::CreateShaderValidator(GLenum shaderType) const if (mBypassShaderValidation) return nullptr; - ShShaderSpec spec = SH_WEBGL_SPEC; + ShShaderSpec spec = IsWebGL2() ? SH_WEBGL2_SPEC : SH_WEBGL_SPEC; ShShaderOutput outputLanguage = gl->IsGLES() ? SH_ESSL_OUTPUT : SH_GLSL_OUTPUT; diff --git a/dom/canvas/test/webgl-mochitest/webgl-util.js b/dom/canvas/test/webgl-mochitest/webgl-util.js index 8206c6e2b771..16feab5f73e6 100644 --- a/dom/canvas/test/webgl-mochitest/webgl-util.js +++ b/dom/canvas/test/webgl-mochitest/webgl-util.js @@ -62,6 +62,7 @@ WebGLUtil = (function() { var prefArrArr = [ ['webgl.force-enabled', true], ['webgl.disable-angle', true], + ['webgl.bypass-shader-validation', true], ['webgl.enable-prototype-webgl2', true], ]; var prefEnv = {'set': prefArrArr};