Add visualbench option for nvpr stencil samples
Repurposes the --nvpr flag as an int that says how many stencil samples to use, or disables nvpr with a value of zero. BUG=skia: Review URL: https://codereview.chromium.org/1444543002
This commit is contained in:
parent
f844177496
commit
60795d99ff
@ -103,7 +103,7 @@ void VisualBench::setupContext() {
|
||||
fInterface.reset(GrGLCreateNativeInterface());
|
||||
|
||||
// TODO use the GLContext creation factories and also set this all up in configs
|
||||
if (!FLAGS_nvpr) {
|
||||
if (0 == FLAGS_nvpr) {
|
||||
fInterface.reset(GrGLInterfaceRemoveNVPR(fInterface));
|
||||
}
|
||||
SkASSERT(fInterface);
|
||||
|
@ -131,8 +131,8 @@ Benchmark* VisualBenchmarkStream::next() {
|
||||
// TODO move this all to --config
|
||||
if (bench && FLAGS_cpu) {
|
||||
bench = new CpuWrappedBenchmark(fSurfaceProps, bench);
|
||||
} else if (bench && FLAGS_nvpr) {
|
||||
bench = new NvprWrappedBenchmark(fSurfaceProps, bench, 4);
|
||||
} else if (bench && 0 != FLAGS_nvpr) {
|
||||
bench = new NvprWrappedBenchmark(fSurfaceProps, bench, FLAGS_nvpr);
|
||||
}
|
||||
|
||||
fBenchmark.reset(bench);
|
||||
|
@ -8,4 +8,4 @@
|
||||
#include "VisualFlags.h"
|
||||
|
||||
DEFINE_int32(msaa, 0, "Number of msaa samples.");
|
||||
DEFINE_bool(nvpr, false, "Run in NVPR mode?");
|
||||
DEFINE_int32(nvpr, 0, "Number of stencil samples for nvpr, or zero to disable it.");
|
||||
|
@ -12,6 +12,6 @@
|
||||
|
||||
DECLARE_string(config);
|
||||
DECLARE_int32(msaa);
|
||||
DECLARE_bool(nvpr);
|
||||
DECLARE_int32(nvpr);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user