Performance experiment: Disable SkSL inliner in nanobench/skpbench.

This is a reland of 045d7513d7

This will allow us to measure the impact (positive or negative) of
inlining functions before submitting a shader to the driver.
In previous trials, we encountered an issue with overloads of cross()
which prevented us from collecting data on some platforms.

Original change's description:
> Performance experiment: Disable SkSL inliner in nanobench/skpbench.
>
> This is a reland of 3f35ac10b4
>
> Time to run this experiment again.
>
> 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>
>
> Change-Id: I278a770d4129f4ad0bf867c33a01b49a88cea588
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/387256
> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
> Commit-Queue: John Stiles <johnstiles@google.com>

Change-Id: I49a1555bde93c339fda567fc85a85e937af95628
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/388396
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
This commit is contained in:
John Stiles 2021-03-23 21:40:20 -04:00 committed by Skia Commit-Bot
parent 30e05095b2
commit 3f5bee1a7a
2 changed files with 11 additions and 0 deletions

View File

@ -81,6 +81,10 @@ extern bool gSkVMJITViaDylib;
#include "src/gpu/gl/GrGLUtil.h"
#include "tools/gpu/GrContextFactory.h"
namespace SkSL {
extern bool gSkSLInliner;
}
using sk_gpu_test::ContextInfo;
using sk_gpu_test::GrContextFactory;
using sk_gpu_test::TestContext;
@ -1256,6 +1260,7 @@ int main(int argc, char** argv) {
gUseSkVMBlitter = FLAGS_skvm;
gSkVMAllowJIT = FLAGS_jit;
gSkVMJITViaDylib = FLAGS_dylib;
SkSL::gSkSLInliner = false; // Temporary experiment
int runs = 0;
BenchmarkStream benchStream;

View File

@ -88,6 +88,10 @@ static const char resultFormat[] =
static constexpr int kNumFlushesToPrimeCache = 3;
namespace SkSL {
extern bool gSkSLInliner;
}
struct Sample {
using duration = std::chrono::nanoseconds;
@ -497,6 +501,8 @@ int main(int argc, char** argv) {
exit(0); // This can be used to print the header and quit.
}
SkSL::gSkSLInliner = false; // Temporary experiment
// Parse the config.
const SkCommandLineConfigGpu* config = nullptr; // Initialize for spurious warning.
SkCommandLineConfigArray configs;