diff options
author | Nicolai Haehnle <[email protected]> | 2008-07-26 16:15:33 +0200 |
---|---|---|
committer | Nicolai Haehnle <[email protected]> | 2008-07-26 16:15:33 +0200 |
commit | 477fa8fe1241aedde281defca52f02a8e7385733 (patch) | |
tree | a084532e9eb0702ad2e77c6058612a56ec1d60a6 | |
parent | 9bc9e0ecb0fb2069b2c123e665eb2118e358098f (diff) |
r300: Always emit LOAD_VBPNTR immediately before index-based rendering
This fixes one type of lockup I've been seeing on my test system.
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_render.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index 69ff6d573e2..58bc0884431 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -269,13 +269,24 @@ static void r300RunRenderPrimitive(r300ContextPtr rmesa, GLcontext * ctx, return; if (vb->Elts) { - r300EmitAOS(rmesa, rmesa->state.aos_count, start); if (num_verts > 65535) { /* not implemented yet */ WARN_ONCE("Too many elts\n"); return; } + /* Note: The following is incorrect, but it's the best I can do + * without a major refactoring of how DMA memory is handled. + * The problem: Ensuring that both vertex arrays *and* index + * arrays are at the right position, and then ensuring that + * the LOAD_VBPNTR, DRAW_INDX and INDX_BUFFER packets are emitted + * at once. + * + * So why is the following incorrect? Well, it seems like + * allocating the index array might actually evict the vertex + * arrays. *sigh* + */ r300EmitElts(ctx, vb->Elts, num_verts); + r300EmitAOS(rmesa, rmesa->state.aos_count, start); r300FireEB(rmesa, rmesa->state.elt_dma.aos_offset, num_verts, type); } else { r300EmitAOS(rmesa, rmesa->state.aos_count, start); |