r300g: decide whether a flush should be asynchronous when calling it
[mesa.git] / src / gallium / drivers / r300 / r300_context.c
index 48a595981be6288ce46d711f4516ffd9d4daa036..720d666d98c7253180f5c6ad8976731e09aabc6e 100644 (file)
@@ -139,11 +139,11 @@ static void r300_destroy_context(struct pipe_context* context)
     FREE(r300);
 }
 
-void r300_flush_cb(void *data)
+static void r300_flush_callback(void *data, unsigned flags)
 {
     struct r300_context* const cs_context_copy = data;
 
-    cs_context_copy->context.flush(&cs_context_copy->context, 0, NULL);
+    r300_flush(&cs_context_copy->context, flags, NULL);
 }
 
 #define R300_INIT_ATOM(atomname, atomsize) \
@@ -453,7 +453,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
     r300_init_render_functions(r300);
     r300_init_states(&r300->context);
 
-    rws->cs_set_flush(r300->cs, r300_flush_cb, r300);
+    rws->cs_set_flush(r300->cs, r300_flush_callback, r300);
 
     /* The KIL opcode needs the first texture unit to be enabled
      * on r3xx-r4xx. In order to calm down the CS checker, we bind this