From patchwork Mon Dec 12 12:51:14 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: 5597 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 41C4A23E0E for ; Mon, 12 Dec 2011 12:51: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 15B09A18654 for ; Mon, 12 Dec 2011 12:51:17 +0000 (UTC) Received: by bke17 with SMTP id 17so7217502bke.11 for ; Mon, 12 Dec 2011 04:51:16 -0800 (PST) Received: by 10.205.127.12 with SMTP id gy12mr10038314bkc.108.1323694276694; Mon, 12 Dec 2011 04:51: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 hg2cs46739bkc; Mon, 12 Dec 2011 04:51:16 -0800 (PST) Received: by 10.227.208.134 with SMTP id gc6mr9827498wbb.3.1323694274949; Mon, 12 Dec 2011 04:51:14 -0800 (PST) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id cr8si7025997wib.75.2011.12.12.04.51.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Dec 2011 04:51:14 -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 1Ra5Le-00064F-K9 for ; Mon, 12 Dec 2011 12:51:14 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id 8C559E0436 for ; Mon, 12 Dec 2011 12:51:14 +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: 68 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glcompbench-dev/glcompbench/trunk] Rev 68: ShaderSource: Always try to guess the shader type before emitting the shader string. Message-Id: <20111212125114.32763.76606.launchpad@ackee.canonical.com> Date: Mon, 12 Dec 2011 12:51: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="14458"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: a02466dc831efe8eff513f17ac83a0d0f9983b18 ------------------------------------------------------------ revno: 68 committer: Alexandros Frantzis branch nick: trunk timestamp: Mon 2011-12-12 14:43:08 +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.cc --- 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/shader-source.cc' --- src/shader-source.cc 2011-12-02 21:54:50 +0000 +++ src/shader-source.cc 2011-12-12 12:43:08 +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;