vbo: pass the stream from DrawTransformFeedbackStream to drivers
[mesa.git] / src / mesa / tnl / t_context.h
index 3b7d4468055597e281cfb382412828b4f2631c14..e7adb5f533e1ef6566ffc77a6abfdba940125fd2 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * mesa 3-D graphics library
- * Version:  6.5
  *
  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
  *
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
  */
 
 /**
@@ -133,7 +133,7 @@ enum {
        _TNL_ATTRIB_MAT_FRONT_INDEXES = 27,
        _TNL_ATTRIB_MAT_BACK_INDEXES = 28,
 
-       /* This is really a VERT_RESULT, not an attrib.  Need to fix
+       /* This is really a VARYING_SLOT, not an attrib.  Need to fix
         * tnl to understand the difference.
         */
        _TNL_ATTRIB_POINTSIZE = 16,
@@ -221,7 +221,7 @@ struct vertex_buffer
    GLuint      PrimitiveCount;       
 
    /* Inputs to the vertex program stage */
-   GLvector4f *AttribPtr[_TNL_ATTRIB_MAX];      /* GL_NV_vertex_program */
+   GLvector4f *AttribPtr[_TNL_ATTRIB_MAX];
 };
 
 
@@ -384,6 +384,20 @@ struct tnl_clipspace
 };
 
 
+#define SHINE_TABLE_SIZE 256   /**< Material shininess lookup table sizes */
+
+/**
+ * Material shininess lookup table.
+ */
+struct tnl_shine_tab
+{
+   struct tnl_shine_tab *next, *prev;
+   GLfloat tab[SHINE_TABLE_SIZE+1];
+   GLfloat shininess;
+   GLuint refcount;
+};
+
+
 struct tnl_device_driver
 {
    /***
@@ -483,18 +497,6 @@ struct tnl_device_driver
 };
 
 
-#define DECLARE_RENDERINPUTS(name) GLbitfield64 name
-#define RENDERINPUTS_COPY(x, y) do { (x) = (y); } while (0)
-#define RENDERINPUTS_EQUAL(x, y) ((x) == (y))
-#define RENDERINPUTS_ZERO(x) do { (x) = 0; } while (0)
-#define RENDERINPUTS_ONES(x) do { (x) = ~(GLbitfield64)0; } while (0)
-#define RENDERINPUTS_TEST(x, b) (((x) & BITFIELD64_BIT(b)) != 0)
-#define RENDERINPUTS_SET(x, b) ((x) |= BITFIELD64_BIT(b))
-#define RENDERINPUTS_CLEAR(x, b) ((x) &= ~BITFIELD64_BIT(b))
-#define RENDERINPUTS_TEST_RANGE(x, b, e) \
-   (((x) & BITFIELD64_RANGE((b), (e) - (b) + 1)) != 0)
-
-
 /**
  * Context state for T&L context.
  */
@@ -512,6 +514,7 @@ typedef struct
    /* Clipspace/ndc/window vertex managment:
     */
    struct tnl_clipspace clipspace;
+   GLmatrix _WindowMap;
 
    /* Probably need a better configuration mechanism:
     */
@@ -520,7 +523,7 @@ typedef struct
    GLboolean AllowPixelFog;
    GLboolean _DoVertexFog;  /* eval fog function at each vertex? */
 
-   DECLARE_RENDERINPUTS(render_inputs_bitset);
+   GLbitfield64 render_inputs_bitset;
 
    GLvector4f tmp_inputs[VERT_ATTRIB_MAX];
 
@@ -530,6 +533,10 @@ typedef struct
    GLuint nr_blocks;
 
    GLuint CurInstance;
+
+   struct tnl_shine_tab *_ShineTable[2]; /**< Active shine tables */
+   struct tnl_shine_tab *_ShineTabList;  /**< MRU list of inactive shine tables */
+   /**@}*/
 } TNLcontext;