radeonsi: don't use util_draw_arrays_instanced in si_draw_rectangle
authorMarek Olšák <marek.olsak@amd.com>
Wed, 4 Oct 2017 23:54:30 +0000 (01:54 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Sat, 7 Oct 2017 16:26:35 +0000 (18:26 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_state_draw.c

index 43ad97adcb3b63c9a74ae87f493620e42d77303f..adebba645d4a7f3397ca5f464734ce65c9c1ecb0 100644 (file)
@@ -29,7 +29,6 @@
 #include "sid.h"
 #include "gfx9d.h"
 
-#include "util/u_draw.h"
 #include "util/u_index_modify.h"
 #include "util/u_log.h"
 #include "util/u_upload_mgr.h"
@@ -1565,8 +1564,13 @@ void si_draw_rectangle(struct blitter_context *blitter,
        vbuffer.buffer_offset = offset;
 
        pipe->set_vertex_buffers(pipe, blitter->vb_slot, 1, &vbuffer);
-       util_draw_arrays_instanced(pipe, R600_PRIM_RECTANGLE_LIST, 0, 3,
-                                  0, num_instances);
+
+       struct pipe_draw_info info = {};
+       info.mode = R600_PRIM_RECTANGLE_LIST;
+       info.count = 3;
+       info.instance_count = num_instances;
+
+       si_draw_vbo(pipe, &info);
        pipe_resource_reference(&buf, NULL);
 }