[Mesa-dev] [PATCH] nir: fix bit_size in lower indirect derefs.
Jason Ekstrand
jason at jlekstrand.net
Fri Apr 26 02:56:37 UTC 2019
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
On Thu, Apr 25, 2019 at 9:50 PM Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This fixes a case where we are expecting 64-bit but generate
> 32-bit consts and validate gets angry.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/compiler/nir/nir_lower_indirect_derefs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/compiler/nir/nir_lower_indirect_derefs.c
> b/src/compiler/nir/nir_lower_indirect_derefs.c
> index 1e1e84fb3b0..58365628885 100644
> --- a/src/compiler/nir/nir_lower_indirect_derefs.c
> +++ b/src/compiler/nir/nir_lower_indirect_derefs.c
> @@ -51,7 +51,7 @@ emit_indirect_load_store_deref(nir_builder *b,
> nir_intrinsic_instr *orig_instr,
> nir_deref_instr *deref = *deref_arr;
> assert(deref->deref_type == nir_deref_type_array);
>
> - nir_push_if(b, nir_ilt(b, deref->arr.index.ssa, nir_imm_int(b,
> mid)));
> + nir_push_if(b, nir_ilt(b, deref->arr.index.ssa, nir_imm_intN_t(b,
> mid, parent->dest.ssa.bit_size)));
> emit_indirect_load_store_deref(b, orig_instr, parent, deref_arr,
> start, mid, &then_dest, src);
> nir_push_else(b, NULL);
> --
> 2.20.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/20190425/5c66dbb6/attachment.html>
More information about the mesa-dev
mailing list