[Mesa-dev] [PATCH 2/4] glsl: Add glsl_type::uvecN_type for N=2, 3

Ian Romanick idr at freedesktop.org
Thu Oct 7 21:18:52 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chad Versace wrote:
> From: Chad Versace <chad at chad-versace.us>
> 
> ---
>  src/glsl/builtin_types.h |    3 +++
>  src/glsl/glsl_types.h    |    2 ++
>  2 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/src/glsl/builtin_types.h b/src/glsl/builtin_types.h
> index 6dabbf0..e7bed08 100644
> --- a/src/glsl/builtin_types.h
> +++ b/src/glsl/builtin_types.h
> @@ -210,6 +210,7 @@ const glsl_type *const glsl_type::mat4x3_type = & builtin_120_types[5];
>  /*@{*/
>  
>  const glsl_type glsl_type::builtin_130_types[] = {
> +
>     glsl_type(GL_UNSIGNED_INT,      GLSL_TYPE_UINT, 1, 1, "uint"),
>     glsl_type(GL_UNSIGNED_INT_VEC2, GLSL_TYPE_UINT, 2, 1, "uvec2"),
>     glsl_type(GL_UNSIGNED_INT_VEC3, GLSL_TYPE_UINT, 3, 1, "uvec3"),

NAK gratuitous whitespace change.

> @@ -251,6 +252,8 @@ const glsl_type glsl_type::builtin_130_types[] = {
>  };
>  
>  const glsl_type *const glsl_type::uint_type = & builtin_130_types[0];
> +const glsl_type *const glsl_type::uvec2_type = & builtin_130_types[2];
> +const glsl_type *const glsl_type::uvec3_type = & builtin_130_types[3];
>  const glsl_type *const glsl_type::uvec4_type = & builtin_130_types[3];

These should be builtin_130_types[1] and builtin_130_types[2].

>  /*@}*/
>  
> diff --git a/src/glsl/glsl_types.h b/src/glsl/glsl_types.h
> index 4f7d2f7..dccab0a 100644
> --- a/src/glsl/glsl_types.h
> +++ b/src/glsl/glsl_types.h
> @@ -149,6 +149,8 @@ struct glsl_type {
>     static const glsl_type *const int_type;
>     static const glsl_type *const ivec4_type;
>     static const glsl_type *const uint_type;
> +   static const glsl_type *const uvec2_type;
> +   static const glsl_type *const uvec3_type;
>     static const glsl_type *const uvec4_type;
>     static const glsl_type *const float_type;
>     static const glsl_type *const vec2_type;

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyum6oACgkQX1gOwKyEAw9DowCfdDhBJGlLE8FnQu5e7KcDFizr
SOwAoJTTnaLO2KBL8q8JcthGXexJI+Ee
=9ENb
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list