Commit a6d110e2 by Geoff Lang

Attempt shader compilation without unroll and flatten with error X4014.

BUG=angle:917 Change-Id: Ie5b9a673f4af7241576cbe73ac96a7fb518af798 Reviewed-on: https://chromium-review.googlesource.com/252986Reviewed-by: 's avatarNicolas Capens <capn@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 9ddd5150
......@@ -211,7 +211,11 @@ gl::Error HLSLCompiler::compileToBinary(gl::InfoLog &infoLog, const std::string
TRACE("\n%s", hlsl.c_str());
TRACE("\n%s", message.c_str());
if (message.find("error X3531:") != std::string::npos) // "can't unroll loops marked with loop attribute"
if (message.find("error X3531:") != std::string::npos || // "can't unroll loops marked with loop attribute"
message.find("error X4014:") != std::string::npos) // "cannot have gradient operations inside loops with divergent flow control",
// even though it is counter-intuitive to disable unrolling for this error,
// some very long shaders have trouble deciding which loops to unroll and
// turning off forced unrolls allows them to compile properly.
{
macros = NULL; // Disable [loop] and [flatten]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment