Bug 1368284 - Add SH_ADD_AND_TRUE_TO_LOOP_CONDITION shader compile work around for Intel drivers on MacOSX; r=jgilbert

MozReview-Commit-ID: JMHuZirH4L5

--HG--
extra : rebase_source : b015176a20feba7a9032255323c0f2e4960a85d2
This commit is contained in:
Daosheng Mu 2017-06-26 08:39:30 -07:00
parent 260c76375c
commit 51833534e1

View File

@ -53,6 +53,11 @@ ChooseValidatorCompileOptions(const ShBuiltInResources& resources,
// Work around that Mac drivers handle struct scopes incorrectly.
options |= SH_REGENERATE_STRUCT_NAMES;
options |= SH_INIT_OUTPUT_VARIABLES;
// Work around that Intel drivers on Mac OSX handle for-loop incorrectly.
if (gl->Vendor() == gl::GLVendor::Intel) {
options |= SH_ADD_AND_TRUE_TO_LOOP_CONDITION;
}
#endif
if (!gl->IsANGLE() && gl->Vendor() == gl::GLVendor::Intel) {