intel: reset cliprect_mode to IGNORE_CLIPRECTS.
authorXiang, Haihao <haihao.xiang@intel.com>
Tue, 11 Nov 2008 05:42:13 +0000 (13:42 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Tue, 11 Nov 2008 05:58:15 +0000 (13:58 +0800)
This ensures all batchbuffers have a same cliprect mode after calling
_intel_batchbuffer_flush even if there aren't invalid commands in the
current batch buffer. (fix bug#18362).

src/mesa/drivers/dri/intel/intel_batchbuffer.c

index c9b88b0ae1f2db3f0a2b00fc9a9cca12fb11ed7e..9d9937289a89e3f18ff31d8ba4ad640f5f95042c 100644 (file)
@@ -197,8 +197,10 @@ _intel_batchbuffer_flush(struct intel_batchbuffer *batch, const char *file,
    GLuint used = batch->ptr - batch->map;
    GLboolean was_locked = intel->locked;
 
-   if (used == 0)
+   if (used == 0) {
+      batch->cliprect_mode = IGNORE_CLIPRECTS;
       return;
+   }
 
    if (INTEL_DEBUG & DEBUG_BATCH)
       fprintf(stderr, "%s:%d: Batchbuffer flush with %db used\n", file, line,