gallium: remove pipe_index_buffer and set_index_buffer
[mesa.git] / src / gallium / drivers / nouveau / nv50 / nv50_context.c
index d0729276e1d58ed9827f94c086825593f8c666f0..d2c37ac276d6cbe9d33ead4618efd62ac6f98026 100644 (file)
@@ -68,10 +68,6 @@ nv50_memory_barrier(struct pipe_context *pipe, unsigned flags)
             nv50->base.vbo_dirty = true;
       }
 
-      if (nv50->idxbuf.buffer &&
-          nv50->idxbuf.buffer->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT)
-         nv50->base.vbo_dirty = true;
-
       for (s = 0; s < 3 && !nv50->cb_dirty; ++s) {
          uint32_t valid = nv50->constbuf_valid[s];
 
@@ -146,8 +142,6 @@ nv50_context_unreference_resources(struct nv50_context *nv50)
    for (i = 0; i < nv50->num_vtxbufs; ++i)
       pipe_resource_reference(&nv50->vtxbuf[i].buffer.resource, NULL);
 
-   pipe_resource_reference(&nv50->idxbuf.buffer, NULL);
-
    for (s = 0; s < 3; ++s) {
       assert(nv50->num_textures[s] <= PIPE_MAX_SAMPLERS);
       for (i = 0; i < nv50->num_textures[s]; ++i)
@@ -238,14 +232,6 @@ nv50_invalidate_resource_storage(struct nouveau_context *ctx,
          }
       }
 
-      if (nv50->idxbuf.buffer == res) {
-         /* Just rebind to the bufctx as there is no separate dirty bit */
-         nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_3D_INDEX);
-         BCTX_REFN(nv50->bufctx_3d, 3D_INDEX, nv04_resource(res), RD);
-         if (!--ref)
-            return ref;
-      }
-
       for (s = 0; s < 3; ++s) {
       assert(nv50->num_textures[s] <= PIPE_MAX_SAMPLERS);
       for (i = 0; i < nv50->num_textures[s]; ++i) {