Remove unused setting 'fPermitInvalidStaticTests.'
This was only used for fragment processor CPP/H file generation, which no longer exists. Change-Id: I650444c4b9ae3197003ed6c5ff8e291e33965923 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/514216 Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
3b3d0a5129
commit
64629c7a5e
@ -61,10 +61,6 @@ struct ProgramSettings {
|
||||
bool fValidateSPIRV = true;
|
||||
// If true, any synthetic uniforms must use push constant syntax
|
||||
bool fUsePushConstants = false;
|
||||
// Permits static if/switch statements to be used with non-constant tests. This is used when
|
||||
// producing H and CPP code; the static tests don't have to have constant values *yet*, but
|
||||
// the generated code will contain a static test which then does have to be a constant.
|
||||
bool fPermitInvalidStaticTests = false;
|
||||
// If true, configurations which demand strict ES2 conformance (runtime effects, generic
|
||||
// programs, and SkVM rendering) will fail during compilation if ES2 restrictions are violated.
|
||||
bool fEnforceES2Restrictions = true;
|
||||
|
@ -80,23 +80,21 @@ public:
|
||||
}
|
||||
|
||||
bool visitStatement(const Statement& stmt) override {
|
||||
if (!fContext.fConfig->fSettings.fPermitInvalidStaticTests) {
|
||||
switch (stmt.kind()) {
|
||||
case Statement::Kind::kIf:
|
||||
if (stmt.as<IfStatement>().isStatic()) {
|
||||
fContext.fErrors->error(stmt.fLine, "static if has non-static test");
|
||||
}
|
||||
break;
|
||||
switch (stmt.kind()) {
|
||||
case Statement::Kind::kIf:
|
||||
if (stmt.as<IfStatement>().isStatic()) {
|
||||
fContext.fErrors->error(stmt.fLine, "static if has non-static test");
|
||||
}
|
||||
break;
|
||||
|
||||
case Statement::Kind::kSwitch:
|
||||
if (stmt.as<SwitchStatement>().isStatic()) {
|
||||
fContext.fErrors->error(stmt.fLine, "static switch has non-static test");
|
||||
}
|
||||
break;
|
||||
case Statement::Kind::kSwitch:
|
||||
if (stmt.as<SwitchStatement>().isStatic()) {
|
||||
fContext.fErrors->error(stmt.fLine, "static switch has non-static test");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return INHERITED::visitStatement(stmt);
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ std::unique_ptr<Statement> SwitchStatement::Make(const Context& context,
|
||||
}
|
||||
|
||||
// Report an error if this was a static switch and BlockForCase failed us.
|
||||
if (isStatic && !context.fConfig->fSettings.fPermitInvalidStaticTests) {
|
||||
if (isStatic) {
|
||||
context.fErrors->error(value->fLine,
|
||||
"static switch contains non-static conditional exit");
|
||||
return nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user