[Mesa-dev] [PATCH] nir: drop assert for new arrays code.
Jason Ekstrand
jason at jlekstrand.net
Fri May 20 03:52:33 UTC 2016
On Thu, May 19, 2016 at 8:48 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This code handles 0 length fine,
Um... No it doesn't. A length of 0 means unsized which means we really
need to to a get_array_length call and loop. Am I messing something?
> and with the new glsl layer
> code to handle unsized array better, we can hit this path with
> ./bin/arb_separate_shader_object-GetProgramPipelineiv
>
> removing the assert works fine.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/compiler/nir/nir_lower_var_copies.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/src/compiler/nir/nir_lower_var_copies.c
> b/src/compiler/nir/nir_lower_var_copies.c
> index b7e9989..f774f53 100644
> --- a/src/compiler/nir/nir_lower_var_copies.c
> +++ b/src/compiler/nir/nir_lower_var_copies.c
> @@ -93,7 +93,6 @@ emit_copy_load_store(nir_intrinsic_instr *copy_instr,
> unsigned length = glsl_get_length(src_arr_parent->type);
> /* The wildcards should represent the same number of elements */
> assert(length == glsl_get_length(dest_arr_parent->type));
> - assert(length > 0);
>
> /* Walk over all of the elements that this wildcard refers to and
> * call emit_copy_load_store on each one of them */
> --
> 2.5.5
>
> _______________________________________________
> 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/20160519/73bda48a/attachment.html>
More information about the mesa-dev
mailing list