Browse Source

Fix Alan Barnett's 'try10' display list bug.

tags/mesa_4_0
Keith Whitwell 24 years ago
parent
commit
277fd2e66e
3 changed files with 15 additions and 15 deletions
  1. 4
    4
      src/mesa/drivers/glide/fxtris.c
  2. 10
    6
      src/mesa/tnl/t_imm_dlist.c
  3. 1
    5
      src/mesa/tnl/t_imm_fixup.c

+ 4
- 4
src/mesa/drivers/glide/fxtris.c View File



#define VERT_SET_RGBA( dst, f ) \ #define VERT_SET_RGBA( dst, f ) \
do { \ do { \
dst->r = CLAMP( f[0], 0, 1 ) * 255.0; \
dst->g = CLAMP( f[1], 0, 1 ) * 255.0; \
dst->b = CLAMP( f[2], 0, 1 ) * 255.0; \
dst->a = CLAMP( f[3], 0, 1 ) * 255.0; \
dst->r = (GLfloat)f[0]; \
dst->g = (GLfloat)f[1]; \
dst->b = (GLfloat)f[2]; \
dst->a = (GLfloat)f[3]; \
} while (0) } while (0)


#define VERT_COPY_RGBA( v0, v1 ) \ #define VERT_COPY_RGBA( v0, v1 ) \

+ 10
- 6
src/mesa/tnl/t_imm_dlist.c View File

/* $Id: t_imm_dlist.c,v 1.22 2001/07/13 16:39:19 brianp Exp $ */
/* $Id: t_imm_dlist.c,v 1.23 2001/07/17 21:44:37 keithw Exp $ */


/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
loopback_compiled_cassette( ctx, IM ); loopback_compiled_cassette( ctx, IM );
restore_compiled_primitives( ctx, IM ); restore_compiled_primitives( ctx, IM );
} }
else if (IM->Count == IM->Start) {
_tnl_copy_to_current( ctx, IM, IM->OrFlag );
}
else { else {
if (ctx->NewState) if (ctx->NewState)
_mesa_update_state(ctx); _mesa_update_state(ctx);


if (IM->Primitive[IM->LastPrimitive] & PRIM_END) if (IM->Primitive[IM->LastPrimitive] & PRIM_END)
ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1; ctx->Driver.CurrentExecPrimitive = GL_POLYGON+1;
else
else if ((IM->Primitive[IM->LastPrimitive] & PRIM_BEGIN) ||
(IM->Primitive[IM->LastPrimitive] & PRIM_MODE_MASK) ==
PRIM_OUTSIDE_BEGIN_END) {
ctx->Driver.CurrentExecPrimitive = ctx->Driver.CurrentExecPrimitive =
IM->Primitive[IM->LastPrimitive] & PRIM_MODE_MASK; IM->Primitive[IM->LastPrimitive] & PRIM_MODE_MASK;
}


_tnl_get_exec_copy_verts( ctx, IM ); _tnl_get_exec_copy_verts( ctx, IM );


if (IM->NormalLengthPtr) if (IM->NormalLengthPtr)
fixup_normal_lengths( IM ); fixup_normal_lengths( IM );
_tnl_run_cassette( ctx, IM );
if (IM->Count == IM->Start)
_tnl_copy_to_current( ctx, IM, IM->OrFlag );
else
_tnl_run_cassette( ctx, IM );


restore_compiled_primitives( ctx, IM ); restore_compiled_primitives( ctx, IM );
} }
node->IM->id, node->Start, node->Count); node->IM->id, node->Start, node->Count);


IM->Start = node->Start; IM->Start = node->Start;
IM->CopyStart = node->Start;
IM->Count = node->Count; IM->Count = node->Count;
IM->BeginState = node->BeginState; IM->BeginState = node->BeginState;
IM->OrFlag = node->OrFlag; IM->OrFlag = node->OrFlag;

+ 1
- 5
src/mesa/tnl/t_imm_fixup.c View File

/* $Id: t_imm_fixup.c,v 1.22 2001/06/28 17:34:14 keithw Exp $ */
/* $Id: t_imm_fixup.c,v 1.23 2001/07/17 21:44:37 keithw Exp $ */


/* /*
* Mesa 3-D graphics library * Mesa 3-D graphics library
{ {
TNLcontext *tnl = TNL_CONTEXT(ctx); TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint fixup; GLuint fixup;
GLuint count = IM->Count;
GLuint start = IM->Start; GLuint start = IM->Start;


if (count == start)
return;

IM->CopyOrFlag = IM->OrFlag; IM->CopyOrFlag = IM->OrFlag;
IM->CopyAndFlag = IM->AndFlag; IM->CopyAndFlag = IM->AndFlag;
IM->CopyTexSize = IM->TexSize | tnl->ExecCopyTexSize; IM->CopyTexSize = IM->TexSize | tnl->ExecCopyTexSize;

Loading…
Cancel
Save