summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/enable.c8
-rw-r--r--src/mesa/main/mtypes.h5
2 files changed, 8 insertions, 5 deletions
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index f82897fa46..b3c804d3fc 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1,4 +1,4 @@
-/* $Id: enable.c,v 1.53 2002/01/05 21:53:20 brianp Exp $ */
+/* $Id: enable.c,v 1.54 2002/01/06 20:39:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -802,21 +802,21 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
CHECK_EXTENSION(NV_vertex_program);
if (ctx->VertexProgram.Enabled == state)
return;
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM); /* XXX OK? */
+ FLUSH_VERTICES(ctx, _NEW_TRANSFORM | _NEW_PROGRAM); /* XXX OK? */
ctx->VertexProgram.Enabled = state;
break;
case GL_VERTEX_PROGRAM_POINT_SIZE_NV:
CHECK_EXTENSION(NV_vertex_program);
if (ctx->VertexProgram.PointSizeEnabled == state)
return;
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM); /* XXX OK? */
+ FLUSH_VERTICES(ctx, _NEW_POINT | _NEW_PROGRAM);
ctx->VertexProgram.PointSizeEnabled = state;
break;
case GL_VERTEX_PROGRAM_TWO_SIDE_NV:
CHECK_EXTENSION(NV_vertex_program);
if (ctx->VertexProgram.TwoSideEnabled == state)
return;
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM); /* XXX OK? */
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM); /* XXX OK? */
ctx->VertexProgram.TwoSideEnabled = state;
break;
case GL_MAP1_VERTEX_ATTRIB0_4_NV:
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 6c9684ebeb..dcf9d4bcf2 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1,4 +1,4 @@
-/* $Id: mtypes.h,v 1.59 2002/01/06 03:54:12 brianp Exp $ */
+/* $Id: mtypes.h,v 1.60 2002/01/06 20:39:19 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1225,6 +1225,8 @@ struct vp_program
GLint ErrorPos; /* Position in string where error was detected */
GLint RefCount; /* Since programs can be shared among contexts */
GLboolean Resident;
+ GLbitfield InputsRead; /* Bitmask of which input regs are read */
+ GLbitfield OutputsWritten; /* Bitmask of which output regs are written to */
};
@@ -1478,6 +1480,7 @@ struct matrix_stack
#define _NEW_BUFFERS 0x1000000 /* ctx->Visual, ctx->DrawBuffer, */
#define _NEW_MULTISAMPLE 0x2000000 /* ctx->Multisample */
#define _NEW_TRACK_MATRIX 0x4000000 /* ctx->VertexProgram */
+#define _NEW_PROGRAM 0x8000000 /* ctx->VertexProgram */
#define _NEW_ALL ~0