[Mesa-dev] [PATCH] glsl: Add comment explaining "row_major" parsing.

Kenneth Graunke kenneth at whitecape.org
Thu Jul 11 11:40:23 PDT 2013


On 07/11/2013 11:29 AM, Matt Turner wrote:
> ---
>   src/glsl/glsl_parser.yy | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index f0b6357..c079cdd 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -1189,6 +1189,12 @@ layout_qualifier_id:
>   	         $$.flags.q.shared = 1;
>   	      } else if (strcmp($1, "column_major") == 0) {
>   	         $$.flags.q.column_major = 1;
> +	      /* "row_major" is a reserved word in GLSL 1.30+. Its token is parsed
> +	       * below in the interface_block_layout_qualifier rule.
> +	       *
> +	       * It is not a reserved word in GLSL ES 3.00, so it's handled here as
> +	       * an identifier.
> +	       */
>   	      } else if (strcmp($1, "row_major") == 0) {
>   	         $$.flags.q.row_major = 1;
>   	      }
>

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>


More information about the mesa-dev mailing list