[Mesa-dev] [PATCH 54/59] intel/compiler: add a brw_reg_type_is_integer helper

Jason Ekstrand jason at jlekstrand.net
Fri Dec 7 20:26:15 UTC 2018


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Tue, Dec 4, 2018 at 1:19 AM Iago Toral Quiroga <itoral at igalia.com> wrote:

> ---
>  src/intel/compiler/brw_reg_type.h | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/src/intel/compiler/brw_reg_type.h
> b/src/intel/compiler/brw_reg_type.h
> index ffbec90d3fe..a3365b7e34c 100644
> --- a/src/intel/compiler/brw_reg_type.h
> +++ b/src/intel/compiler/brw_reg_type.h
> @@ -82,6 +82,24 @@ brw_reg_type_is_floating_point(enum brw_reg_type type)
>     }
>  }
>
> +static inline bool
> +brw_reg_type_is_integer(enum brw_reg_type type)
> +{
> +   switch (type) {
> +   case BRW_REGISTER_TYPE_Q:
> +   case BRW_REGISTER_TYPE_UQ:
> +   case BRW_REGISTER_TYPE_D:
> +   case BRW_REGISTER_TYPE_UD:
> +   case BRW_REGISTER_TYPE_W:
> +   case BRW_REGISTER_TYPE_UW:
> +   case BRW_REGISTER_TYPE_B:
> +   case BRW_REGISTER_TYPE_UV:
> +      return true;
> +   default:
> +      return false;
> +   }
> +}
> +
>  unsigned
>  brw_reg_type_to_hw_type(const struct gen_device_info *devinfo,
>                          enum brw_reg_file file, enum brw_reg_type type);
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181207/792f637a/attachment.html>


More information about the mesa-dev mailing list