From patchwork Mon Dec 12 12:41:13 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: 5596 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 5144023E0E for ; Mon, 12 Dec 2011 12:41:17 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 30C50A1864C for ; Mon, 12 Dec 2011 12:41:17 +0000 (UTC) Received: by bke17 with SMTP id 17so7203110bke.11 for ; Mon, 12 Dec 2011 04:41:17 -0800 (PST) Received: by 10.204.152.138 with SMTP id g10mr7750896bkw.36.1323693676866; Mon, 12 Dec 2011 04:41:16 -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.129.2 with SMTP id hg2cs46525bkc; Mon, 12 Dec 2011 04:41:15 -0800 (PST) Received: by 10.180.107.231 with SMTP id hf7mr21476665wib.68.1323693673684; Mon, 12 Dec 2011 04:41:13 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id fb6si10646590wbb.25.2011.12.12.04.41.13 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 04:41:13 -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 1Ra5Bx-0003B7-3x for ; Mon, 12 Dec 2011 12:41:13 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 090C4E043A for ; Mon, 12 Dec 2011 12:41:13 +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: 176 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 176: ShaderSource: Always try to guess the shader type before emitting the shader string. Message-Id: <20111212124113.30078.58933.launchpad@ackee.canonical.com> Date: Mon, 12 Dec 2011 12:41:13 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="14458"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 6d1393a16212df14208e7d02289beba0fe0627d4 ------------------------------------------------------------ revno: 176 committer: Alexandros Frantzis branch nick: trunk timestamp: Mon 2011-12-12 14:39:00 +0200 message: ShaderSource: Always try to guess the shader type before emitting the shader string. Previously, the shader type inference only took place if the precision hadn't been explicitly set for a ShaderSource object. This change ensures that the inference is always attempted. modified: src/shader-source.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/shader-source.cpp' --- src/shader-source.cpp 2011-11-29 10:36:37 +0000 +++ src/shader-source.cpp 2011-12-12 12:39:00 +0000 @@ -457,10 +457,13 @@ /* Decide which precision values to use */ ShaderSource::Precision precision; + /* Ensure we have tried to infer the type from the contents */ + type(); + if (precision_has_been_set_) precision = precision_; else - precision = default_precision(type()); + precision = default_precision(type_); /* Create the precision statements */ std::stringstream ss;