Clean up _tnl_Begin/begin/hard_begin.
Fix some problems with draw_arrays, draw_elements.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_array_api.c,v 1.14 2001/05/11 08:11:31 keithw Exp $ */
|
/* $Id: t_array_api.c,v 1.15 2001/05/11 15:53:06 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -48,6 +48,8 @@
|
|||||||
static void fallback_drawarrays( GLcontext *ctx, GLenum mode, GLint start,
|
static void fallback_drawarrays( GLcontext *ctx, GLenum mode, GLint start,
|
||||||
GLsizei count )
|
GLsizei count )
|
||||||
{
|
{
|
||||||
|
/* fprintf(stderr, "%s\n", __FUNCTION__); */
|
||||||
|
|
||||||
/* Need to produce immediate structs, either for compiling or
|
/* Need to produce immediate structs, either for compiling or
|
||||||
* because the array range is too large to process in a single
|
* because the array range is too large to process in a single
|
||||||
* VB. In GL_EXECUTE mode, this introduces two redundant
|
* VB. In GL_EXECUTE mode, this introduces two redundant
|
||||||
@@ -56,20 +58,18 @@ static void fallback_drawarrays( GLcontext *ctx, GLenum mode, GLint start,
|
|||||||
*/
|
*/
|
||||||
#if 1
|
#if 1
|
||||||
if (_tnl_hard_begin( ctx, mode )) {
|
if (_tnl_hard_begin( ctx, mode )) {
|
||||||
GLint j;
|
GLint i;
|
||||||
for (j = 0 ; j < count ; ) {
|
for (i = 0 ; i < count ; ) {
|
||||||
struct immediate *IM = TNL_CURRENT_IM(ctx);
|
struct immediate *IM = TNL_CURRENT_IM(ctx);
|
||||||
GLuint nr = MIN2( IMM_MAXDATA - IM->Start, (GLuint) (count - j) );
|
GLuint start = IM->Start;
|
||||||
GLuint sf = IM->Flag[IM->Start];
|
GLuint nr = MIN2( IMM_MAXDATA - start, (GLuint) (count - i) );
|
||||||
|
|
||||||
_tnl_fill_immediate_drawarrays( ctx, IM, j, j+nr );
|
_tnl_fill_immediate_drawarrays( ctx, IM, i, i+nr );
|
||||||
|
|
||||||
if (j == 0) IM->Flag[IM->Start] |= sf;
|
IM->Count = start + nr;
|
||||||
|
i += nr;
|
||||||
|
|
||||||
IM->Count = IM->Start + nr;
|
if (i == count)
|
||||||
j += nr;
|
|
||||||
|
|
||||||
if (j == count)
|
|
||||||
_tnl_end( ctx );
|
_tnl_end( ctx );
|
||||||
|
|
||||||
_tnl_flush_immediate( IM );
|
_tnl_flush_immediate( IM );
|
||||||
@@ -93,30 +93,31 @@ static void fallback_drawarrays( GLcontext *ctx, GLenum mode, GLint start,
|
|||||||
static void fallback_drawelements( GLcontext *ctx, GLenum mode, GLsizei count,
|
static void fallback_drawelements( GLcontext *ctx, GLenum mode, GLsizei count,
|
||||||
const GLuint *indices)
|
const GLuint *indices)
|
||||||
{
|
{
|
||||||
|
/* fprintf(stderr, "%s\n", __FUNCTION__); */
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
/* Optimized code that fakes the effect of calling
|
/* Optimized code that fakes the effect of calling
|
||||||
* _tnl_array_element for each index in the list.
|
* _tnl_array_element for each index in the list.
|
||||||
*/
|
*/
|
||||||
if (_tnl_hard_begin( ctx, mode )) {
|
if (_tnl_hard_begin( ctx, mode )) {
|
||||||
GLint i, j;
|
GLint i, j;
|
||||||
for (j = 0 ; j < count ; ) {
|
for (i = 0 ; i < count ; ) {
|
||||||
struct immediate *IM = TNL_CURRENT_IM(ctx);
|
struct immediate *IM = TNL_CURRENT_IM(ctx);
|
||||||
GLuint start = IM->Start;
|
GLuint start = IM->Start;
|
||||||
GLint nr = MIN2( (GLint) (IMM_MAXDATA - start), count - j ) + start;
|
GLint end = MIN2( IMM_MAXDATA, (count - i) + start);
|
||||||
GLuint sf = IM->Flag[start];
|
GLuint sf = IM->Flag[start];
|
||||||
IM->FlushElt = IM->ArrayEltFlush;
|
IM->FlushElt = IM->ArrayEltFlush;
|
||||||
|
|
||||||
for (i = start ; i < nr ; i++) {
|
for (j = start ; j < end ; j++) {
|
||||||
IM->Elt[i] = (GLuint) *indices++;
|
IM->Elt[j] = (GLuint) *indices++;
|
||||||
IM->Flag[i] = VERT_ELT;
|
IM->Flag[j] = VERT_ELT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j == 0) IM->Flag[start] |= sf;
|
IM->Flag[start] |= (sf & IM->ArrayEltFlags);
|
||||||
|
IM->Count = end;
|
||||||
|
i += end - start;
|
||||||
|
|
||||||
IM->Count = nr;
|
if (i == count)
|
||||||
j += nr - start;
|
|
||||||
|
|
||||||
if (j == count)
|
|
||||||
_tnl_end( ctx );
|
_tnl_end( ctx );
|
||||||
|
|
||||||
_tnl_flush_immediate( IM );
|
_tnl_flush_immediate( IM );
|
||||||
@@ -171,6 +172,8 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
|
|||||||
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
||||||
struct vertex_buffer *VB = &tnl->vb;
|
struct vertex_buffer *VB = &tnl->vb;
|
||||||
|
|
||||||
|
/* fprintf(stderr, "%s\n", __FUNCTION__); */
|
||||||
|
|
||||||
/* Check arguments, etc.
|
/* Check arguments, etc.
|
||||||
*/
|
*/
|
||||||
if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))
|
if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))
|
||||||
@@ -278,10 +281,13 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
|
|||||||
/* fprintf(stderr, "start %d count %d min %d modulo %d skip %d\n", */
|
/* fprintf(stderr, "start %d count %d min %d modulo %d skip %d\n", */
|
||||||
/* start, count, minimum, modulo, skip); */
|
/* start, count, minimum, modulo, skip); */
|
||||||
|
|
||||||
|
|
||||||
|
bufsz -= bufsz % modulo;
|
||||||
|
bufsz -= minimum;
|
||||||
|
|
||||||
for (j = start + minimum ; j < count ; j += nr + skip ) {
|
for (j = start + minimum ; j < count ; j += nr + skip ) {
|
||||||
|
|
||||||
nr = MIN2( bufsz, count - j );
|
nr = MIN2( bufsz, count - j );
|
||||||
nr -= nr % modulo;
|
|
||||||
|
|
||||||
/* fprintf(stderr, "%d..%d\n", j - minimum, j+nr); */
|
/* fprintf(stderr, "%d..%d\n", j - minimum, j+nr); */
|
||||||
|
|
||||||
@@ -307,6 +313,8 @@ _tnl_DrawRangeElements(GLenum mode,
|
|||||||
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
||||||
GLuint *ui_indices;
|
GLuint *ui_indices;
|
||||||
|
|
||||||
|
/* fprintf(stderr, "%s\n", __FUNCTION__); */
|
||||||
|
|
||||||
/* Check arguments, etc.
|
/* Check arguments, etc.
|
||||||
*/
|
*/
|
||||||
if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count,
|
if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count,
|
||||||
@@ -367,6 +375,8 @@ _tnl_DrawElements(GLenum mode, GLsizei count, GLenum type,
|
|||||||
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
||||||
GLuint *ui_indices;
|
GLuint *ui_indices;
|
||||||
|
|
||||||
|
/* fprintf(stderr, "%s\n", __FUNCTION__); */
|
||||||
|
|
||||||
/* Check arguments, etc.
|
/* Check arguments, etc.
|
||||||
*/
|
*/
|
||||||
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices ))
|
if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices ))
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_array_import.c,v 1.15 2001/05/11 08:11:31 keithw Exp $ */
|
/* $Id: t_array_import.c,v 1.16 2001/05/11 15:53:06 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -492,6 +492,7 @@ void _tnl_fill_immediate_drawarrays( GLcontext *ctx, struct immediate *IM,
|
|||||||
}
|
}
|
||||||
|
|
||||||
IM->Count = IM->Start + n;
|
IM->Count = IM->Start + n;
|
||||||
|
IM->Flag[IM->Start] &= IM->ArrayEltFlags;
|
||||||
IM->Flag[IM->Start] |= required;
|
IM->Flag[IM->Start] |= required;
|
||||||
for (i = IM->Start+1 ; i < IM->Count ; i++)
|
for (i = IM->Start+1 ; i < IM->Count ; i++)
|
||||||
IM->Flag[i] = required;
|
IM->Flag[i] = required;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_imm_api.c,v 1.13 2001/05/11 08:11:31 keithw Exp $ */
|
/* $Id: t_imm_api.c,v 1.14 2001/05/11 15:53:06 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -78,6 +78,11 @@ void _tnl_flush_vertices( GLcontext *ctx, GLuint flags )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Note the ctx argument. This function called only by _tnl_Begin,
|
||||||
|
* _tnl_save_Begin and _tnl_hard_begin() in this file.
|
||||||
|
*/
|
||||||
static void
|
static void
|
||||||
_tnl_begin( GLcontext *ctx, GLenum p )
|
_tnl_begin( GLcontext *ctx, GLenum p )
|
||||||
{
|
{
|
||||||
@@ -136,6 +141,25 @@ _tnl_begin( GLcontext *ctx, GLenum p )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
_tnl_save_Begin( GLenum mode )
|
||||||
|
{
|
||||||
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
|
||||||
|
if (mode > GL_POLYGON) {
|
||||||
|
_mesa_compile_error( ctx, GL_INVALID_ENUM, "glBegin" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_tnl_begin( ctx, mode );
|
||||||
|
|
||||||
|
/* Update save_primitive now.
|
||||||
|
*/
|
||||||
|
if (ctx->Driver.CurrentSavePrimitive == PRIM_UNKNOWN)
|
||||||
|
ctx->Driver.CurrentSavePrimitive = PRIM_INSIDE_UNKNOWN_PRIM;
|
||||||
|
else if (ctx->Driver.CurrentSavePrimitive == PRIM_OUTSIDE_BEGIN_END)
|
||||||
|
ctx->Driver.CurrentSavePrimitive = mode;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_tnl_Begin( GLenum mode )
|
_tnl_Begin( GLenum mode )
|
||||||
@@ -149,66 +173,63 @@ _tnl_Begin( GLenum mode )
|
|||||||
|
|
||||||
_tnl_begin(ctx, mode);
|
_tnl_begin(ctx, mode);
|
||||||
|
|
||||||
/* If compiling update SavePrimitive now.
|
/* Update exec_primitive now.
|
||||||
*
|
|
||||||
* In compile_and_exec mode, exec_primitive will be updated when
|
|
||||||
* the cassette is finished.
|
|
||||||
*
|
|
||||||
* If not compiling, update exec_primitive now.
|
|
||||||
*/
|
*/
|
||||||
if (ctx->CompileFlag) {
|
ASSERT (!ctx->CompileFlag);
|
||||||
if (ctx->Driver.CurrentSavePrimitive == PRIM_UNKNOWN)
|
if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) {
|
||||||
ctx->Driver.CurrentSavePrimitive = PRIM_INSIDE_UNKNOWN_PRIM;
|
|
||||||
else if (ctx->Driver.CurrentSavePrimitive == PRIM_OUTSIDE_BEGIN_END)
|
|
||||||
ctx->Driver.CurrentSavePrimitive = mode;
|
|
||||||
}
|
|
||||||
else if (ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END) {
|
|
||||||
/* fprintf(stderr, "setting cep %x in %s\n", mode, __FUNCTION__); */
|
|
||||||
ctx->Driver.CurrentExecPrimitive = mode;
|
ctx->Driver.CurrentExecPrimitive = mode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Function which allows operations like 'glRectf' to decompose to a
|
||||||
|
* begin/end object and vertices without worrying about what happens
|
||||||
|
* with display lists.
|
||||||
|
*/
|
||||||
GLboolean
|
GLboolean
|
||||||
_tnl_hard_begin( GLcontext *ctx, GLenum p )
|
_tnl_hard_begin( GLcontext *ctx, GLenum p )
|
||||||
{
|
{
|
||||||
|
if (!ctx->CompileFlag) {
|
||||||
|
/* If not compiling, treat as a normal begin().
|
||||||
|
*/
|
||||||
|
_tnl_begin( ctx, p );
|
||||||
|
ASSERT(ctx->Driver.CurrentExecPrimitive == PRIM_OUTSIDE_BEGIN_END);
|
||||||
|
ctx->Driver.CurrentExecPrimitive = p;
|
||||||
|
return GL_TRUE;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* Otherwise, need to do special processing to preserve the
|
||||||
|
* condition that these vertices will only be replayed outside
|
||||||
|
* future begin/end objects.
|
||||||
|
*/
|
||||||
struct immediate *IM = TNL_CURRENT_IM(ctx);
|
struct immediate *IM = TNL_CURRENT_IM(ctx);
|
||||||
GLuint count, last;
|
|
||||||
|
|
||||||
if (ctx->NewState)
|
if (ctx->NewState)
|
||||||
_mesa_update_state(ctx);
|
_mesa_update_state(ctx);
|
||||||
|
|
||||||
/* If not compiling, treat as a normal begin().
|
|
||||||
*/
|
|
||||||
if (!ctx->CompileFlag) {
|
|
||||||
_tnl_begin( ctx, p );
|
|
||||||
|
|
||||||
/* Set this for the duration:
|
|
||||||
*/
|
|
||||||
ctx->Driver.CurrentExecPrimitive = p;
|
|
||||||
/* fprintf(stderr, "setting cep %x in %s\n", */
|
|
||||||
/* ctx->Driver.CurrentExecPrimitive, __FUNCTION__); */
|
|
||||||
return GL_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IM->Count > IMM_MAXDATA-8) {
|
if (IM->Count > IMM_MAXDATA-8) {
|
||||||
_tnl_flush_immediate( IM );
|
_tnl_flush_immediate( IM );
|
||||||
IM = TNL_CURRENT_IM(ctx);
|
IM = TNL_CURRENT_IM(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* A lot depends on the degree to which the display list has
|
||||||
|
* constrained the possible begin/end states at this point:
|
||||||
|
*/
|
||||||
switch (IM->BeginState & (VERT_BEGIN_0|VERT_BEGIN_1)) {
|
switch (IM->BeginState & (VERT_BEGIN_0|VERT_BEGIN_1)) {
|
||||||
case VERT_BEGIN_0|VERT_BEGIN_1:
|
case VERT_BEGIN_0|VERT_BEGIN_1:
|
||||||
/* This is an immediate known to be inside a begin/end object.
|
/* This is an immediate known to be inside a begin/end object.
|
||||||
*/
|
*/
|
||||||
|
ASSERT(ctx->Driver.CurrentSavePrimitive <= GL_POLYGON);
|
||||||
IM->BeginState |= (VERT_ERROR_1|VERT_ERROR_0);
|
IM->BeginState |= (VERT_ERROR_1|VERT_ERROR_0);
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
case VERT_BEGIN_0:
|
case VERT_BEGIN_0:
|
||||||
case VERT_BEGIN_1:
|
case VERT_BEGIN_1:
|
||||||
/* This is a display-list immediate in an unknown begin/end
|
/* This is a display-list immediate in an unknown begin/end
|
||||||
* state. Assert it is empty and conviert it to a 'hard' one.
|
* state. Assert it is empty and convert it to a 'hard' one.
|
||||||
*/
|
*/
|
||||||
ASSERT(IM->SavedBeginState == 0);
|
ASSERT(IM->SavedBeginState == 0);
|
||||||
|
ASSERT(ctx->Driver.CurrentSavePrimitive == PRIM_UNKNOWN);
|
||||||
|
|
||||||
/* Push current beginstate, to be restored later. Don't worry
|
/* Push current beginstate, to be restored later. Don't worry
|
||||||
* about raising errors.
|
* about raising errors.
|
||||||
@@ -216,30 +237,26 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
|
|||||||
IM->SavedBeginState = IM->BeginState;
|
IM->SavedBeginState = IM->BeginState;
|
||||||
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
/* Unless we have fallen through, this is an immediate known to
|
/* Unless we have fallen through, this is an immediate known to
|
||||||
* be outside begin/end objects.
|
* be outside begin/end objects.
|
||||||
*/
|
*/
|
||||||
|
ASSERT(ctx->Driver.CurrentSavePrimitive == PRIM_UNKNOWN ||
|
||||||
|
ctx->Driver.CurrentSavePrimitive == PRIM_OUTSIDE_BEGIN_END);
|
||||||
|
ASSERT (IM->FlushElt != FLUSH_ELT_EAGER);
|
||||||
|
|
||||||
IM->BeginState |= VERT_BEGIN_0|VERT_BEGIN_1;
|
IM->BeginState |= VERT_BEGIN_0|VERT_BEGIN_1;
|
||||||
|
IM->Flag[IM->Count] |= VERT_BEGIN;
|
||||||
|
IM->Primitive[IM->Count] = p | PRIM_BEGIN;
|
||||||
count = IM->Count;
|
IM->PrimitiveLength[IM->LastPrimitive] = IM->Count - IM->LastPrimitive;
|
||||||
last = IM->LastPrimitive;
|
IM->LastPrimitive = IM->Count;
|
||||||
|
|
||||||
IM->Flag[count] |= VERT_BEGIN;
|
|
||||||
IM->Primitive[count] = p | PRIM_BEGIN;
|
|
||||||
IM->PrimitiveLength[last] = count - last;
|
|
||||||
IM->LastPrimitive = count;
|
|
||||||
|
|
||||||
ASSERT (IM->FlushElt != FLUSH_ELT_EAGER);
|
|
||||||
|
|
||||||
/* This is necessary as this immediate will not be flushed in
|
/* This is necessary as this immediate will not be flushed in
|
||||||
* _tnl_end() -- we leave it active, hoping to pick up more
|
* _tnl_end() -- we leave it active, hoping to pick up more
|
||||||
* vertices before the next state change.
|
* vertices before the next state change.
|
||||||
*/
|
*/
|
||||||
ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
|
ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -247,37 +264,9 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
|
|||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Need to do this to get the correct begin/end error behaviour from
|
|
||||||
* functions like ColorPointerEXT which are still active in
|
|
||||||
* SAVE_AND_EXEC modes.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
_tnl_save_Begin( GLenum mode )
|
|
||||||
{
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
|
||||||
|
|
||||||
if (mode > GL_POLYGON) {
|
|
||||||
_mesa_compile_error( ctx, GL_INVALID_ENUM, "glBegin" );
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx->ExecuteFlag) {
|
|
||||||
/* Preserve vtxfmt invarient:
|
|
||||||
*/
|
|
||||||
if (ctx->NewState)
|
|
||||||
_mesa_update_state( ctx );
|
|
||||||
|
|
||||||
/* Slot in geomexec: No need to call setdispatch as we know
|
|
||||||
* CurrentDispatch is Save.
|
|
||||||
*/
|
|
||||||
ASSERT(ctx->CurrentDispatch == ctx->Save);
|
|
||||||
}
|
|
||||||
|
|
||||||
_tnl_begin( ctx, mode );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -317,8 +306,6 @@ _tnl_end( GLcontext *ctx )
|
|||||||
|
|
||||||
if (!ctx->CompileFlag) {
|
if (!ctx->CompileFlag) {
|
||||||
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
|
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
|
||||||
/* fprintf(stderr, "setting cep %x in %s\n", */
|
|
||||||
/* ctx->Driver.CurrentExecPrimitive, __FUNCTION__); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* You can set this flag to get the old 'flush_vb on glEnd()'
|
/* You can set this flag to get the old 'flush_vb on glEnd()'
|
||||||
@@ -1113,8 +1100,8 @@ _tnl_vertex2f( GLcontext *ctx, GLfloat x, GLfloat y )
|
|||||||
|
|
||||||
/* Execute a glRectf() function. _tnl_hard_begin() ensures the check
|
/* Execute a glRectf() function. _tnl_hard_begin() ensures the check
|
||||||
* on outside_begin_end is executed even in compiled lists. These
|
* on outside_begin_end is executed even in compiled lists. These
|
||||||
* vertices can now participate in the same VB as regular ones, even
|
* vertices can now participate in the same immediate as regular ones,
|
||||||
* in most display lists.
|
* even in most display lists.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_tnl_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
|
_tnl_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_imm_dlist.c,v 1.17 2001/05/11 08:11:31 keithw Exp $ */
|
/* $Id: t_imm_dlist.c,v 1.18 2001/05/11 15:53:06 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -82,6 +82,13 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
|
|||||||
}
|
}
|
||||||
|
|
||||||
_tnl_compute_orflag( IM, IM->Start );
|
_tnl_compute_orflag( IM, IM->Start );
|
||||||
|
|
||||||
|
/* Need to clear this flag, or fixup gets confused. (The elements
|
||||||
|
* have been translated away by now.)
|
||||||
|
*/
|
||||||
|
IM->OrFlag &= ~VERT_ELT;
|
||||||
|
IM->AndFlag &= ~VERT_ELT;
|
||||||
|
|
||||||
_tnl_fixup_input( ctx, IM );
|
_tnl_fixup_input( ctx, IM );
|
||||||
/* _tnl_print_cassette( IM ); */
|
/* _tnl_print_cassette( IM ); */
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_imm_fixup.c,v 1.15 2001/05/11 08:11:31 keithw Exp $ */
|
/* $Id: t_imm_fixup.c,v 1.16 2001/05/11 15:53:06 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -290,9 +290,9 @@ void _tnl_fixup_input( GLcontext *ctx, struct immediate *IM )
|
|||||||
if (fixup & VERT_RGBA) {
|
if (fixup & VERT_RGBA) {
|
||||||
if (orflag & VERT_RGBA)
|
if (orflag & VERT_RGBA)
|
||||||
_tnl_fixup_4f( IM->Color, IM->Flag, start, VERT_RGBA );
|
_tnl_fixup_4f( IM->Color, IM->Flag, start, VERT_RGBA );
|
||||||
/* else */
|
/* No need for else case as the drivers understand stride
|
||||||
/* fixup_first_4f( IM->Color, IM->Flag, VERT_END_VB, start, */
|
* zero here. (TODO - propogate this)
|
||||||
/* IM->Color[start] ); */
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fixup & VERT_SPEC_RGB) {
|
if (fixup & VERT_SPEC_RGB) {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_vb_render.c,v 1.19 2001/04/28 08:39:18 keithw Exp $ */
|
/* $Id: t_vb_render.c,v 1.20 2001/05/11 15:53:06 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -318,7 +318,8 @@ static GLboolean run_render( GLcontext *ctx,
|
|||||||
|
|
||||||
|
|
||||||
tnl->Driver.RenderFinish( ctx );
|
tnl->Driver.RenderFinish( ctx );
|
||||||
/* usleep(100000); */
|
/* _swrast_flush(ctx); */
|
||||||
|
/* usleep(1000000); */
|
||||||
return GL_FALSE; /* finished the pipe */
|
return GL_FALSE; /* finished the pipe */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user