*/
+#include "main/errors.h"
#include "main/imports.h"
#include "main/image.h"
#include "main/bufferobj.h"
unsigned i;
unsigned start = 0;
- /* The initial pushdown of the inputs array into the drivers */
- _mesa_set_drawing_arrays(ctx, st->draw_arrays.inputs);
- _vbo_update_inputs(ctx, &st->draw_arrays);
-
prepare_draw(st, ctx);
if (st->vertex_array_out_of_memory)
info.vertices_per_patch = ctx->TessCtrlProgram.patch_vertices;
info.indirect = NULL;
info.count_from_stream_output = NULL;
+ info.restart_index = 0;
if (ib) {
struct gl_buffer_object *bufobj = ib->obj;
/* indices are in a real VBO */
info.has_user_indices = false;
info.index.resource = st_buffer_object(bufobj)->buffer;
+
+ /* Return if the bound element array buffer doesn't have any backing
+ * storage. (nothing to do)
+ */
+ if (!info.index.resource)
+ return;
+
start = pointer_to_offset(ib->ptr) / info.index_size;
} else {
/* indices are in user space memory */
struct pipe_draw_info info;
struct pipe_draw_indirect_info indirect;
- /* The initial pushdown of the inputs array into the drivers */
- _mesa_set_drawing_arrays(ctx, st->draw_arrays.inputs);
- _vbo_update_inputs(ctx, &st->draw_arrays);
-
assert(stride);
prepare_draw(st, ctx);
u_upload_unmap(st->pipe->stream_uploader);
- /* At the time of writing, cso_get_aux_vertex_buffer_slot() always returns
- * zero. If that ever changes we need to audit the calls to that function
- * and make sure the slot number is used consistently everywhere.
- */
- assert(cso_get_aux_vertex_buffer_slot(st->cso_context) == 0);
-
- cso_set_vertex_buffers(st->cso_context,
- cso_get_aux_vertex_buffer_slot(st->cso_context),
- 1, &vb);
+ cso_set_vertex_buffers(st->cso_context, 0, 1, &vb);
if (num_instances > 1) {
cso_draw_arrays_instanced(st->cso_context, PIPE_PRIM_TRIANGLE_FAN, 0, 4,