r300g: only check for an empty shader if there are no compile errors
[mesa.git] / src / gallium / drivers / softpipe / sp_state_vertex.c
index 462f4d2655ef7ba75c0a7189c4bddcbb63486ba7..b650fcaea5cb55797542c93e355873252af34169 100644 (file)
@@ -88,3 +88,17 @@ softpipe_set_vertex_buffers(struct pipe_context *pipe,
 
    draw_set_vertex_buffers(softpipe->draw, count, buffers);
 }
+
+void
+softpipe_set_index_buffer(struct pipe_context *pipe,
+                          const struct pipe_index_buffer *ib)
+{
+   struct softpipe_context *softpipe = softpipe_context(pipe);
+
+   if (ib)
+      memcpy(&softpipe->index_buffer, ib, sizeof(softpipe->index_buffer));
+   else
+      memset(&softpipe->index_buffer, 0, sizeof(softpipe->index_buffer));
+
+   draw_set_index_buffer(softpipe->draw, ib);
+}