st/mesa: generate GL_OUT_OF_MEMORY if we can't create the index buffer
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 <maraeo@gmail.com>
This commit is contained in:
@@ -230,7 +230,7 @@ st_draw_vbo(struct gl_context *ctx,
|
|||||||
nr_prims);
|
nr_prims);
|
||||||
|
|
||||||
if (!setup_index_buffer(st, ib, &ibuffer)) {
|
if (!setup_index_buffer(st, ib, &ibuffer)) {
|
||||||
/* out of memory */
|
_mesa_error(ctx, GL_OUT_OF_MEMORY, "glBegin/DrawElements/DrawArray");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user