Bug 1303443 - Change option parameters for angle update. r=jgilbert, a=gchang
--- a/dom/canvas/WebGLShaderValidator.cpp
+++ b/dom/canvas/WebGLShaderValidator.cpp
@@ -29,17 +29,16 @@ IdentifierHashFunc(const char* name, siz
}
static int
ChooseValidatorCompileOptions(const ShBuiltInResources& resources,
const mozilla::gl::GLContext* gl)
{
int options = SH_VARIABLES |
SH_ENFORCE_PACKING_RESTRICTIONS |
- SH_INIT_VARYINGS_WITHOUT_STATIC_USE |
SH_OBJECT_CODE |
SH_LIMIT_CALL_STACK_DEPTH |
SH_INIT_GL_POSITION;
if (resources.MaxExpressionComplexity > 0) {
options |= SH_LIMIT_EXPRESSION_COMPLEXITY;
}
@@ -49,48 +48,39 @@ ChooseValidatorCompileOptions(const ShBu
// Just do it universally.
options |= SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX;
if (gfxPrefs::WebGLAllANGLEOptions()) {
return options |
SH_VALIDATE_LOOP_INDEXING |
SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX |
SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX |
- SH_EMULATE_BUILT_IN_FUNCTIONS |
SH_CLAMP_INDIRECT_ARRAY_BOUNDS |
SH_UNFOLD_SHORT_CIRCUIT |
SH_SCALARIZE_VEC_AND_MAT_CONSTRUCTOR_ARGS |
+ SH_INIT_OUTPUT_VARIABLES |
SH_REGENERATE_STRUCT_NAMES;
}
#ifndef XP_MACOSX
// We want to do this everywhere, but 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
options |= SH_CLAMP_INDIRECT_ARRAY_BOUNDS;
#endif
#ifdef XP_MACOSX
if (gl->WorkAroundDriverBugs()) {
// Work around https://bugs.webkit.org/show_bug.cgi?id=124684,
// https://chromium.googlesource.com/angle/angle/+/5e70cf9d0b1bb
options |= SH_UNFOLD_SHORT_CIRCUIT;
- // Work around bug 665578 and bug 769810
- if (gl->Vendor() == gl::GLVendor::ATI) {
- options |= SH_EMULATE_BUILT_IN_FUNCTIONS;
- }
-
- // Work around bug 735560
- if (gl->Vendor() == gl::GLVendor::Intel) {
- options |= SH_EMULATE_BUILT_IN_FUNCTIONS;
- }
-
// Work around that Mac drivers handle struct scopes incorrectly.
options |= SH_REGENERATE_STRUCT_NAMES;
+ options |= SH_INIT_OUTPUT_VARIABLES;
}
#endif
return options;
}
} // namespace webgl