[Mesa-dev] [PATCH 1/2] draw: fix max_index initializer in draw_pipeline_run()

Grazvydas Ignotas notasas at gmail.com
Tue May 2 19:26:49 UTC 2017


On Tue, May 2, 2017 at 10:21 PM, Brian Paul <brianp at vmware.com> wrote:

> Note, this is just some debug code.
> ---
>  src/gallium/auxiliary/draw/draw_pipe.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/draw/draw_pipe.c
> b/src/gallium/auxiliary/draw/draw_pipe.c
> index 27a3762..3581698 100644
> --- a/src/gallium/auxiliary/draw/draw_pipe.c
> +++ b/src/gallium/auxiliary/draw/draw_pipe.c
> @@ -242,7 +242,7 @@ void draw_pipeline_run( struct draw_context *draw,
>  #if DEBUG
>        /* Warn if one of the element indexes go outside the vertex buffer
> */
>        {
> -         unsigned max_index = 0x0, i;
> +         unsigned max_index = 0;
>

Looks like you're breaking the outer loop by removing this 'i' shadow.

GraÅžvydas


>           /* find the largest element index */
>           for (i = 0; i < count; i++) {
>              unsigned int index = prim_info->elts[start + i];
> --
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170502/3aec13a0/attachment.html>


More information about the mesa-dev mailing list