summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>1999-11-19 00:03:27 +0000
committerKeith Whitwell <keith@tungstengraphics.com>1999-11-19 00:03:27 +0000
commit784657c37960b954550555a92dbe9e762c9ff488 (patch)
treefd658ea47fdde5616708d2d78aadd7f5a256cfcb /src
parent653c83b9b4d922f05767d7f96429863a76996093 (diff)
fixes for andree's drawarrays problems
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/varray.c25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index be7fc8798f..3c1bf6eef3 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1,4 +1,4 @@
-/* $Id: varray.c,v 1.16 1999/11/18 23:56:04 brianp Exp $ */
+/* $Id: varray.c,v 1.17 1999/11/19 00:03:27 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -505,14 +505,23 @@ _mesa_DrawArrays(GLenum mode, GLint start, GLsizei count)
* rendering to keep it turned on.
*/
relock = ctx->CompileCVAFlag;
- ctx->CompileCVAFlag = 0;
- if (!elt->pipeline_valid || relock)
+ if (relock) {
+ ctx->CompileCVAFlag = 0;
+ elt->pipeline_valid = 0;
+ }
+
+ if (!elt->pipeline_valid)
gl_build_immediate_pipeline( ctx );
required = elt->inputs;
fallback = (elt->inputs & ~ctx->Array.Summary);
+ /* The translate function doesn't do anything about size. It
+ * just ensures that type and stride come out right.
+ */
+ IM->v.Obj.size = ctx->Array.Vertex.Size;
+
if (required & VERT_RGBA)
{
Color = &ctx->Array.Color;
@@ -587,8 +596,6 @@ _mesa_DrawArrays(GLenum mode, GLint start, GLsizei count)
VB->Material = IM->Material;
VB->BoundsPtr = 0;
- IM->v.Obj.size = ctx->Array.Vertex.Size; /* added by Andree Borrmann */
-
while (remaining > 0) {
GLint vbspace = VB_MAX - VB_START;
GLuint count, n;
@@ -675,7 +682,6 @@ _mesa_DrawArrays(GLenum mode, GLint start, GLsizei count)
/* Transform and render.
*/
gl_run_pipeline( VB );
- gl_flush_vb( ctx, "DrawArrays" ); /* added by Andree Borrmann */
gl_reset_vb( VB );
ctx->Array.Flag[count] = ctx->Array.Flags;
@@ -685,7 +691,12 @@ _mesa_DrawArrays(GLenum mode, GLint start, GLsizei count)
remaining -= n;
}
- ctx->CompileCVAFlag = relock;
+ gl_reset_input( ctx );
+
+ if (relock) {
+ ctx->CompileCVAFlag = relock;
+ elt->pipeline_valid = 0;
+ }
}
else if (ctx->Array.Vertex.Enabled)
{