summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-08-28 11:35:52 -0400
committerXiang, Haihao <[email protected]>2007-08-28 11:35:52 -0400
commitc235cc71a296e63f65cafcc95839119cf3cf2a63 (patch)
treeaf6c59ea2bc8c5021f8dc84b7824fe0f8b0bfc93 /src/mesa
parent3a484cd794070ee489839b86b3f8f827d3049efd (diff)
i965: flush batch buffer when getting the maximum. This makes
some 3D programs such as pymol work well.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 0c64d7e756d..5ca9b2f549a 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -331,6 +331,7 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
else {
/* Otherwise, explicitly do the cliprects at this point:
*/
+ GLuint nprims = 0;
for (j = 0; j < brw->intel.numClipRects; j++) {
brw_emit_cliprect(brw, &brw->intel.pClipRects[j]);
@@ -338,6 +339,11 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
*/
for (i = 0; i < nr_prims; i++) {
brw_emit_prim(brw, &prim[i]);
+
+ if (++nprims == VBO_MAX_PRIM) {
+ intel_batchbuffer_flush(brw->intel.batch);
+ nprims = 0;
+ }
}
}
}