summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2008-07-07 15:58:27 -0700
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-07-21 11:12:41 +0800
commit618968c3dc88b16b079061066c5772754ebeaa26 (patch)
treec8a38eb3a96bd3dc9480748eeb3f1d4a39a37a31
parentbfcc2957023f74e8167f9c501245492feaa5ae76 (diff)
Use up to 256 separate vertex buffers
This allows us to only call i830WaitSync once every 128 calls to composite rather than on every call. However, we do need to also call MI_FLUSH to avoid the vertex cache getting in our way, (since our "separate" buffers are all allocated as one contiguous chunk). (cherry picked from commit 757c00927a6f5760135136450b8d02d0f999ac1c)
-rw-r--r--src/i965_render.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/i965_render.c b/src/i965_render.c
index 3c7379c3..1cbfe242 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -60,7 +60,7 @@ do { \
#endif
#define MAX_VERTEX_PER_COMPOSITE 24
-#define MAX_VERTEX_BUFFERS 1
+#define MAX_VERTEX_BUFFERS 256
struct blendinfo {
Bool dst_alpha;
@@ -1401,7 +1401,8 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
}
assert (i * 4 <= sizeof(card_state->vb));
- BEGIN_BATCH(11);
+ BEGIN_BATCH(12);
+ OUT_BATCH(MI_FLUSH);
/* Set up the pointer to our (single) vertex buffer */
OUT_BATCH(BRW_3DSTATE_VERTEX_BUFFERS | 3);
OUT_BATCH((0 << VB0_BUFFER_INDEX_SHIFT) |