freedreno/ir3: add ctx->mem_to_mem()
[mesa.git] / src / gallium / drivers / r300 / r300_render.c
index ddd24523ca67dac43e3b76ffb2d647598305629f..211d35d06077bb9b57597ad8167d7b816477dee3 100644 (file)
@@ -216,7 +216,7 @@ static boolean r300_reserve_cs_dwords(struct r300_context *r300,
 
     /* Reserve requested CS space. */
     if (!r300->rws->cs_check_space(r300->cs, cs_dwords)) {
-        r300_flush(&r300->context, RADEON_FLUSH_ASYNC, NULL);
+        r300_flush(&r300->context, PIPE_FLUSH_ASYNC, NULL);
         flushed = TRUE;
     }
 
@@ -964,7 +964,7 @@ static void r300_render_release_vertices(struct vbuf_render* render)
 }
 
 static void r300_render_set_primitive(struct vbuf_render* render,
-                                      unsigned prim)
+                                      enum pipe_prim_type prim)
 {
     struct r300_render* r300render = r300_render(render);
 
@@ -1113,6 +1113,8 @@ struct draw_stage* r300_draw_stage(struct r300_context* r300)
  * would be computed and stored twice, which makes the clear/copy codepaths
  * somewhat inefficient. Instead we use a rectangular point sprite. */
 void r300_blitter_draw_rectangle(struct blitter_context *blitter,
+                                 void *vertex_elements_cso,
+                                 blitter_get_vs_func get_vs,
                                  int x1, int y1, int x2, int y2,
                                  float depth, unsigned num_instances,
                                  enum blitter_attrib_type type,
@@ -1134,14 +1136,18 @@ void r300_blitter_draw_rectangle(struct blitter_context *blitter,
     if ((!r300->screen->caps.has_tcl && type == UTIL_BLITTER_ATTRIB_NONE) ||
         type == UTIL_BLITTER_ATTRIB_TEXCOORD_XYZW ||
         num_instances > 1) {
-        util_blitter_draw_rectangle(blitter, x1, y1, x2, y2, depth,
-                                    num_instances, type, attrib);
+        util_blitter_draw_rectangle(blitter, vertex_elements_cso, get_vs,
+                                    x1, y1, x2, y2,
+                                    depth, num_instances, type, attrib);
         return;
     }
 
     if (r300->skip_rendering)
         return;
 
+    r300->context.bind_vertex_elements_state(&r300->context, vertex_elements_cso);
+    r300->context.bind_vs_state(&r300->context, get_vs(blitter));
+
     if (type == UTIL_BLITTER_ATTRIB_TEXCOORD_XY)
         r300->sprite_coord_enable = 1;