reinstate old unlock + sched_yeild behaviour when nr_cliprects == 0

This commit is contained in:
Keith Whitwell 2006-03-13 16:41:45 +00:00
parent 9621817253
commit 05c6361b0b
3 changed files with 15 additions and 6 deletions

View file

@ -134,7 +134,8 @@ void intel_batchbuffer_free( struct intel_batchbuffer *batch )
*/
static void do_flush_locked( struct intel_batchbuffer *batch,
GLuint used,
GLboolean ignore_cliprects)
GLboolean ignore_cliprects,
GLboolean allow_unlock)
{
GLuint *ptr;
GLuint i;
@ -169,7 +170,8 @@ static void do_flush_locked( struct intel_batchbuffer *batch,
intel_batch_ioctl(batch->intel,
batch->offset[0],
used,
ignore_cliprects);
ignore_cliprects,
allow_unlock);
#endif
batch->last_fence = bmFenceBufferList(batch->bm, batch->list);
}
@ -211,11 +213,11 @@ GLuint intel_batchbuffer_flush( struct intel_batchbuffer *batch )
assert(!(batch->flags & INTEL_BATCH_NO_CLIPRECTS));
LOCK_HARDWARE(intel);
do_flush_locked(batch, used, GL_FALSE);
do_flush_locked(batch, used, GL_FALSE, GL_TRUE);
UNLOCK_HARDWARE(intel);
}
else {
do_flush_locked(batch, used, !(batch->flags & INTEL_BATCH_CLIPRECTS));
do_flush_locked(batch, used, !(batch->flags & INTEL_BATCH_CLIPRECTS), GL_FALSE);
}
/* Reset the buffer:

View file

@ -91,7 +91,8 @@ void intelWaitIrq( struct intel_context *intel, int seq )
void intel_batch_ioctl( struct intel_context *intel,
GLuint start_offset,
GLuint used,
GLboolean ignore_cliprects)
GLboolean ignore_cliprects,
GLboolean allow_unlock)
{
drmI830BatchBuffer batch;
@ -111,6 +112,11 @@ void intel_batch_ioctl( struct intel_context *intel,
* single buffer.
*/
if (intel->numClipRects == 0 && !ignore_cliprects) {
if (allow_unlock) {
UNLOCK_HARDWARE(intel);
sched_yield();
LOCK_HARDWARE(intel);
}
intel->vtbl.lost_hardware( intel );
return;
}

View file

@ -36,7 +36,8 @@ int intelEmitIrqLocked( struct intel_context *intel );
void intel_batch_ioctl( struct intel_context *intel,
GLuint start_offset,
GLuint used,
GLboolean ignore_cliprects);
GLboolean ignore_cliprects,
GLboolean allow_unlock);
#endif