diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-03-27 18:50:23 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-03-27 18:50:23 -0700 |
| commit | 46aa0226257fa833140be1370b55c75c4a26f983 (patch) | |
| tree | 5ce329a9f192fc165b577e27deb32b1e5ec05093 /src/caskbench.cpp | |
| parent | 74bf3e1983ab557d236ee548494694692b1b1810 (diff) | |
egl: Make EGL sample buffers a runtime option
Run caskbench with --enable-egl-sample-buffers to turn this feature on.
This implementation is sort of hacky but gives us a starting point.
I'll generalize better once there are additional device options.
Diffstat (limited to 'src/caskbench.cpp')
| -rw-r--r-- | src/caskbench.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/caskbench.cpp b/src/caskbench.cpp index e230d39..38bd4f0 100644 --- a/src/caskbench.cpp +++ b/src/caskbench.cpp @@ -29,6 +29,8 @@ typedef struct _caskbench_options { char* surface_type; int size; int version; + + unsigned int enable_egl_sample_buffers; } caskbench_options_t; typedef struct _caskbench_result { @@ -187,6 +189,9 @@ process_options(caskbench_options_t *opt, int argc, char *argv[]) {"version", 'V', POPT_ARG_NONE, &opt->version, 0, "Display the program version", NULL}, + {"enable-egl-sample-buffers", NULL, POPT_ARG_NONE, &opt->enable_egl_sample_buffers, 0, + "Sets EGL_SAMPLES=4 and EGL_SAMPLE_BUFFERS=1 in the EGL attribute list", + NULL}, POPT_AUTOHELP {NULL} }; @@ -200,6 +205,8 @@ process_options(caskbench_options_t *opt, int argc, char *argv[]) opt->surface_type = NULL; opt->version = 0; + opt->enable_egl_sample_buffers = 0; + // Process the command line pc = poptGetContext(NULL, argc, (const char **)argv, po, 0); poptSetOtherOptionHelp(pc, "[ARG...]"); @@ -421,6 +428,11 @@ main (int argc, char *argv[]) process_options(&opt, argc, argv); + config.width = 0; + config.height = 0; + config.egl_samples = 0; + config.egl_sample_buffers = 0; + if (opt.version) { print_version(); exit(0); @@ -434,6 +446,10 @@ main (int argc, char *argv[]) fp = fopen(opt.output_file, "w"); fprintf(fp, "[\n"); } + if (opt.enable_egl_sample_buffers) { + config.egl_samples = 4; + config.egl_sample_buffers = 1; + } for (c=0; c<num_perf_tests; c++) { caskbench_context_t context; caskbench_result_t result; |