Add assignments to Uniform as an unsafe thing when checking to run with mask all off

This commit is contained in:
James Brodman
2015-03-02 10:55:12 -08:00
parent 56c78e55d5
commit ab5bf7e48d

14
ast.cpp
View File

@@ -477,6 +477,20 @@ lCheckAllOffSafety(ASTNode *node, void *data) {
return false;
}
/*
Don't allow turning if/else to straight-line-code if we
assign to a uniform.
*/
AssignExpr *ae;
if ((ae = dynamic_cast<AssignExpr *>(node)) != NULL) {
if (ae->GetType()) {
if (ae->GetType()->IsUniformType()) {
*okPtr = false;
return false;
}
}
}
return true;
}