diff options
author | Keith Whitwell <[email protected]> | 2001-01-14 06:14:21 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2001-01-14 06:14:21 +0000 |
commit | 3fd01320f1ce3b78584c1fec9b1d6805e8ee6786 (patch) | |
tree | 202d3e095e37b093a872bc4bce612c04d68a501f /src/mesa/tnl | |
parent | ab8b047ae59c111b4e4ab4fd43a2c6573caf5b85 (diff) |
Fixed conform feedback and drawelements tests.
Use correct pv when rasterizing unfilled polys.
Diffstat (limited to 'src/mesa/tnl')
-rw-r--r-- | src/mesa/tnl/t_array_api.c | 18 | ||||
-rw-r--r-- | src/mesa/tnl/t_context.h | 4 | ||||
-rw-r--r-- | src/mesa/tnl/t_imm_exec.c | 6 | ||||
-rw-r--r-- | src/mesa/tnl/t_pipeline.c | 3 | ||||
-rw-r--r-- | src/mesa/tnl/t_vb_rendertmp.h | 6 |
5 files changed, 21 insertions, 16 deletions
diff --git a/src/mesa/tnl/t_array_api.c b/src/mesa/tnl/t_array_api.c index 587f1b43d7b..908328513d8 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 d49c8542418..41be51e4e25 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<<unit) #define TEX_SIZE_4(unit) (TEX_0_SIZE_4<<unit) diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c index 6feff8464fd..4d3f874ce4d 100644 --- a/src/mesa/tnl/t_imm_exec.c +++ b/src/mesa/tnl/t_imm_exec.c @@ -1,4 +1,4 @@ -/* $Id: t_imm_exec.c,v 1.7 2001/01/13 05:48:26 keithw Exp $ */ +/* $Id: t_imm_exec.c,v 1.8 2001/01/14 06:14:21 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -278,9 +278,9 @@ static void _tnl_vb_bind_immediate( GLcontext *ctx, struct immediate *IM ) tmp->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 8ee814841b1..11a17849b6a 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 194dd85190c..c2e1c9051e0 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<count-1) { GLboolean ef = EDGEFLAG_GET( ELT(j) ); EDGEFLAG_SET( ELT(j), GL_FALSE ); - RENDER_TRI( ELT(start), ELT(j-1), ELT(j) ); + RENDER_TRI( ELT(j-1), ELT(j), ELT(start) ); EDGEFLAG_SET( ELT(j), ef ); j++; @@ -298,7 +298,7 @@ static void TAG(render_poly)( GLcontext *ctx, for (;j<count-1;j++) { GLboolean efj = EDGEFLAG_GET( ELT(j) ); EDGEFLAG_SET( ELT(j), GL_FALSE ); - RENDER_TRI( ELT(start), ELT(j-1), ELT(j) ); + RENDER_TRI( ELT(j-1), ELT(j), ELT(start) ); EDGEFLAG_SET( ELT(j), efj ); } } |