aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-03-17 14:32:05 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-17 19:09:37 +0000
commit50f66d805bcd424e34e1191a24a66b09e5611fe2 (patch)
tree9839294fa8219168ed1c50794325d54c8d83d28d /tools
parentf6ce600bc576f9951648bdda6e77af5bad4e9562 (diff)
Be explicit on test and perf bots about GL vs GLES
This changes the names of several shorthand names for gpu configs to be prefixed either with "gl" or "gles" and makes the bots only use such configs. It adds some missing named configs. Change-Id: Iea4e0e2ddafe0ac08e623111a15be7335156957c Reviewed-on: https://skia-review.googlesource.com/9833 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/flags/SkCommonFlagsConfig.cpp24
-rw-r--r--tools/flags/SkCommonFlagsConfig.h3
-rwxr-xr-xtools/skpbench/skpbench.py10
3 files changed, 22 insertions, 15 deletions
diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp
index c9ac767bdd..46aec7dcc6 100644
--- a/tools/flags/SkCommonFlagsConfig.cpp
+++ b/tools/flags/SkCommonFlagsConfig.cpp
@@ -30,30 +30,36 @@ static const struct {
#if SK_SUPPORT_GPU
{ "gpu", "gpu", "" },
{ "gl", "gpu", "api=gl" },
- { "msaa4", "gpu", "samples=4" },
+ { "gles", "gpu", "api=gles" },
{ "glmsaa4", "gpu", "api=gl,samples=4" },
- { "msaa16", "gpu", "samples=16" },
- { "nvpr4", "gpu", "nvpr=true,samples=4" },
+ { "glmsaa16", "gpu", "api=gl,samples=16" },
+ { "glesmsaa4", "gpu", "api=gles,samples=4" },
{ "glnvpr4", "gpu", "api=gl,nvpr=true,samples=4" },
- { "nvpr16", "gpu", "nvpr=true,samples=16" },
- { "nvprdit4", "gpu", "nvpr=true,samples=4,dit=true" },
+ { "glnvpr16", "gpu", "api=gl,nvpr=true,samples=16" },
{ "glnvprdit4", "gpu", "api=gl,nvpr=true,samples=4,dit=true" },
- { "nvprdit16", "gpu", "nvpr=true,samples=16,dit=true" },
+ { "glnvprdit16", "gpu", "api=gl,nvpr=true,samples=16,dit=true" },
+ { "glesnvpr4", "gpu", "api=gles,nvpr=true,samples=4" },
+ { "glesnvprdit4", "gpu", "api=gles,nvpr=true,samples=4,dit=true" },
{ "glinst", "gpu", "api=gl,inst=true" },
{ "glinst4", "gpu", "api=gl,inst=true,samples=4" },
{ "glinstdit4", "gpu", "api=gl,inst=true,samples=4,dit=true" },
{ "glinst16", "gpu", "api=gl,inst=true,samples=16" },
{ "glinstdit16", "gpu", "api=gl,inst=true,samples=16,dit=true" },
- { "esinst", "gpu", "api=gles,inst=true" },
- { "esinst4", "gpu", "api=gles,inst=true,samples=4" },
- { "esinstdit4", "gpu", "api=gles,inst=true,samples=4,dit=true" },
+ { "glesinst", "gpu", "api=gles,inst=true" },
+ { "glesinst4", "gpu", "api=gles,inst=true,samples=4" },
+ { "glesinstdit4", "gpu", "api=gles,inst=true,samples=4,dit=true" },
{ "gpuf16", "gpu", "color=f16" },
{ "gpusrgb", "gpu", "color=srgb" },
{ "gpusrgbnl", "gpu", "color=srgbnl" },
{ "glsrgb", "gpu", "api=gl,color=srgb" },
{ "glwide", "gpu", "api=gl,color=f16_wide" },
{ "glnarrow", "gpu", "api=gl,color=f16_narrow" },
+ { "glessrgb", "gpu", "api=gles,color=srgb" },
+ { "gleswide", "gpu", "api=gles,color=f16_wide" },
+ { "glesnarrow", "gpu", "api=gles,color=f16_narrow" },
{ "gpudft", "gpu", "dit=true" },
+ { "gldft", "gpu", "api=gl,dit=true" },
+ { "glesdft", "gpu", "api=gles,dit=true" },
{ "gpudebug", "gpu", "api=debug" },
{ "gpunull", "gpu", "api=null" },
{ "debug", "gpu", "api=debug" },
diff --git a/tools/flags/SkCommonFlagsConfig.h b/tools/flags/SkCommonFlagsConfig.h
index 7336fa7971..d562376fa2 100644
--- a/tools/flags/SkCommonFlagsConfig.h
+++ b/tools/flags/SkCommonFlagsConfig.h
@@ -47,7 +47,8 @@ class SkCommandLineConfig {
// SkCommandLineConfigGpu is a SkCommandLineConfig that extracts information out of the backend
// part of the tag. It is constructed tags that have:
// * backends of form "gpu(option=value,option2=value,...)"
-// * backends that represent a shorthand of above (such as "msaa16" representing "gpu(samples=16)")
+// * backends that represent a shorthand of above (such as "glmsaa16" representing
+// "gpu(samples=16)")
class SkCommandLineConfigGpu : public SkCommandLineConfig {
public:
typedef sk_gpu_test::GrContextFactory::ContextType ContextType;
diff --git a/tools/skpbench/skpbench.py b/tools/skpbench/skpbench.py
index 7cc0a231e9..ef44577c53 100755
--- a/tools/skpbench/skpbench.py
+++ b/tools/skpbench/skpbench.py
@@ -55,7 +55,7 @@ __argparse.add_argument('--gpu',
__argparse.add_argument('--fps',
action='store_true', help="use fps instead of ms")
__argparse.add_argument('-c', '--config',
- default='gpu', help="comma- or space-separated list of GPU configs")
+ default='gl', help="comma- or space-separated list of GPU configs")
__argparse.add_argument('-a', '--resultsfile',
help="optional file to append results into")
__argparse.add_argument('skps',
@@ -122,12 +122,12 @@ class SKPBench:
return out.rstrip()
@classmethod
- def run_warmup(cls, warmup_time):
+ def run_warmup(cls, warmup_time, config):
if not warmup_time:
return
print('running %i second warmup...' % warmup_time, file=sys.stderr)
commandline = cls.ARGV + ['--duration', str(warmup_time * 1000),
- '--config', 'gpu',
+ '--config', config,
'--skp', 'warmup']
dump_commandline_if_verbose(commandline)
output = subprocess.check_output(commandline, stderr=subprocess.STDOUT)
@@ -269,7 +269,7 @@ def run_benchmarks(configs, skps, hardware, resultsfile=None):
hardware.sleep(exception.sleeptime)
if FLAGS.verbosity >= 4:
hardware.print_debug_diagnostics()
- SKPBench.run_warmup(hardware.warmup_time)
+ SKPBench.run_warmup(hardware.warmup_time, configs[0])
def main():
# Delimiter is ',' or ' ', skip if nested inside parens (e.g. gpu(a=b,c=d)).
@@ -295,7 +295,7 @@ def main():
hardware = Hardware()
with hardware:
- SKPBench.run_warmup(hardware.warmup_time)
+ SKPBench.run_warmup(hardware.warmup_time, configs[0])
if FLAGS.resultsfile:
with open(FLAGS.resultsfile, mode='a+') as resultsfile:
run_benchmarks(configs, skps, hardware, resultsfile=resultsfile)