diff mbox

[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
State Accepted
Headers show

Commit Message

alexandros.frantzis@linaro.org Dec. 12, 2011, 12:51 p.m. UTC
------------------------------------------------------------
revno: 68
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
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
diff mbox

Patch

=== 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;