From patchwork Thu Jun 23 14:23:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexandros.frantzis@linaro.org X-Patchwork-Id: 2214 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id C4C8523F6D for ; Thu, 23 Jun 2011 14:23:20 +0000 (UTC) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9632DA189BA for ; Thu, 23 Jun 2011 14:23:20 +0000 (UTC) Received: by mail-qy0-f180.google.com with SMTP id 30so1372729qyk.11 for ; Thu, 23 Jun 2011 07:23:20 -0700 (PDT) Received: by 10.229.30.3 with SMTP id s3mr446965qcc.21.1308839000360; Thu, 23 Jun 2011 07:23:20 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.230.139 with SMTP id jm11cs19228qcb; Thu, 23 Jun 2011 07:23:19 -0700 (PDT) Received: by 10.216.237.102 with SMTP id x80mr3551227weq.111.1308838996596; Thu, 23 Jun 2011 07:23:16 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id e69si3938153wek.88.2011.06.23.07.23.16; Thu, 23 Jun 2011 07:23:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QZkoN-0003mg-Ef for ; Thu, 23 Jun 2011 14:23:15 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 6AE662E890E for ; Thu, 23 Jun 2011 14:23:15 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glcompbench X-Launchpad-Branch: ~glcompbench-dev/glcompbench/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 33 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glcompbench-dev/glcompbench/trunk] Rev 33: Replace --no-vbo command line option with 'use-vbo' test option. Message-Id: <20110623142315.3922.9229.launchpad@loganberry.canonical.com> Date: Thu, 23 Jun 2011 14:23:15 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13265"; Instance="initZopeless config overlay" X-Launchpad-Hash: af95ba742179c42bb2dcdb1c4cc125b69d8cc45a ------------------------------------------------------------ revno: 33 committer: Alexandros Frantzis branch nick: trunk timestamp: Thu 2011-06-23 16:32:36 +0300 message: Replace --no-vbo command line option with 'use-vbo' test option. modified: src/composite-canvas.cc src/composite-test-simple-base.cc src/composite-test-simple-brick.cc src/composite-test.h src/options.cc src/options.h --- lp:glcompbench https://code.launchpad.net/~glcompbench-dev/glcompbench/trunk You are subscribed to branch lp:glcompbench. To unsubscribe from this branch go to https://code.launchpad.net/~glcompbench-dev/glcompbench/trunk/+edit-subscription === modified file 'src/composite-canvas.cc' --- src/composite-canvas.cc 2011-06-23 13:13:26 +0000 +++ src/composite-canvas.cc 2011-06-23 13:32:36 +0000 @@ -597,9 +597,7 @@ current_test_ = &benchmark->setup_test(); load_current_test_options(); reshape(width_, height_); - Log::info("Running test: '%s' %susing vertex buffer objects\n", - current_test_->name().c_str(), - (Options::use_vbo) ? "" : "NOT "); + Log::info("Running test: '%s'\n", current_test_->name().c_str()); while (true) { if (handle_xevent()) { === modified file 'src/composite-test-simple-base.cc' --- src/composite-test-simple-base.cc 2011-06-23 11:22:08 +0000 +++ src/composite-test-simple-base.cc 2011-06-23 13:32:36 +0000 @@ -34,6 +34,15 @@ const string CompositeTestSimpleBase::texcoord_name_("texcoord"); const string CompositeTestSimpleBase::position_name_("position"); +CompositeTestSimpleBase::CompositeTestSimpleBase(const std::string& test_name, + const std::string& vs_filename, + const std::string& fs_filename) + : CompositeTest(test_name), vs_filename_(vs_filename), + fs_filename_(fs_filename) +{ + options_["use-vbo"] = CompositeTest::Option("use-vbo", "true", ""); +} + void CompositeTestSimpleBase::init() { @@ -101,7 +110,6 @@ vboData_.addTexCoord(vec2(0, 0)); vboData_.genBufferObject(); - vboData_.useBufferObject(Options::use_vbo); } /** @@ -110,6 +118,8 @@ void CompositeTestSimpleBase::prepare_for_run() { + vboData_.useBufferObject(options_["use-vbo"].value == "true"); + program_.start(); int texUnit(0); program_.loadUniformScalar(texUnit, texture0_name_); === modified file 'src/composite-test-simple-brick.cc' --- src/composite-test-simple-brick.cc 2011-06-23 11:22:08 +0000 +++ src/composite-test-simple-brick.cc 2011-06-23 13:32:36 +0000 @@ -38,19 +38,13 @@ void CompositeTestSimpleBrick::prepare_for_run() { + CompositeTestSimpleBase::prepare_for_run(); + lightPos_ = LibMatrix::vec4(0.0, 1.0, 1.0, 0.0); - program_.start(); - int texUnit(0); - program_.loadUniformScalar(texUnit, texture0_name_); program_.loadUniformVector(brickSize_, brickSizeName_); program_.loadUniformVector(brickPct_, brickPctName_); program_.loadUniformVector(lightPos_, lightPosName_); - - glClearColor(0.1, 0.1, 0.3, 1.0); - - glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } void === modified file 'src/composite-test.h' --- src/composite-test.h 2011-06-23 13:10:17 +0000 +++ src/composite-test.h 2011-06-23 13:32:36 +0000 @@ -91,11 +91,8 @@ { public: CompositeTestSimpleBase(const std::string& test_name, - const std::string& vs_filename, - const std::string& fs_filename) - : CompositeTest(test_name), vs_filename_(vs_filename), - fs_filename_(fs_filename) - {} + const std::string& vs_filename, + const std::string& fs_filename); virtual void init(); virtual void prepare_for_run(); === modified file 'src/options.cc' --- src/options.cc 2011-06-23 13:13:26 +0000 +++ src/options.cc 2011-06-23 13:32:36 +0000 @@ -40,7 +40,6 @@ bool Options::manual_redirect = false; bool Options::show_debug = false; bool Options::show_help = false; -bool Options::use_vbo = true; bool Options::list_tests = false; bool Options::swap_buffers = true; @@ -48,7 +47,6 @@ {"ids", 1, 0, 0}, {"size", 1, 0, 0}, {"no-accel-tfp", 0, 0, 0}, - {"no-vbo", 0, 0, 0}, {"benchmark", 1, 0, 0}, {"no-draw", 0, 0, 0}, {"idle-redraw", 0, 0, 0}, @@ -88,7 +86,6 @@ " --size The size of each side of the main window in pixels\n" " [default: 512]\n" " --no-accel-tfp Don't use accelerated TFP (use glTexImage2D)\n" - " --no-vbo Don't use vertex buffer objects for drawing (use client vertex arrays)\n" " --benchmark BENCH A benchmark to run: 'test(:opt1=val1)*'\n" " (the option can be used multiple times)\n" " --no-draw Process the windows but don't draw anything on screen\n" @@ -129,8 +126,6 @@ Options::size = strtol(optarg, NULL, 10); else if (!strcmp(optname, "no-accel-tfp")) Options::use_accel_tfp = false; - else if (!strcmp(optname, "no-vbo")) - Options::use_vbo = false; else if (!strcmp(optname, "benchmark")) Options::benchmarks.push_back(optarg); else if (!strcmp(optname, "no-draw")) === modified file 'src/options.h' --- src/options.h 2011-06-23 13:13:26 +0000 +++ src/options.h 2011-06-23 13:32:36 +0000 @@ -43,7 +43,6 @@ static bool manual_redirect; static bool show_debug; static bool show_help; - static bool use_vbo; static bool list_tests; static bool swap_buffers; };