mesa/glsl: remove unused uses_builtin_functions field
[mesa.git] / src / mesa / main / api_arrayelt.c
index 92d8238f431a9de923c0b002fd86cdcf08c3d2a9..46175e4cc74a5005e387d3090f362c4e4786dc51 100644 (file)
@@ -48,7 +48,7 @@
 typedef void (GLAPIENTRY *array_func)( const void * );
 
 typedef struct {
-   const struct gl_vertex_attrib_array *array;
+   const struct gl_array_attributes *array;
    const struct gl_vertex_buffer_binding *binding;
    int offset;
 } AEarray;
@@ -56,7 +56,7 @@ typedef struct {
 typedef void (GLAPIENTRY *attrib_func)( GLuint indx, const void *data );
 
 typedef struct {
-   const struct gl_vertex_attrib_array *array;
+   const struct gl_array_attributes *array;
    const struct gl_vertex_buffer_binding *binding;
    attrib_func func;
    GLuint index;
@@ -65,7 +65,7 @@ typedef struct {
 typedef struct {
    AEarray arrays[32];
    AEattrib attribs[VERT_ATTRIB_MAX + 1];
-   GLuint NewState;
+   GLbitfield NewState;
 
    /* List of VBOs we need to map before executing ArrayElements */
    struct gl_buffer_object *vbo[VERT_ATTRIB_MAX];
@@ -1288,7 +1288,7 @@ VertexAttribL4dv(GLuint index, const GLdouble *v)
  * Array [unnormalized/normalized/integer][size][type] of VertexAttrib
  * functions
  */
-static attrib_func AttribFuncsARB[4][4][NUM_TYPES] = {
+static const attrib_func AttribFuncsARB[4][4][NUM_TYPES] = {
    {
       /* non-normalized */
       {
@@ -1566,7 +1566,7 @@ _ae_update_state(struct gl_context *ctx)
    /* conventional vertex arrays */
    if (vao->VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
       aa->array = &vao->VertexAttrib[VERT_ATTRIB_COLOR_INDEX];
-      aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+      aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
       aa->offset = IndexFuncs[TYPE_IDX(aa->array->Type)];
       check_vbo(actx, aa->binding->BufferObj);
       aa++;
@@ -1574,7 +1574,7 @@ _ae_update_state(struct gl_context *ctx)
 
    if (vao->VertexAttrib[VERT_ATTRIB_EDGEFLAG].Enabled) {
       aa->array = &vao->VertexAttrib[VERT_ATTRIB_EDGEFLAG];
-      aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+      aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
       aa->offset = _gloffset_EdgeFlagv;
       check_vbo(actx, aa->binding->BufferObj);
       aa++;
@@ -1582,7 +1582,7 @@ _ae_update_state(struct gl_context *ctx)
 
    if (vao->VertexAttrib[VERT_ATTRIB_NORMAL].Enabled) {
       aa->array = &vao->VertexAttrib[VERT_ATTRIB_NORMAL];
-      aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+      aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
       aa->offset = NormalFuncs[TYPE_IDX(aa->array->Type)];
       check_vbo(actx, aa->binding->BufferObj);
       aa++;
@@ -1590,7 +1590,7 @@ _ae_update_state(struct gl_context *ctx)
 
    if (vao->VertexAttrib[VERT_ATTRIB_COLOR0].Enabled) {
       aa->array = &vao->VertexAttrib[VERT_ATTRIB_COLOR0];
-      aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+      aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
       aa->offset = ColorFuncs[aa->array->Size-3][TYPE_IDX(aa->array->Type)];
       check_vbo(actx, aa->binding->BufferObj);
       aa++;
@@ -1598,7 +1598,7 @@ _ae_update_state(struct gl_context *ctx)
 
    if (vao->VertexAttrib[VERT_ATTRIB_COLOR1].Enabled) {
       aa->array = &vao->VertexAttrib[VERT_ATTRIB_COLOR1];
-      aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+      aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
       aa->offset = SecondaryColorFuncs[TYPE_IDX(aa->array->Type)];
       check_vbo(actx, aa->binding->BufferObj);
       aa++;
@@ -1606,21 +1606,21 @@ _ae_update_state(struct gl_context *ctx)
 
    if (vao->VertexAttrib[VERT_ATTRIB_FOG].Enabled) {
       aa->array = &vao->VertexAttrib[VERT_ATTRIB_FOG];
-      aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+      aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
       aa->offset = FogCoordFuncs[TYPE_IDX(aa->array->Type)];
       check_vbo(actx, aa->binding->BufferObj);
       aa++;
    }
 
    for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
-      struct gl_vertex_attrib_array *attribArray =
+      struct gl_array_attributes *attribArray =
          &vao->VertexAttrib[VERT_ATTRIB_TEX(i)];
       if (attribArray->Enabled) {
          /* NOTE: we use generic glVertexAttribNV functions here.
           * If we ever remove GL_NV_vertex_program this will have to change.
           */
          at->array = attribArray;
-         at->binding = &vao->VertexBinding[attribArray->VertexBinding];
+         at->binding = &vao->BufferBinding[attribArray->BufferBindingIndex];
          assert(!at->array->Normalized);
          at->func = AttribFuncsNV[at->array->Normalized]
                                  [at->array->Size-1]
@@ -1633,12 +1633,12 @@ _ae_update_state(struct gl_context *ctx)
 
    /* generic vertex attribute arrays */
    for (i = 1; i < VERT_ATTRIB_GENERIC_MAX; i++) {  /* skip zero! */
-      struct gl_vertex_attrib_array *attribArray =
+      struct gl_array_attributes *attribArray =
          &vao->VertexAttrib[VERT_ATTRIB_GENERIC(i)];
       if (attribArray->Enabled) {
          GLint intOrNorm;
          at->array = attribArray;
-         at->binding = &vao->VertexBinding[attribArray->VertexBinding];
+         at->binding = &vao->BufferBinding[attribArray->BufferBindingIndex];
          /* Note: we can't grab the _glapi_Dispatch->VertexAttrib1fvNV
           * function pointer here (for float arrays) since the pointer may
           * change from one execution of _ae_ArrayElement() to
@@ -1669,7 +1669,7 @@ _ae_update_state(struct gl_context *ctx)
        * issued as the last (provoking) attribute).
        */
       aa->array = &vao->VertexAttrib[VERT_ATTRIB_GENERIC0];
-      aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+      aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
       assert(aa->array->Size >= 2); /* XXX fix someday? */
       aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
       check_vbo(actx, aa->binding->BufferObj);
@@ -1677,7 +1677,7 @@ _ae_update_state(struct gl_context *ctx)
    }
    else if (vao->VertexAttrib[VERT_ATTRIB_POS].Enabled) {
       aa->array = &vao->VertexAttrib[VERT_ATTRIB_POS];
-      aa->binding = &vao->VertexBinding[aa->array->VertexBinding];
+      aa->binding = &vao->BufferBinding[aa->array->BufferBindingIndex];
       aa->offset = VertexFuncs[aa->array->Size-2][TYPE_IDX(aa->array->Type)];
       check_vbo(actx, aa->binding->BufferObj);
       aa++;
@@ -1802,7 +1802,7 @@ _ae_ArrayElement(GLint elt)
 
 
 void
-_ae_invalidate_state(struct gl_context *ctx, GLuint new_state)
+_ae_invalidate_state(struct gl_context *ctx, GLbitfield new_state)
 {
    AEcontext *actx = AE_CONTEXT(ctx);