[Mesa-dev] [PATCH 06/11] nir/constant_folding: support 16-bit constants
Jason Ekstrand
jason at jlekstrand.net
Tue Apr 24 21:52:06 UTC 2018
On Wed, Apr 11, 2018 at 12:20 AM, Iago Toral Quiroga <itoral at igalia.com>
wrote:
> From: Jose Maria Casanova Crespo <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.
> }
> --
> 2.14.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/20180424/d4b4a5d3/attachment.html>
More information about the mesa-dev
mailing list