summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_curbe.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-09-23 15:53:29 -0700
committerEric Anholt <eric@anholt.net>2008-09-23 15:53:29 -0700
commitd533da2db873942b3f8676a754b8be3c9718bedf (patch)
treeaa326f3695f183647598c1567d2b6475490d9b05 /src/mesa/drivers/dri/i965/brw_curbe.c
parent4b038e24b0960e10d6ab8e360f2558d9c2730d99 (diff)
i965: Cope with batch getting flushed in the middle of batchbuffer emits.
This isn't required for GEM (at least, yet), but the check_aperture code for non-GEM results in batch getting flushed during emit. brw_state_upload restarts state emits, but a bunch of the state emit functions were assuming that they would be called exactly once, after prepare and before new_batch. Bug #17179.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_curbe.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_curbe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
index c4e06af6b1..7cddd3a7de 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -282,7 +282,8 @@ static void prepare_constant_buffer(struct brw_context *brw)
brw->curbe.last_bufsz = bufsz;
if (brw->curbe.curbe_bo != NULL &&
- brw->curbe.curbe_next_offset + bufsz > brw->curbe.curbe_bo->size)
+ (brw->curbe.need_new_bo ||
+ brw->curbe.curbe_next_offset + bufsz > brw->curbe.curbe_bo->size))
{
dri_bo_unreference(brw->curbe.curbe_bo);
brw->curbe.curbe_bo = NULL;