[Mesa-dev] [PATCH 2/2] nir: Teach src_is_type about bcsel

Ilia Mirkin imirkin at alum.mit.edu
Fri Jul 20 00:45:04 UTC 2018


On Thu, Jul 19, 2018 at 8:39 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> ---
>  src/compiler/nir/nir_search.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c
> index c727e9c70b7..99b4ac6ddd2 100644
> --- a/src/compiler/nir/nir_search.c
> +++ b/src/compiler/nir/nir_search.c
> @@ -75,9 +75,13 @@ src_is_type(nir_src src, nir_alu_type type, unsigned num_components,
>                     src_is_type(src_alu->src[1].src, nir_type_bool,
>                                 num_components, swizzle);
>           case nir_op_inot:
> -            return src_is_type(src_alu->src[0].src, nir_type_bool);

Oh, and there it is. Should probably go into 1/2.

>              return src_is_type(src_alu->src[0].src, nir_type_bool,
>                                 num_components, swizzle);
> +         case nir_op_bcsel:
> +            return src_is_type(src_alu->src[1].src, nir_type_bool,
> +                               num_components, swizzle) &&
> +                   src_is_type(src_alu->src[2].src, nir_type_bool,
> +                               num_components, swizzle);
>           default:
>              break;
>           }
> --
> 2.14.4
>
> _______________________________________________
> 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