Merge branch 'origin'
[mesa.git] / src / mesa / main / mtypes.h
index 799e647731a75c8c566e76a4e0fa28cb7d837b9f..0ed73beb3c5fd820bf909f8329a8a1b510a4d364 100644 (file)
@@ -392,9 +392,9 @@ struct gl_color_table
 {
    GLenum InternalFormat;      /**< The user-specified format */
    GLenum _BaseFormat;         /**< GL_ALPHA, GL_RGBA, GL_RGB, etc */
-   GLuint Size;           /**< number of entries (rows) in table */
-   GLvoid *Table;         /**< points to data of <Type> */
-   GLenum Type;           /**< GL_UNSIGNED_BYTE or GL_FLOAT */
+   GLuint Size;                /**< number of entries in table */
+   GLfloat *TableF;            /**< Color table, floating point values */
+   GLubyte *TableUB;           /**< Color table, ubyte values */
    GLubyte RedSize;
    GLubyte GreenSize;
    GLubyte BlueSize;
@@ -888,6 +888,7 @@ struct gl_light_attrib
    GLenum ColorMaterialMode;           /**< GL_AMBIENT, GL_DIFFUSE, etc */
    GLbitfield ColorMaterialBitmask;    /**< bitmask formed from Face and Mode */
    GLboolean ColorMaterialEnabled;
+   GLenum ClampVertexColor;
 
    struct gl_light EnabledList;         /**< List sentinel */
 
@@ -1912,20 +1913,6 @@ struct gl_program_state
 };
 
 
-/**
- * Virtual vertex program machine state.
- * Only used during program execution (may be moved someday):
- */
-struct gl_vertex_program_machine
-{
-   GLfloat Temporaries[MAX_NV_VERTEX_PROGRAM_TEMPS][4];
-   GLfloat Inputs[MAX_NV_VERTEX_PROGRAM_INPUTS][4];
-   GLuint InputsSize[MAX_NV_VERTEX_PROGRAM_INPUTS];
-   GLfloat Outputs[MAX_NV_VERTEX_PROGRAM_OUTPUTS][4];
-   GLint AddressReg[4];
-};
-
-
 /**
  * Context state for vertex programs.
  */
@@ -1942,8 +1929,6 @@ struct gl_vertex_program_state
 
    GLfloat Parameters[MAX_NV_VERTEX_PROGRAM_PARAMS][4]; /**< Env params */
 
-   struct gl_vertex_program_machine Machine;
-
    /* For GL_NV_vertex_program only: */
    GLenum TrackMatrix[MAX_NV_VERTEX_PROGRAM_PARAMS / 4];
    GLenum TrackMatrixTransform[MAX_NV_VERTEX_PROGRAM_PARAMS / 4];
@@ -1988,17 +1973,6 @@ struct gl_fragment_program_state
 struct atifs_instruction;
 struct atifs_setupinst;
 
-/**
- * State for executing ATI fragment shader.
- */
-struct atifs_machine
-{
-   GLfloat Registers[6][4];         /** six temporary registers */
-   GLfloat PrevPassRegisters[6][4];
-   GLfloat Inputs[2][4];   /** Primary, secondary input colors */
-};
-
-
 /**
  * ATI fragment shader
  */
@@ -2029,7 +2003,6 @@ struct gl_ati_fragment_shader_state
    GLboolean _Enabled;                      /** enabled and valid shader? */
    GLboolean Compiling;
    GLfloat GlobalConstants[8][4];
-   struct atifs_machine Machine;            /* machine state */
    struct ati_fragment_shader *Current;
 };
 
@@ -2089,6 +2062,19 @@ struct gl_shared_state
    struct gl_texture_object *DefaultRect;
    /*@}*/
 
+   /**
+    * \name Thread safety and statechange notification for texture
+    * objects. 
+    *
+    * \todo Improve the granularity of locking.
+    */
+   /*@{*/
+   _glthread_Mutex TexMutex;              /**< texobj thread safety */
+   GLuint TextureStateStamp;              /**< state notification for shared tex  */
+   /*@}*/
+
+
+
    /**
     * \name Vertex/fragment programs
     */
@@ -2338,6 +2324,8 @@ struct gl_program_constants
    GLuint MaxNativeTemps;
    GLuint MaxNativeAddressRegs; /* vertex program only, for now */
    GLuint MaxNativeParameters;
+   /* For shaders */
+   GLuint MaxUniformComponents;
 };
 
 
@@ -2387,6 +2375,9 @@ struct gl_constants
    /* GL_EXT_framebuffer_object */
    GLuint MaxColorAttachments;
    GLuint MaxRenderbufferSize;
+   /* GL_ARB_vertex_shader */
+   GLuint MaxVertexTextureImageUnits;
+   GLuint MaxVaryingFloats;
 };
 
 
@@ -2415,6 +2406,7 @@ struct gl_extensions
    GLboolean ARB_point_sprite;
    GLboolean ARB_shader_objects;
    GLboolean ARB_shading_language_100;
+   GLboolean ARB_shading_language_120;
    GLboolean ARB_shadow;
    GLboolean ARB_texture_border_clamp;
    GLboolean ARB_texture_compression;
@@ -2953,6 +2945,8 @@ struct __GLcontextRec
    GLboolean _ForceEyeCoords; 
    GLenum _CurrentProgram;    /* currently executing program */
 
+   GLuint TextureStateTimestamp; /* detect changes to shared state */
+
    struct gl_shine_tab *_ShineTable[2]; /**< Active shine tables */
    struct gl_shine_tab *_ShineTabList;  /**< MRU list of inactive shine tables */
    /**@}*/