Fixed conform feedback and drawelements tests.
Use correct pv when rasterizing unfilled polys.
This commit is contained in:
@@ -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 */
|
||||
/**********************************************************************/
|
||||
|
@@ -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"
|
||||
|
@@ -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"
|
||||
|
@@ -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] );
|
||||
}
|
||||
|
@@ -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
|
||||
@@ -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:
|
||||
*/
|
||||
@@ -293,6 +293,7 @@ _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,
|
||||
@@ -310,10 +311,13 @@ _tnl_DrawElements(GLenum mode, GLsizei count, GLenum type,
|
||||
|
||||
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 );
|
||||
_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
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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)
|
||||
|
||||
|
@@ -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];
|
||||
|
@@ -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] );
|
||||
}
|
||||
}
|
||||
|
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user