Merge pull request #981 from jbrodman/maskoffunif
Add assignments to Uniform as an unsafe thing when checking to run with ...
This commit is contained in:
14
ast.cpp
14
ast.cpp
@@ -477,6 +477,20 @@ lCheckAllOffSafety(ASTNode *node, void *data) {
|
|||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user