summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/glide/fxtris.c8
-rw-r--r--src/mesa/tnl/t_imm_dlist.c16
-rw-r--r--src/mesa/tnl/t_imm_fixup.c6
3 files changed, 15 insertions, 15 deletions
diff --git a/src/mesa/drivers/glide/fxtris.c b/src/mesa/drivers/glide/fxtris.c
index 150a3f80052..57a16ee6ea3 100644
--- a/src/mesa/drivers/glide/fxtris.c
+++ b/src/mesa/drivers/glide/fxtris.c
@@ -309,10 +309,10 @@ static struct {
#define VERT_SET_RGBA( dst, f ) \
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)
#define VERT_COPY_RGBA( v0, v1 ) \
diff --git a/src/mesa/tnl/t_imm_dlist.c b/src/mesa/tnl/t_imm_dlist.c
index 3cfdf1e5155..1708905ac55 100644
--- a/src/mesa/tnl/t_imm_dlist.c
+++ b/src/mesa/tnl/t_imm_dlist.c
@@ -1,4 +1,4 @@
-/* $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
@@ -341,9 +341,6 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
loopback_compiled_cassette( ctx, IM );
restore_compiled_primitives( ctx, IM );
}
- else if (IM->Count == IM->Start) {
- _tnl_copy_to_current( ctx, IM, IM->OrFlag );
- }
else {
if (ctx->NewState)
_mesa_update_state(ctx);
@@ -356,16 +353,22 @@ execute_compiled_cassette( GLcontext *ctx, void *data )
if (IM->Primitive[IM->LastPrimitive] & PRIM_END)
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 =
IM->Primitive[IM->LastPrimitive] & PRIM_MODE_MASK;
+ }
_tnl_get_exec_copy_verts( ctx, IM );
if (IM->NormalLengthPtr)
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 );
}
@@ -394,6 +397,7 @@ print_compiled_cassette( GLcontext *ctx, void *data )
node->IM->id, node->Start, node->Count);
IM->Start = node->Start;
+ IM->CopyStart = node->Start;
IM->Count = node->Count;
IM->BeginState = node->BeginState;
IM->OrFlag = node->OrFlag;
diff --git a/src/mesa/tnl/t_imm_fixup.c b/src/mesa/tnl/t_imm_fixup.c
index 0336a9779e8..607235d327b 100644
--- a/src/mesa/tnl/t_imm_fixup.c
+++ b/src/mesa/tnl/t_imm_fixup.c
@@ -1,4 +1,4 @@
-/* $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
@@ -512,12 +512,8 @@ void _tnl_fixup_compiled_cassette( GLcontext *ctx, struct immediate *IM )
{
TNLcontext *tnl = TNL_CONTEXT(ctx);
GLuint fixup;
- GLuint count = IM->Count;
GLuint start = IM->Start;
- if (count == start)
- return;
-
IM->CopyOrFlag = IM->OrFlag;
IM->CopyAndFlag = IM->AndFlag;
IM->CopyTexSize = IM->TexSize | tnl->ExecCopyTexSize;