diff mbox

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

Commit Message

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

Patch

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