Bug 1207288. Enable the ANGLE shader validator for WebGL 2. r=jgilbert
☠☠ backed out by 01d6f8dc4daa ☠ ☠
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 13 Oct 2015 14:40:26 -0400
changeset 267475 d34a1af95066e1d0bd67ca95581fbf5def74bbee
parent 267474 8141f1fc49d2b438483ccd426b9fd1eb9051db45
child 267476 8decc8f8fcb16bfb5e6aa11a4a3ada547f5c81b2
push id66498
push userjmuizelaar@mozilla.com
push dateTue, 13 Oct 2015 23:52:34 +0000
treeherdermozilla-inbound@d34a1af95066 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1207288
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1207288. Enable the ANGLE shader validator for WebGL 2. r=jgilbert ANGLE's shader parser has much better support for ES3 now. Let's no longer disable it by default.
dom/canvas/WebGL2Context.cpp
dom/canvas/WebGLShaderValidator.cpp
--- a/dom/canvas/WebGL2Context.cpp
+++ b/dom/canvas/WebGL2Context.cpp
@@ -175,14 +175,12 @@ WebGLContext::InitWebGL2()
     }
 
     mBoundTransformFeedbackBuffers.SetLength(mGLMaxTransformFeedbackSeparateAttribs);
     mBoundUniformBuffers.SetLength(mGLMaxUniformBufferBindings);
 
     mDefaultTransformFeedback = new WebGLTransformFeedback(this, 0);
     mBoundTransformFeedback = mDefaultTransformFeedback;
 
-    mBypassShaderValidation = true;
-
     return true;
 }
 
 } // namespace mozilla
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -94,17 +94,17 @@ ChooseValidatorCompileOptions(const ShBu
 ////////////////////////////////////////
 
 webgl::ShaderValidator*
 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;
 
     ShBuiltInResources resources;
     memset(&resources, 0, sizeof(resources));
     ShInitBuiltInResources(&resources);
 
     resources.HashFunction = webgl::IdentifierHashFunc;