summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-10-28 18:33:32 -0600
committerBrian Paul <[email protected]>2013-10-29 08:09:34 -0600
commitd0eaf6752d6faa8a17e3270b9e64b7c09ef705c2 (patch)
tree535964b760f78c5813371e22762ca5cbc5ff499d /src/mesa/state_tracker
parentea9fe9ebdbc37648af099848531ce301580fdeec (diff)
st/mesa: move out of memory check in st_draw_vbo()
Before we were only checking the st->vertex_array_out_of_memory flag after updating array state. But if there's two consecutive glDrawArrays calls and the first one is skipped because of OOM, the second one should be skipped too. Cc: 9.2 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_draw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index c35723087f1..51bb23807e8 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -210,9 +210,6 @@ st_draw_vbo(struct gl_context *ctx,
if (st->dirty.st || ctx->NewDriverState) {
st_validate_state(st);
- if (st->vertex_array_out_of_memory)
- return;
-
#if 0
if (MESA_VERBOSE & VERBOSE_GLSL) {
check_uniforms(ctx);
@@ -222,6 +219,10 @@ st_draw_vbo(struct gl_context *ctx,
#endif
}
+ if (st->vertex_array_out_of_memory) {
+ return;
+ }
+
util_draw_init_info(&info);
if (ib) {