On Wed, Apr 11, 2018 at 12:20 AM, Iago Toral Quiroga <ito...@igalia.com>
wrote:

> From: Jose Maria Casanova Crespo <jmcasan...@igalia.com>
>
> ---
>  src/compiler/nir/nir_opt_constant_folding.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/compiler/nir/nir_opt_constant_folding.c
> b/src/compiler/nir/nir_opt_constant_folding.c
> index d6be807b3dc..b63660ea4da 100644
> --- a/src/compiler/nir/nir_opt_constant_folding.c
> +++ b/src/compiler/nir/nir_opt_constant_folding.c
> @@ -78,6 +78,8 @@ constant_fold_alu_instr(nir_alu_instr *instr, void
> *mem_ctx)
>             j++) {
>           if (load_const->def.bit_size == 64)
>              src[i].u64[j] = load_const->value.u64[instr->
> src[i].swizzle[j]];
> +         else if (load_const->def.bit_size == 16)
> +            src[i].u16[j] = load_const->value.u16[instr->
> src[i].swizzle[j]];
>           else
>              src[i].u32[j] = load_const->value.u32[instr->
> src[i].swizzle[j]];
>

Let's make this a switch and support 8 while we're at it.


>        }
> --
> 2.14.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to