Revert "Disable whole-program inliner."
This reverts commit eaed918a1d
.
Reason for revert: fix for skia:10722 at http://review.skia.org/316977
Original change's description:
> Disable whole-program inliner.
>
> This can be re-enabled once the Metal bug with fp_sample_chaining is
> diagnosed and fixed.
>
> A pure rollback led to a merge conflict; just commenting out the line
> that invokes the inliner serves the same purpose.
>
> Change-Id: I4df556ea8cd44349cbca2ea0ec9995dfffeb8aec
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316937
> Commit-Queue: John Stiles <johnstiles@google.com>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Reviewed-by: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,johnstiles@google.com
Change-Id: If490609a9f5f0b0e87baf57638a3da865e173b03
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/316996
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This commit is contained in:
parent
c75abb8432
commit
e36079ea09
@ -1688,8 +1688,7 @@ bool Compiler::optimize(Program& program) {
|
||||
}
|
||||
|
||||
// Perform inline-candidate analysis and inline any functions deemed suitable.
|
||||
// TODO(johnstiles): Re-enable once Metal bug is fixed.
|
||||
// madeChanges |= fInliner.analyze(program);
|
||||
madeChanges |= fInliner.analyze(program);
|
||||
|
||||
// Remove dead functions. We wait until after analysis so that we still report errors,
|
||||
// even in unused code.
|
||||
|
@ -242,47 +242,47 @@ DEF_TEST(SkSLFunctionInlineWithNestedCall, r) {
|
||||
"}",
|
||||
R"__GLSL__(#version 400
|
||||
out vec4 sk_FragColor;
|
||||
void foo(out float x) {
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
++x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
--x;
|
||||
x = 42.0;
|
||||
}
|
||||
void main() {
|
||||
float _2_y = 0.0;
|
||||
{
|
||||
foo(_2_y);
|
||||
{
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
++_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
--_2_y;
|
||||
_2_y = 42.0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1136,13 +1136,13 @@ DEF_TEST(SkSLFunctionMultipleInlinesOnOneLine, r) {
|
||||
*SkSL::ShaderCapsFactory::Default(),
|
||||
R"__SkSL__(
|
||||
uniform half val;
|
||||
inline half BigX(half x) {
|
||||
half BigX(half x) {
|
||||
++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x;
|
||||
--x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x;
|
||||
x = 123;
|
||||
return x;
|
||||
}
|
||||
inline half BigY(half x) {
|
||||
half BigY(half x) {
|
||||
++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x; ++x;
|
||||
--x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x; --x;
|
||||
x = 456;
|
||||
@ -1194,7 +1194,6 @@ void main() {
|
||||
--_1_x;
|
||||
_1_x = 456.0;
|
||||
}
|
||||
|
||||
float _3_x = 456.0;
|
||||
{
|
||||
++_3_x;
|
||||
@ -1233,9 +1232,9 @@ void main() {
|
||||
--_3_x;
|
||||
_3_x = 123.0;
|
||||
}
|
||||
|
||||
sk_FragColor = vec4(123.0);
|
||||
|
||||
|
||||
}
|
||||
)__GLSL__");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user