fragment program execution
[mesa.git] / src / mesa / tnl / t_context.h
index 98ff5456048fdca9dbbc16d370f06a03045ff9d5..1647fec12873fa3dd71d958a7603b970fc45a9f9 100644 (file)
@@ -1,8 +1,8 @@
-/* $Id: t_context.h,v 1.38 2002/02/13 00:53:20 keithw Exp $ */
+/* $Id: t_context.h,v 1.44 2003/01/14 04:55:47 brianp Exp $ */
 
 /*
  * Mesa 3-D graphics library
- * Version:  4.1
+ * Version:  5.1
  *
  * Copyright (C) 1999-2002  Brian Paul   All Rights Reserved.
  *
 #define VERT_BIT_CLIP        VERT_BIT_END   /* vb only, reuse imm bit*/
 
 
-
 /* Flags for IM->TexCoordSize.  Enough flags for 16 units.
  */
-#define TEX_0_SIZE_3          0x1
-#define TEX_0_SIZE_4          0x10001
+#define TEX_0_SIZE_3          (unsigned)0x1
+#define TEX_0_SIZE_4          (unsigned)0x10001
 #define TEX_SIZE_3(unit)      (TEX_0_SIZE_3 << (unit))
 #define TEX_SIZE_4(unit)      (TEX_0_SIZE_4 << (unit))
 
  */
 struct immediate
 {
-   struct __GLcontextRec *backref;
    GLuint id, ref_count;
 
    /* This must be saved when immediates are shared in display lists.
@@ -211,13 +209,14 @@ struct immediate
 
 struct vertex_arrays
 {
+   /* XXX move a bunch of these fields into the Attribs[] array??? */
    GLvector4f  Obj;
    GLvector4f  Normal;
    struct gl_client_array Color;
    struct gl_client_array SecondaryColor;
    GLvector1ui Index;
    GLvector1ub EdgeFlag;
-   GLvector4f  TexCoord[MAX_TEXTURE_UNITS];
+   GLvector4f  TexCoord[MAX_TEXTURE_COORD_UNITS];
    GLvector1ui Elt;
    GLvector4f  FogCoord;
    GLvector4f  Attribs[VERT_ATTRIB_MAX];
@@ -251,7 +250,7 @@ typedef struct vertex_buffer
    GLvector4f  *NormalPtr;                     /* VERT_BIT_NORMAL */
    GLfloat     *NormalLengthPtr;               /* VERT_BIT_NORMAL */
    GLboolean   *EdgeFlag;                      /* VERT_BIT_EDGEFLAG */
-   GLvector4f  *TexCoordPtr[MAX_TEXTURE_UNITS];        /* VERT_TEX_0..n */
+   GLvector4f  *TexCoordPtr[MAX_TEXTURE_COORD_UNITS]; /* VERT_TEX_0..n */
    GLvector1ui *IndexPtr[2];                   /* VERT_BIT_INDEX */
    struct gl_client_array *ColorPtr[2];                /* VERT_BIT_COLOR0 */
    struct gl_client_array *SecondaryColorPtr[2];/* VERT_BIT_COLOR1 */
@@ -353,6 +352,8 @@ struct gl_pipeline {
 struct tnl_eval_store {
    GLuint EvalMap1Flags;
    GLuint EvalMap2Flags;
+   GLuint EvalMap1AttribFlags;  /* GL_NV_vertex_program */
+   GLuint EvalMap2AttribFlags;  /* GL_NV_vertex_program */
    GLuint EvalNewState;
    struct immediate *im;       /* used for temporary data */
 };
@@ -387,9 +388,13 @@ struct tnl_device_driver {
     */
 
    void (*NotifyMaterialChange)(GLcontext *ctx);
-   /* Alert tnl-aware drivers of changes to material, especially in
-    * exec_empty_cassette, which doesn't otherwise reach the driver.
-    * --> Need to be able to disable exec_empty_cassette???
+   /* Alert tnl-aware drivers of changes to material.
+    */
+
+   GLboolean (*NotifyBegin)(GLcontext *ctx, GLenum p);
+   /* Allow drivers to hook in optimized begin/end engines.
+    * Return value:  GL_TRUE - driver handled the begin
+    *                GL_FALSE - driver didn't handle the begin
     */
 
    /***
@@ -539,6 +544,7 @@ typedef struct {
    /* Functions to be plugged into dispatch when tnl is active.
     */
    GLvertexformat vtxfmt;
+   GLvertexformat save_vtxfmt;
 
 } TNLcontext;