This can eliminate const variables which have been completely folded
away, unnecessary synthetic variables created during codegen/inlining,
or code that simply didn't need to exist at all.
Change-Id: I37a65e455e6527a6a6c2f4dde918f48d84dc2638
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383496
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
A global variable should be considered "dead" if it's never written and
never read. The previous code checked if it was never written OR never
read, which is not the same.
This would generate GLSL/Metal that didn't compile. In SPIR-V, it would
SkASSERT, then crash, during codegen. The fuzzer was able to detect the
SPIR-V issue, but it was wrong in all three cases.
Change-Id: Id59a2499eb5baa3839b93826bfbc24191bfd490b
Bug: oss-fuzz:32005
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385280
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Add ClearCache() {} to the non-caching case.
This is a reland of cfdae5a56c
Original change's description:
> remove the OpMemoryPool
>
> Change-Id: I987384f8009445ba8308e85b75daf4880a8d36be
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383957
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
Change-Id: I03f80ba61f5643c40f812a9687b12a5d2aa663b1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385276
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit 30980650f7.
Reason for revert: iphone6 on ios12 fails to find vertexMain
Original change's description:
> Merge MSL vertex and fragment shaders into one string before compiling.
>
> Invoking the MSL compiler seems to have a significant startup cost.
> So rather than running it twice -- one each for the vertex and fragment
> shaders -- this CL merges them into a single string using namespaces,
> thus allowing a single compiler invocation.
>
>
> Bug: skia:11389, skia:11392
> Change-Id: I49facf995cc7f7529e61dc9d2af194a00ed1ccb6
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384700
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=jvanverth@google.com,brianosman@google.com,johnstiles@google.com
Change-Id: Ifa96e7a370264f878fb0413c3acbb7c505c47905
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11389
Bug: skia:11392
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385238
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
This reverts commit e7a8f85e4f.
Reason for revert: must revert dependent CL
Original change's description:
> Only include header once in combined MSL shader.
>
> Bug: skia:11389
> Change-Id: I3e24dcaa2cfeddc7efd7985f9f42a59bfc8175f2
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385137
> Reviewed-by: John Stiles <johnstiles@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=jvanverth@google.com,johnstiles@google.com
Change-Id: I7a886b6c57a666e54e65365e41dcb57bd9ab4ba6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:11389
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385237
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
SkTDynamicHash is semi-deprecated and this simplifies life a little bit.
Bug: skia:10877
Change-Id: Ie64f476fcab0a53d8cb8044fe4c68571bc0d2a66
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384857
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Our benchmarks had drifted away from actual codegen in several ways, and
were no longer representative of actual output. In particular, every
function in the existing benchmarks used a scratch `_output` variable
which would make it ineligible for return-statement-only inlining.
Updated the tests to match modern codegen. `small` and `large` use the
same sources as before. The code from `medium` is older and had diverged
quite far from today's output; I could not find a representative code
snippet at all. It has been replaced with SkSL of roughly similar
complexity.
Change-Id: Iadd32cbb6725554355ddfe384ce538f3dc49aca3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385160
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
'in' variables without locations aren't allowed. Use uniforms instead.
Bug: skia:11738
Change-Id: Ic066106deb7409cff154b4be7cfb3e03a7025c7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385000
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
This reverts commit 92748af1a5.
Reason for revert: SkSLCommaSideEffects_GPU crashing on Android
Original change's description:
> Inline functions of the form 'return (expr)' only.
>
> This drastically reduces the number of functions which we allow to be
> inlined. If this change does not hurt our performance, it will allow us
> to trivially remove hundreds of LOC. All current data leads us to
> believe that it may affect the Mali 400 but is highly unlikely to change
> results on any other device in the tree.
>
> More info: http://go/optimization-in-sksl-inliner
>
> Change-Id: Ia6b706742ce5407453e0e697b6c1f9201084c0e8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384858
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I6a670dacaa58fe3386ff50375ac6d1cac4fd7f2c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385161
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Bug: skia:11389
Change-Id: I3e24dcaa2cfeddc7efd7985f9f42a59bfc8175f2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385137
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
GM initially does not draw correctly because of large sigma drop outs.
Make SkGpuBlurUtils::GaussianBlur use the correct translation when both
sigmas are (effectively) 0.
Bug: skia:11735
Change-Id: I674c63cc57b56995a7ade4c098bb997bd5baee8a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383703
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
This reverts commit cfdae5a56c.
Reason for revert: See if this is blocking the G3 roll
Original change's description:
> remove the OpMemoryPool
>
> Change-Id: I987384f8009445ba8308e85b75daf4880a8d36be
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383957
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=bsalomon@google.com,herb@google.com,michaelludwig@google.com
Change-Id: I31879e272b91f8d476c14e437cb7e20b0b34ca74
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385159
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This reverts commit 9e476b798f.
Reason for revert: Angry Vulkan bots
Original change's description:
> Refactored SPIR-V RelaxedPrecision handling
>
> The RelaxedPrecision decoration is now handled by nextId(), to make it
> easier to see all spots where a RelaxedPrecision decoration might be
> necessary. The goal of this initial refactor is not to actually fix the
> issues with RelaxedPrecision decorations, but rather to lay the
> groundwork for doing so in followup CLs.
>
> The initial intent of this change was to not affect the SPIR-V at all,
> saving modifications for followups, but there ended up being three kinds
> of changes to the output:
>
> 1. Doing things at nextId() time rather than later means some
> decorations move to an earlier spot in the output. This results in
> diffs, but should not cause any behavioral changes.
> 2. We were incorrectly tagging bools as RelaxedPrecision in some
> situations. By funneling things through fewer code paths, the refactor
> would have caused this to happen in even more situations, and the code
> responsible for the bug was being rewritten in this CL anyway, so it
> seemed worth just fixing the issue as part of this change.
> 3. Funneling things through fewer code paths ended up adding
> (correct) RelaxedPrecision modifiers to binary operations that had
> previously been missing them. It seemed better to just let it happen
> than to try to maintain bug-for-bug compatibility with the previous
> approach.
>
> Change-Id: Ia9654d6b5754e2c797e02226660cb618c9189b36
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384318
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I9ada728e5fd5798bc1179640560c2e6045b7efd1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/385158
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
The RelaxedPrecision decoration is now handled by nextId(), to make it
easier to see all spots where a RelaxedPrecision decoration might be
necessary. The goal of this initial refactor is not to actually fix the
issues with RelaxedPrecision decorations, but rather to lay the
groundwork for doing so in followup CLs.
The initial intent of this change was to not affect the SPIR-V at all,
saving modifications for followups, but there ended up being three kinds
of changes to the output:
1. Doing things at nextId() time rather than later means some
decorations move to an earlier spot in the output. This results in
diffs, but should not cause any behavioral changes.
2. We were incorrectly tagging bools as RelaxedPrecision in some
situations. By funneling things through fewer code paths, the refactor
would have caused this to happen in even more situations, and the code
responsible for the bug was being rewritten in this CL anyway, so it
seemed worth just fixing the issue as part of this change.
3. Funneling things through fewer code paths ended up adding
(correct) RelaxedPrecision modifiers to binary operations that had
previously been missing them. It seemed better to just let it happen
than to try to maintain bug-for-bug compatibility with the previous
approach.
Change-Id: Ia9654d6b5754e2c797e02226660cb618c9189b36
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384318
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This drastically reduces the number of functions which we allow to be
inlined. If this change does not hurt our performance, it will allow us
to trivially remove hundreds of LOC. All current data leads us to
believe that it may affect the Mali 400 but is highly unlikely to change
results on any other device in the tree.
More info: http://go/optimization-in-sksl-inliner
Change-Id: Ia6b706742ce5407453e0e697b6c1f9201084c0e8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384858
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This test fails on SPIR-V when the inliner is turned off:
error: SPIR-V validation error: Pointer operand 250[%250] must be a memory object declaration
%252 = OpFunctionCall %void %out_half %250
Change-Id: Ibfa9cef371af2eea766a4218ec8a581289ee100e
Bug: skia:11748
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384999
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This is a reland of c0c3231bde
Original change's description:
> On NVIDIA + ANGLE, test 4x MSAA, not 8x
>
> By all accounts, this should produce much more deterministic output,
> letting us remove quite a few ignores.
>
> Bug: skia:6813 skia:6545
> Change-Id: I7bc2c8e05c2f6e8110ea550882d5f0a45548008b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384856
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
Bug: skia:6813 skia:6545
Change-Id: I2bbff8c8807940024eeefbca823656ab105acdd1
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384998
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
The surface on the proxy should be the source of truth here.
Bug: skia:10877
Change-Id: Id2126a259202be4c426f2cbf8f025ef69dd50551
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384702
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
Change-Id: I987384f8009445ba8308e85b75daf4880a8d36be
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/383957
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This reverts commit c0c3231bde.
Reason for revert: Need new configs in dm
Original change's description:
> On NVIDIA + ANGLE, test 4x MSAA, not 8x
>
> By all accounts, this should produce much more deterministic output,
> letting us remove quite a few ignores.
>
> Bug: skia:6813 skia:6545
> Change-Id: I7bc2c8e05c2f6e8110ea550882d5f0a45548008b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384856
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
TBR=bsalomon@google.com,kjlubick@google.com,brianosman@google.com
Change-Id: Ia754601787b986778c83f919498eacabb696632f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:6813 skia:6545
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384997
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
By all accounts, this should produce much more deterministic output,
letting us remove quite a few ignores.
Bug: skia:6813 skia:6545
Change-Id: I7bc2c8e05c2f6e8110ea550882d5f0a45548008b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384856
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
By avoiding the introduction of a temporary variable, they can remain
candidates for inlining even after we pare back the inliner logic.
More info: http://go/optimization-in-sksl-inliner
Change-Id: If58c757b8754036b0b0530379b639c09953744ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384859
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Prevents us from accepting code that can't be correctly transformed to
GLSL, like:
uniform float x;
float y = x;
(Previously, writing code like that in a runtime effect would
effectively produce the exact same code all the way through to GLSL, and
the driver would fail to compile it).
Bug: skia:11336
Change-Id: Iaa797587c4a4a7289ed59ce2736cf0bf0fc5bca3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384698
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Invoking the MSL compiler seems to have a significant startup cost.
So rather than running it twice -- one each for the vertex and fragment
shaders -- this CL merges them into a single string using namespaces,
thus allowing a single compiler invocation.
Bug: skia:11389, skia:11392
Change-Id: I49facf995cc7f7529e61dc9d2af194a00ed1ccb6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384700
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
This can be used in followup CLs to test various forms of inliner
simplification. (More info: http://go/optimization-in-sksl-inliner )
Change-Id: Icd12a1ae1481c9aeacf3f11e85872fecfa972ec3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384836
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Now that we assign all surfaces upfront, intervals are not reused.
In the future, with ops task clustering, it could
theoretically be useful for multi-pass allocation (i.e. the
clustered version was rejected for memory budget,) but
that scenario is so rare that this machinery should just go away.
Bug: skia:10877
Change-Id: I261987d7ba68a49bc1d9c01eb1df3bfcb4747c9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384701
Auto-Submit: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
A side effect of this change is that I've tried to pass GrVkAttachments
around GrVkGpu instead of GrVkTextures where I could to start the
transition within the backend code.
Bug: skia:10727
Change-Id: Ibc9553cdbd7f6ae845c56aad3f25f58e4c478e46
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/379577
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
The referenced bug is closed, and the compiler does correctly emit an
error here.
Change-Id: I824f7819a1e077163f528ac503f3743aab5e58a1
Bug: skia:11322
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384697
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Also dump them in key-value pairs so we can see them remotely.
Bug: skia:10877
Change-Id: I09654444336ea2db92db375d4baae67ecce2dd79
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384177
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
225e1952d4..cd881848f3
2021-03-13 ianelliott@google.com Actually skip a flaky/timeout test
2021-03-12 timvp@google.com Create GN arg to enable non-conformant features
2021-03-12 ianelliott@google.com Suppress flaky test on win-swangle
2021-03-12 lunpujun@google.com Micro-optimization for loading 3-channel images.
2021-03-12 ianelliott@google.com Suppress flaky EGL resize failure on Linux
2021-03-12 jmadill@chromium.org Vulkan: Add test for UBO descriptor allocations.
2021-03-12 ynovikov@chromium.org Remove old Mac bot from CQ
2021-03-12 natsu@google.com Vulkan: Use optimal tiling for AHB
2021-03-12 j.vigil@samsung.com EGL: Add attribute check in ValidateQueryContext
2021-03-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll SwiftShader from a2fe8e1b2111 to 3c4fd15fb075 (2 revisions)
2021-03-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll vulkan-deps from a4e10bfde719 to ea8c29e1ee20 (5 revisions)
2021-03-12 angle-autoroll@skia-public.iam.gserviceaccount.com Roll Chromium from 9e42f9e4abc6 to e90a7a4d378a (458 revisions)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/angle-skia-autoroll
Please CC michaelludwig@google.com on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md
Cq-Include-Trybots: skia/skia.primary:Build-Debian10-Clang-x86_64-Release-ANGLE;skia/skia.primary:Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUC8i5BEK-GPU-IntelIris655-x86_64-Debug-All-ANGLE;skia/skia.primary:Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE
Tbr: michaelludwig@google.com
Test: Test: angle_end2end_test --gtest_filter=EGLCreateContextAttribsTestTest: Test: passed the CQ dry run.
Change-Id: I00cab3898b89244e2bd37231e4b89ed2c5cdf229
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384541
Reviewed-by: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: skia-autoroll <skia-autoroll@skia-public.iam.gserviceaccount.com>
* The output.property looks like this: {"canvaskit.wasm": 7394679}
(from https://ci.chromium.org/raw/build/logs.chromium.org/skia/5236eb95c4490b11/+/annotations)
* Refactored scripts to avoid hardcoding the magic_seperator and total_size_bytes.
* Added this capability to all 4 infra/bots/buildstats/* scripts.
* Added missing tests for analyze_web_file and analyze_cpp_lib.
The output.property will be eventually consumed by a Gerrit plugin to display change in bytes in the UI.
Note: buildstats_cpp.py is not currently used by any bot. But if it is in the future it will work.
No-Tree-Checks: true
Bug: skia:11744
Change-Id: I593bae8ff73c35089cc2785a1cc4bc5b630007c4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/377840
Commit-Queue: Ravi Mistry <rmistry@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Bug: skia:11716
Change-Id: Ic09071544b5b5216b01fbc9b478b6269dd96202f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382280
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Block::Make always makes a real Block object. This is important because
many callers rely on Blocks specifically; e.g. a function body must be a
scoped Block, nothing else will do.
However, unscoped Blocks are just a collection of Statements and usually
have more flexibility. So, Block::MakeUnscoped is a factory function
that will return the Statement as-is for a single-statement unscoped
Block. For an entirely empty Block, MakeUnscoped returns Nop.
Change-Id: Ied65d505bde4ea7f6157a039944018546e4b7333
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384180
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
This improved codegen when it was first introduced. Since that time, our
inliner has become much smarter and no longer needs these hints.
Change-Id: I7725da1eb9814e656849881ad2ca2b1bc038e4a0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384320
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This reverts commit 3f35ac10b4.
Reason for revert: concluding experiment
Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This will allow us to measure the impact (positive or negative) of
> inlining functions before submitting a shader to the driver.
>
> Change-Id: Icbd64096445a353187b30feea68573d89ca18664
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384317
> Reviewed-by: Brian Osman <brianosman@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=brianosman@google.com,johnstiles@google.com
Change-Id: Ia7c34e3e2bb4f777a4bd18a5646e494eeb3c93ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384456
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
This only affects fragmentProcessors (children) - and the backend SkSL
we're emitting should not contain those. We've just been silently
ignoring those declarations when converting to GLSL, MSL, etc.
Change-Id: I241f2f4fe4614b49ebccc9c2976fd408e94656d0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/384316
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>