[Mesa-dev] [PATCH 06/11] nir/constant_folding: support 16-bit constants
Chema Casanova
jmcasanova at igalia.com
Wed Apr 25 12:00:09 UTC 2018
El 24/04/18 a las 23:52, Jason Ekstrand escribió:
> On Wed, Apr 11, 2018 at 12:20 AM, Iago Toral Quiroga <itoral at igalia.com
> <mailto:itoral at igalia.com>> wrote:
>
> From: Jose Maria Casanova Crespo <jmcasanova at igalia.com
> <mailto:jmcasanova at 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.
Karol Herbst has just sent just a patch with these changes done. So I've
reviewed it as I got to the same patch.
>
> }
> --
> 2.14.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> <https://lists.freedesktop.org/mailman/listinfo/mesa-dev>
>
>
>
>
> _______________________________________________
> 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