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>
This commit is contained in:
John Stiles 2021-03-12 14:43:48 -05:00 committed by Skia Commit-Bot
parent 7cee3efb6b
commit 045d7513d7
2 changed files with 11 additions and 0 deletions

View File

@ -80,6 +80,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;
@ -1241,6 +1245,7 @@ int main(int argc, char** argv) {
gSkForceRasterPipelineBlitter = FLAGS_forceRasterPipeline;
gUseSkVMBlitter = FLAGS_skvm;
gSkVMAllowJIT = gSkVMJITViaDylib = FLAGS_jit;
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;