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 | |
parent | ab8b047ae59c111b4e4ab4fd43a2c6573caf5b85 (diff) |
Fixed conform feedback and drawelements tests.
Use correct pv when rasterizing unfilled polys.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/feedback.c | 7 | ||||
-rw-r--r-- | src/mesa/main/lines.c | 3 | ||||
-rw-r--r-- | src/mesa/main/points.c | 3 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_triangle.c | 4 | ||||
-rw-r--r-- | src/mesa/swrast_setup/ss_vbtmp.h | 2 | ||||
-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 |
10 files changed, 29 insertions, 27 deletions
diff --git a/src/mesa/main/feedback.c b/src/mesa/main/feedback.c index 4d6941a5766..b67e8146c33 100644 --- a/src/mesa/main/feedback.c +++ b/src/mesa/main/feedback.c @@ -1,4 +1,4 @@ -/* $Id: feedback.c,v 1.19 2001/01/08 04:09:41 keithw Exp $ */ +/* $Id: feedback.c,v 1.20 2001/01/14 06:14:21 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -58,14 +58,13 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) gl_error( ctx, GL_INVALID_OPERATION, "glFeedbackBuffer" ); return; } - if (size<0) { gl_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(size<0)" ); return; } if (!buffer) { gl_error( ctx, GL_INVALID_VALUE, "glFeedbackBuffer(buffer==NULL)" ); - ctx->Feedback.BufferSize = 0; /* XXX -- Sould this be here??? */ + ctx->Feedback.BufferSize = 0; return; } @@ -103,7 +102,6 @@ _mesa_FeedbackBuffer( GLsizei size, GLenum type, GLfloat *buffer ) } - void _mesa_PassThrough( GLfloat token ) { @@ -153,6 +151,7 @@ void gl_feedback_vertex( GLcontext *ctx, } } + /**********************************************************************/ /* Selection */ /**********************************************************************/ diff --git a/src/mesa/main/lines.c b/src/mesa/main/lines.c index 8a9256c1789..520010c1a18 100644 --- a/src/mesa/main/lines.c +++ b/src/mesa/main/lines.c @@ -1,4 +1,4 @@ -/* $Id: lines.c,v 1.26 2001/01/13 05:48:25 keithw Exp $ */ +/* $Id: lines.c,v 1.27 2001/01/14 06:14:21 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -31,7 +31,6 @@ #include "glheader.h" #include "context.h" #include "depth.h" -#include "feedback.h" #include "lines.h" #include "macros.h" #include "mmath.h" diff --git a/src/mesa/main/points.c b/src/mesa/main/points.c index c24b1b4eef3..41788352a16 100644 --- a/src/mesa/main/points.c +++ b/src/mesa/main/points.c @@ -1,4 +1,4 @@ -/* $Id: points.c,v 1.27 2001/01/09 00:02:55 brianp Exp $ */ +/* $Id: points.c,v 1.28 2001/01/14 06:14:21 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -30,7 +30,6 @@ #else #include "glheader.h" #include "context.h" -#include "feedback.h" #include "macros.h" #include "mmath.h" #include "points.h" diff --git a/src/mesa/swrast_setup/ss_triangle.c b/src/mesa/swrast_setup/ss_triangle.c index 5fd5cd0f57f..73a19ad38af 100644 --- a/src/mesa/swrast_setup/ss_triangle.c +++ b/src/mesa/swrast_setup/ss_triangle.c @@ -144,11 +144,11 @@ static void swsetup_points( GLcontext *ctx, GLuint first, GLuint last ) int i; if (VB->Elts) { - for(i=first;i<=last;i++) + for(i=first;i<last;i++) if(VB->ClipMask[VB->Elts[i]]==0) _swrast_Point( ctx, &verts[VB->Elts[i]] ); } else { - for(i=first;i<=last;i++) + for(i=first;i<last;i++) if(VB->ClipMask[i]==0) _swrast_Point( ctx, &verts[i] ); } diff --git a/src/mesa/swrast_setup/ss_vbtmp.h b/src/mesa/swrast_setup/ss_vbtmp.h index f5a4c449e74..15d51a41df3 100644 --- a/src/mesa/swrast_setup/ss_vbtmp.h +++ b/src/mesa/swrast_setup/ss_vbtmp.h @@ -110,7 +110,7 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs ) if (IND & MULTITEX) { GLuint u; for (u = 0 ; u < maxtex ; u++) - if (tc[u]) + if (tc[u]) COPY_CLEAN_4V( v->texcoord[u], tsz[u], tc[u][i] ); } 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 ); } } |