[Mesa-dev] [RFC 01/16] glsl: Add tracking for GLSL precision qualifiers

Pohjolainen, Topi topi.pohjolainen at intel.com
Mon May 18 01:36:23 PDT 2015


On Mon, May 18, 2015 at 11:19:13AM +0300, Petri Latvala wrote:
> On 05/15/2015 12:39 PM, Topi Pohjolainen wrote:
> >diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
> >index 5645dcd..25c4d30 100644
> >--- a/src/glsl/glsl_types.h
> >+++ b/src/glsl/glsl_types.h
> >@@ -100,6 +100,13 @@ enum glsl_matrix_layout {
> >     GLSL_MATRIX_LAYOUT_ROW_MAJOR
> >  };
> >+enum {
> >+   GLSL_PRECISION_NONE = 0,
> >+   GLSL_PRECISION_HIGH,
> >+   GLSL_PRECISION_MEDIUM,
> >+   GLSL_PRECISION_LOW
> >+};
> >+
> >  #ifdef __cplusplus
> >  #include "GL/gl.h"
> >  #include "util/ralloc.h"
> >@@ -768,6 +775,11 @@ struct glsl_struct_field {
> >      * streams (as in ir_variable::stream). -1 otherwise.
> >      */
> >     int stream;
> >+
> >+   /**
> >+    * Precission qualifier
> >+    */
> >+   unsigned precision;
> >  };
> 
> Typo in the comment, "Precision".

Thanks, although I think this is most likely picked out by Iago if he
continues to work on the link-state validation of precision qualifiers.
I included this just for the context sake (see the cover letter). This
wasn't needed by the rest of the series.

> 
> Is there a piglit test for uniforms with different precisions? That should
> be mentioned in the commit log imho.

Tapani and I briefly looked at the existing tests last week and we concluded
that most likely we need a bunch more. However, I'd like to get the
implementation work started first to get better idea what sort of corner cases
are we looking at from Mesa's point of view.


More information about the mesa-dev mailing list