dri/nouveau: Split big client buffers in the indexed case too.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 7 Mar 2010 18:12:27 +0000 (19:12 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Sun, 7 Mar 2010 21:40:11 +0000 (22:40 +0100)
src/mesa/drivers/dri/nouveau/nouveau_vbo_t.c

index 69a9b96f0ca360c7e7e2844c6cc1e3d4a3a0dad1..a365b977f294c08afc77647fcf68377e5e73ef71 100644 (file)
@@ -281,14 +281,13 @@ vbo_maybe_split(GLcontext *ctx, const struct gl_client_array **arrays,
        int stride;
 
        /* Try to keep client buffers smaller than the scratch BOs. */
-       if (!ib && render->mode == VBO &&
+       if (render->mode == VBO &&
            (stride = get_max_client_stride(ctx)))
                    vert_avail = MIN2(vert_avail,
                                      RENDER_SCRATCH_SIZE / stride);
 
-
-       if ((ib && ib->count > idx_avail) ||
-           (!ib && max_index - min_index > vert_avail)) {
+       if (max_index - min_index > vert_avail ||
+           (ib && ib->count > idx_avail)) {
                struct split_limits limits = {
                        .max_verts = vert_avail,
                        .max_indices = idx_avail,