From e0144019c08cec64edb78c4f01d78bfbc2aa2edd Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 8 May 2013 10:18:49 -0600 Subject: [PATCH] st/mesa: generate GL_OUT_OF_MEMORY if we can't create the index buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. Note: This is a candidate for the stable branches. Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 437d5541b80..a0cf2ca1d8f 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; } -- 2.30.2