Mesa (7.8): r300: set proper vertex index limits also in non indexed mode

Maciej Cencora osiris at kemper.freedesktop.org
Sun Apr 11 04:54:05 PDT 2010


Module: Mesa
Branch: 7.8
Commit: 6a5518861e541db76bae0fa69d1d025805d90f2c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6a5518861e541db76bae0fa69d1d025805d90f2c

Author: Maciej Cencora <m.cencora at gmail.com>
Date:   Fri Apr  9 21:14:15 2010 +0200

r300: set proper vertex index limits also in non indexed mode

Fixes #27521, broken menus in UT2004 and broken water refraction in Sauerbraten.

---

 src/mesa/drivers/dri/r300/r300_render.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 9596131..11eafd3 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -386,6 +386,14 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
 			WARN_ONCE("Fixme: can't handle spliting prim %d\n", prim);
 			return;
 		}
+
+		if (rmesa->radeon.radeonScreen->kernel_mm) {
+			BEGIN_BATCH_NO_AUTOSTATE(2);
+			OUT_BATCH_REGSEQ(R300_VAP_VF_MAX_VTX_INDX, 1);
+			OUT_BATCH(rmesa->radeon.tcl.aos[0].count);
+			END_BATCH();
+		}
+
 		r300_emit_scissor(rmesa->radeon.glCtx);
 		while (num_verts > 0) {
 			int nr;



More information about the mesa-commit mailing list