[Mesa-dev] [PATCH] st/mesa: generate GL_OUT_OF_MEMORY if we can't create the index buffer

Marek Olšák maraeo at gmail.com
Wed May 8 09:37:45 PDT 2013


Reviewed-by: Marek Olšák <maraeo at gmail.com>

Marek

On Wed, May 8, 2013 at 6:20 PM, Brian Paul <brianp at vmware.com> wrote:
> Before, if we failed to allocate the index buffer we'd silently
> return from st_draw_vbo() without drawing anything.  We should
> raise GL_OUT_OF_MEMORY to give some indication that something went
> wrong.
> ---
>  src/mesa/state_tracker/st_draw.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
> index 437d554..a0cf2ca 100644
> --- a/src/mesa/state_tracker/st_draw.c
> +++ b/src/mesa/state_tracker/st_draw.c
> @@ -230,7 +230,7 @@ st_draw_vbo(struct gl_context *ctx,
>                                     nr_prims);
>
>        if (!setup_index_buffer(st, ib, &ibuffer)) {
> -         /* out of memory */
> +         _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBegin/DrawElements/DrawArray");
>           return;
>        }
>
> --
> 1.7.3.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list