[Mesa-dev] [PATCH 2/3] nir: Add a helper to get the uvec4 type.

Jason Ekstrand jason at jlekstrand.net
Fri Dec 29 04:07:55 UTC 2017


Sure. Rb


On December 28, 2017 19:56:55 Eric Anholt <eric at anholt.net> wrote:

> I needed this in the vc5 compiler.
> ---
>  src/compiler/nir_types.cpp | 6 ++++++
>  src/compiler/nir_types.h   | 1 +
>  2 files changed, 7 insertions(+)
>
> diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
> index 377de0c9c7bd..cbdd452dc813 100644
> --- a/src/compiler/nir_types.cpp
> +++ b/src/compiler/nir_types.cpp
> @@ -297,6 +297,12 @@ glsl_vec4_type(void)
>     return glsl_type::vec4_type;
>  }
>
> +const glsl_type *
> +glsl_uvec4_type(void)
> +{
> +   return glsl_type::uvec4_type;
> +}
> +
>  const glsl_type *
>  glsl_int_type(void)
>  {
> diff --git a/src/compiler/nir_types.h b/src/compiler/nir_types.h
> index daff97325093..4397c2406f9a 100644
> --- a/src/compiler/nir_types.h
> +++ b/src/compiler/nir_types.h
> @@ -136,6 +136,7 @@ const struct glsl_type *glsl_double_type(void);
>  const struct glsl_type *glsl_vec_type(unsigned n);
>  const struct glsl_type *glsl_dvec_type(unsigned n);
>  const struct glsl_type *glsl_vec4_type(void);
> +const struct glsl_type *glsl_uvec4_type(void);
>  const struct glsl_type *glsl_int_type(void);
>  const struct glsl_type *glsl_uint_type(void);
>  const struct glsl_type *glsl_int64_t_type(void);
> --
> 2.15.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list