Hi Jose,

there seems to be a logic error in the commit

        3733da31e8b4405b65e1b6ca3b6599ecc5af5fe7 

(see below for the relevant section).

The "index out of range" message will be printed when the index is 
actually valid, the condition should be replaced by

        if (idx < min_index || idx > max_index)

cheers,

        Manuel

> --- a/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h
> +++ b/src/gallium/auxiliary/draw/draw_pt_vsplit_tmp.h
> @@ -56,7 +56,9 @@ CONCAT(vsplit_primitive_, ELT_TYPE)(struct
> vsplit_frontend *vsplit,
> 
>        for (i = 0; i < icount; i++) {
>           ELT_TYPE idx = ib[i];
> -         assert(idx >= min_index && idx <= max_index);
> +         if (idx >= min_index && idx <= max_index) {
> +            debug_printf("warning: index out of range\n");
> +         }
>        }
>        draw_elts = (const ushort *) ib;
>     }
> @@ -87,7 +89,9 @@ CONCAT(vsplit_primitive_, ELT_TYPE)(struct
> vsplit_frontend *vsplit, for (i = 0; i < icount; i++) {
>              ELT_TYPE idx = ib[i];
> 
> -            assert(idx >= min_index && idx <= max_index);
> +            if (idx >= min_index && idx <= max_index) {
> +               debug_printf("warning: index out of range\n");
> +         }
>              vsplit->draw_elts[i] = (ushort) idx;
>           }
>        }
> @@ -95,7 +99,9 @@ CONCAT(vsplit_primitive_, ELT_TYPE)(struct
> vsplit_frontend *vsplit, for (i = 0; i < icount; i++) {
>              ELT_TYPE idx = ib[i];
> 
> -            assert(idx >= min_index && idx <= max_index);
> +            if (idx >= min_index && idx <= max_index) {
> +               debug_printf("warning: index out of range\n");
> +         }
>              vsplit->draw_elts[i] = (ushort) (idx - min_index);
>           }
>        }
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to