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

Petri Latvala petri.latvala at intel.com
Mon May 18 01:19:13 PDT 2015


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".

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


-- 
Petri Latvala



More information about the mesa-dev mailing list