From patchwork Fri Jan 13 15:07:14 2012 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: 6182 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 C967D23E01 for ; Fri, 13 Jan 2012 15:07:17 +0000 (UTC) Received: from mail-bk0-f52.google.com (mail-bk0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id B8D4AA18813 for ; Fri, 13 Jan 2012 15:07:17 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id zu5so2927826bkb.11 for ; Fri, 13 Jan 2012 07:07:17 -0800 (PST) Received: by 10.205.139.66 with SMTP id iv2mr626523bkc.27.1326467237530; Fri, 13 Jan 2012 07:07:17 -0800 (PST) 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.205.82.144 with SMTP id ac16cs31856bkc; Fri, 13 Jan 2012 07:07:17 -0800 (PST) Received: by 10.180.83.104 with SMTP id p8mr606434wiy.4.1326467235004; Fri, 13 Jan 2012 07:07:15 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id ft3si3326297wib.12.2012.01.13.07.07.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jan 2012 07:07:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) smtp.mail=bounces@canonical.com Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Rliio-0007eK-LP for ; Fri, 13 Jan 2012 15:07:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 8F7DDE03C8 for ; Fri, 13 Jan 2012 15:07:14 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glmark2 X-Launchpad-Branch: ~glmark2-dev/glmark2/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 179 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 179: Android, SceneBuffer: Fix crash on implementations not supporting glMapBufferOES. Message-Id: <20120113150714.16017.40436.launchpad@ackee.canonical.com> Date: Fri, 13 Jan 2012 15:07:14 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14664"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: b9015bbacfd7ecd308a6dec29871ebb2ffbbce1f Merge authors: Alexandros Frantzis (afrantzis) ------------------------------------------------------------ revno: 179 [merge] committer: Alexandros Frantzis branch nick: trunk timestamp: Fri 2012-01-13 15:51:25 +0200 message: Android,SceneBuffer: Fix crash on implementations not supporting glMapBufferOES. modified: src/android.cpp src/scene-buffer.cpp --- lp:glmark2 https://code.launchpad.net/~glmark2-dev/glmark2/trunk You are subscribed to branch lp:glmark2. To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription === modified file 'src/android.cpp' --- src/android.cpp 2011-11-08 20:20:02 +0000 +++ src/android.cpp 2012-01-13 13:48:41 +0000 @@ -105,11 +105,17 @@ return false; } - g_canvas->clear(); - - scene->draw(); - scene->update(); - + if (scene->is_running()) { + g_canvas->clear(); + + scene->draw(); + scene->update(); + } + + /* + * Need to recheck whether screen is running, because scene->update() + * may have changed the state. + */ if (!scene->is_running()) { (*bench_iter)->teardown_scene(); Log::info("%s FPS: %u", scene->info_string().c_str(), scene->average_fps()); === modified file 'src/scene-buffer.cpp' --- src/scene-buffer.cpp 2011-12-08 13:17:19 +0000 +++ src/scene-buffer.cpp 2012-01-13 13:50:31 +0000 @@ -343,6 +343,7 @@ Scene::setup(); + bool should_run = true; bool interleave = (options_["interleave"].value == "true"); Mesh::VBOUpdateMethod update_method; Mesh::VBOUsage usage; @@ -374,8 +375,8 @@ (GLExtensions::MapBuffer == 0 || GLExtensions::UnmapBuffer == 0)) { Log::error("Requested MapBuffer VBO update method but GL_OES_mapbuffer" - "is not supported!"); - return; + " is not supported!\n"); + should_run = false; } priv_->wave = new WaveMesh(5.0, 2.0, nlength, nwidth, @@ -393,7 +394,7 @@ glDisable(GL_CULL_FACE); currentFrame_ = 0; - running_ = true; + running_ = should_run; startTime_ = Util::get_timestamp_us() / 1000000.0; lastUpdateTime_ = startTime_; }