i965: Use isl_aux_state_transition_write()
[mesa.git] / src / mesa / vbo / vbo_save_loopback.c
index 5d4d9c574e5ea7018e72a539bf0927c5120687ec..26a9f94facbe27fd0b611a1fe1c097202a076efd 100644 (file)
@@ -133,37 +133,13 @@ loopback_prim(struct gl_context *ctx,
 }
 
 
-/**
- * Primitives generated by DrawArrays/DrawElements/Rectf may be
- * caught here.  If there is no primitive in progress, execute them
- * normally, otherwise need to track and discard the generated
- * primitives.
- */
-static void
-loopback_weak_prim(struct gl_context *ctx,
-                   const struct _mesa_prim *prim)
-{
-   /* Use the prim_weak flag to ensure that if this primitive
-    * wraps, we don't mistake future vertex_lists for part of the
-    * surrounding primitive.
-    *
-    * While this flag is set, we are simply disposing of data
-    * generated by an operation now known to be a noop.
-    */
-   if (prim->begin)
-      ctx->Driver.CurrentExecPrimitive |= VBO_SAVE_PRIM_WEAK;
-   if (prim->end)
-      ctx->Driver.CurrentExecPrimitive &= ~VBO_SAVE_PRIM_WEAK;
-}
-
-
 static inline void
 append_attr(GLuint *nr, struct loopback_attr la[], int i, int shift,
             const struct gl_vertex_array_object *vao)
 {
    la[*nr].index = shift + i;
    la[*nr].offset = vao->VertexAttrib[i].RelativeOffset;
-   la[*nr].func = vert_attrfunc[vao->VertexAttrib[i].Size - 1];
+   la[*nr].func = vert_attrfunc[vao->VertexAttrib[i].Format.Size - 1];
    (*nr)++;
 }
 
@@ -179,23 +155,23 @@ _vbo_loopback_vertex_list(struct gl_context *ctx,
     * the NV attributes entrypoints:
     */
    const struct gl_vertex_array_object *vao = node->VAO[VP_MODE_FF];
-   GLbitfield mask = vao->_Enabled & VERT_BIT_MAT_ALL;
+   GLbitfield mask = vao->Enabled & VERT_BIT_MAT_ALL;
    while (mask) {
       const int i = u_bit_scan(&mask);
       append_attr(&nr, la, i, VBO_MATERIAL_SHIFT, vao);
    }
 
    vao = node->VAO[VP_MODE_SHADER];
-   mask = vao->_Enabled & ~(VERT_BIT_POS | VERT_BIT_GENERIC0);
+   mask = vao->Enabled & ~(VERT_BIT_POS | VERT_BIT_GENERIC0);
    while (mask) {
       const int i = u_bit_scan(&mask);
       append_attr(&nr, la, i, 0, vao);
    }
 
    /* The last in the list should be the vertex provoking attribute */
-   if (vao->_Enabled & VERT_BIT_GENERIC0) {
+   if (vao->Enabled & VERT_BIT_GENERIC0) {
       append_attr(&nr, la, VERT_ATTRIB_GENERIC0, 0, vao);
-   } else if (vao->_Enabled & VERT_BIT_POS) {
+   } else if (vao->Enabled & VERT_BIT_POS) {
       append_attr(&nr, la, VERT_ATTRIB_POS, 0, vao);
    }
 
@@ -227,10 +203,6 @@ _vbo_loopback_vertex_list(struct gl_context *ctx,
    const struct _mesa_prim *prims = node->prims;
    const GLuint prim_count = node->prim_count;
    for (GLuint i = 0; i < prim_count; i++) {
-      if ((0) && _mesa_inside_begin_end(ctx)) {
-         loopback_weak_prim(ctx, &prims[i]);
-      } else {
-         loopback_prim(ctx, buffer, &prims[i], wrap_count, stride, la, nr);
-      }
+      loopback_prim(ctx, buffer, &prims[i], wrap_count, stride, la, nr);
    }
 }