Fail gracefully when encountering 'in fragmentProcessor' in raster backend
SkSLSlide was triggering this assert - now it prints an error every frame, but doesn't crash. Bug skia:9941 Change-Id: I4c02a89c8d824acc71ab595af99e1df2f5fc980d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272639 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Tyler Denniston <tdenniston@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: Brian Osman <brianosman@google.com>
This commit is contained in:
parent
fab619867b
commit
a95f10c162
@ -83,11 +83,12 @@ ByteCodeGenerator::Location ByteCodeGenerator::getLocation(const Variable& var)
|
|||||||
}
|
}
|
||||||
case Variable::kGlobal_Storage: {
|
case Variable::kGlobal_Storage: {
|
||||||
if (is_in(var)) {
|
if (is_in(var)) {
|
||||||
// If you trip this assert, it means the program is using raw 'in' variables. You
|
// If you see this error, it means the program is using raw 'in' variables. You
|
||||||
// should either specialize the program (Compiler::specialize) to bake in the final
|
// should either specialize the program (Compiler::specialize) to bake in the final
|
||||||
// values of the 'in' variables, or not use 'in' variables (maybe you meant to use
|
// values of the 'in' variables, or not use 'in' variables (maybe you meant to use
|
||||||
// 'uniform' instead?).
|
// 'uniform' instead?).
|
||||||
SkASSERT(false);
|
fErrors.error(var.fOffset,
|
||||||
|
"'in' variable is not specialized or has unsupported type");
|
||||||
return ByteCode::Pointer{0};
|
return ByteCode::Pointer{0};
|
||||||
}
|
}
|
||||||
bool isUniform = is_uniform(var);
|
bool isUniform = is_uniform(var);
|
||||||
|
Loading…
Reference in New Issue
Block a user