From 3fd01320f1ce3b78584c1fec9b1d6805e8ee6786 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Sun, 14 Jan 2001 06:14:21 +0000 Subject: Fixed conform feedback and drawelements tests. Use correct pv when rasterizing unfilled polys. --- src/mesa/tnl/t_array_api.c | 18 +++++++++++------- src/mesa/tnl/t_context.h | 4 ++-- src/mesa/tnl/t_imm_exec.c | 6 +++--- src/mesa/tnl/t_pipeline.c | 3 ++- src/mesa/tnl/t_vb_rendertmp.h | 6 +++--- 5 files changed, 21 insertions(+), 16 deletions(-) (limited to 'src/mesa/tnl') diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c index 587f1b43d7..908328513d 100644 --- a/src/mesa/tnl/t_array_api.c +++ b/src/mesa/tnl/t_array_api.c @@ -1,4 +1,4 @@ -/* $Id: t_array_api.c,v 1.2 2001/01/08 21:56:00 keithw Exp $ */ +/* $Id: t_array_api.c,v 1.3 2001/01/14 06:14:21 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -148,7 +148,7 @@ static void _tnl_draw_range_elements( GLcontext *ctx, GLenum mode, { TNLcontext *tnl = TNL_CONTEXT(ctx); FLUSH_CURRENT( ctx, 0 ); - + _tnl_vb_bind_arrays( ctx, start, end ); tnl->vb.FirstPrimitive = 0; @@ -260,11 +260,11 @@ _tnl_DrawRangeElements(GLenum mode, "elements outside locked range."); } } - else if (end - start < ctx->Const.MaxArrayLockSize) { + else if (end + 1 - start < ctx->Const.MaxArrayLockSize) { /* The arrays aren't locked but we can still fit them inside a single * vertexbuffer. */ - _tnl_draw_range_elements( ctx, mode, start, end, count, ui_indices ); + _tnl_draw_range_elements( ctx, mode, start, end + 1, count, ui_indices ); } else { /* Range is too big to optimize: */ @@ -292,7 +292,8 @@ _tnl_DrawElements(GLenum mode, GLsizei count, GLenum type, ui_indices = (GLuint *)_ac_import_elements( ctx, GL_UNSIGNED_INT, count, type, indices ); - + +#if 1 if (ctx->Array.LockCount) { _tnl_draw_range_elements( ctx, mode, ctx->Array.LockFirst, @@ -309,11 +310,14 @@ _tnl_DrawElements(GLenum mode, GLsizei count, GLenum type, if (ui_indices[i] > max_elt) max_elt = ui_indices[i]; if (max_elt < ctx->Const.MaxArrayLockSize && /* can we use it? */ - max_elt < count) /* do we want to use it? */ - _tnl_draw_range_elements( ctx, mode, 0, max_elt, count, ui_indices ); + max_elt < count) /* do we want to use it? */ + _tnl_draw_range_elements( ctx, mode, 0, max_elt + 1, count, ui_indices ); else _tnl_draw_elements( ctx, mode, count, ui_indices ); } +#else + _tnl_draw_elements( ctx, mode, count, ui_indices ); +#endif } diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index d49c854241..41be51e4e2 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -1,4 +1,4 @@ -/* $Id: t_context.h,v 1.10 2001/01/13 05:48:26 keithw Exp $ */ +/* $Id: t_context.h,v 1.11 2001/01/14 06:14:21 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -105,7 +105,7 @@ /* Flags for IM->TexCoordSize. Enough flags for 16 units. */ #define TEX_0_SIZE_3 0x1 -#define TEX_0_SIZE_4 0x1000 +#define TEX_0_SIZE_4 0x1001 #define TEX_SIZE_3(unit) (TEX_0_SIZE_3<TexCoord[i].data = IM->TexCoord[i] + start; tmp->TexCoord[i].start = (GLfloat *)(IM->TexCoord[i] + start); tmp->TexCoord[i].size = 2; - if (IM->TexSize & i) { + if (IM->TexSize & TEX_SIZE_3(i)) { tmp->TexCoord[i].size = 3; - if (IM->TexSize & (i<<16)) + if (IM->TexSize & TEX_SIZE_4(i)) tmp->TexCoord[i].size = 4; } VB->TexCoordPtr[i] = &tmp->TexCoord[i]; diff --git a/src/mesa/tnl/t_pipeline.c b/src/mesa/tnl/t_pipeline.c index 8ee814841b..11a17849b6 100644 --- a/src/mesa/tnl/t_pipeline.c +++ b/src/mesa/tnl/t_pipeline.c @@ -1,4 +1,4 @@ -/* $Id: t_pipeline.c,v 1.8 2001/01/08 21:56:00 keithw Exp $ */ +/* $Id: t_pipeline.c,v 1.9 2001/01/14 06:14:21 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -142,6 +142,7 @@ void _tnl_run_pipeline( GLcontext *ctx ) changed_inputs |= stage[i].outputs; if (running) { +/* fprintf(stderr, "run %s\n", stage[i].name); */ running = stage[i].run( ctx, &stage[i] ); } } diff --git a/src/mesa/tnl/t_vb_rendertmp.h b/src/mesa/tnl/t_vb_rendertmp.h index 194dd85190..c2e1c9051e 100644 --- a/src/mesa/tnl/t_vb_rendertmp.h +++ b/src/mesa/tnl/t_vb_rendertmp.h @@ -1,4 +1,4 @@ -/* $Id: t_vb_rendertmp.h,v 1.5 2001/01/08 04:09:42 keithw Exp $ */ +/* $Id: t_vb_rendertmp.h,v 1.6 2001/01/14 06:14:21 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -287,7 +287,7 @@ static void TAG(render_poly)( GLcontext *ctx, if (j