Bug 1288638 - Unconditionally SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX. - r=mtseng

MozReview-Commit-ID: CPgJTTV8vAA
This commit is contained in:
Jeff Gilbert 2016-07-25 17:28:06 -07:00
Родитель 66ac1e0650
Коммит 4f4b4cb007
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -43,6 +43,12 @@ ChooseValidatorCompileOptions(const ShBuiltInResources& resources,
options |= SH_LIMIT_EXPRESSION_COMPLEXITY;
}
// Sampler arrays indexed with non-constant expressions are forbidden in
// GLSL 1.30 and later.
// ESSL 3 requires constant-integral-expressions for this as well.
// Just do it universally.
options |= SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX;
if (gfxPrefs::WebGLAllANGLEOptions()) {
return options |
SH_VALIDATE_LOOP_INDEXING |
@ -78,11 +84,6 @@ ChooseValidatorCompileOptions(const ShBuiltInResources& resources,
options |= SH_EMULATE_BUILT_IN_FUNCTIONS;
}
// Work around bug 636926
if (gl->Vendor() == gl::GLVendor::NVIDIA) {
options |= SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX;
}
// Work around that Mac drivers handle struct scopes incorrectly.
options |= SH_REGENERATE_STRUCT_NAMES;
}