nv50,nvc0: clear index buffer bufctx bin unconditionally
[mesa.git] / src / gallium / drivers / nouveau / nv50 / nv50_vbo.c
index 37dca97c87052a0b79856ab831d9ec89e9e56b93..ac7d826786110609032927b754e920593e3bce74 100644 (file)
@@ -770,10 +770,9 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
    bool tex_dirty = false;
    int s;
 
-   if (info->index_size && !info->has_user_indices) {
-      nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_3D_INDEX);
+   nouveau_bufctx_reset(nv50->bufctx_3d, NV50_BIND_3D_INDEX);
+   if (info->index_size && !info->has_user_indices)
       BCTX_REFN(nv50->bufctx_3d, 3D_INDEX, nv04_resource(info->index.resource), RD);
-   }
 
    /* NOTE: caller must ensure that (min_index + index_bias) is >= 0 */
    nv50->vb_elt_first = info->min_index + info->index_bias;