r300g/swtcl: flush draw to avoid the rejection of CS
authorMarek Olšák <maraeo@gmail.com>
Sun, 16 May 2010 02:09:07 +0000 (04:09 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 16 May 2010 02:10:50 +0000 (04:10 +0200)
src/gallium/drivers/r300/r300_render.c

index 667f813fad5c3214e63f881b32fd7f1fa8731468..16d0d9476b13c8f8ffea31aa785bd685610fac9f 100644 (file)
@@ -749,6 +749,10 @@ void r300_swtcl_draw_arrays(struct pipe_context* pipe,
 
     draw_arrays(r300->draw, mode, start, count);
 
+    /* XXX Not sure whether this is the best fix.
+     * It prevents CS from being rejected and weird assertion failures. */
+    draw_flush(r300->draw);
+
     for (i = 0; i < r300->vertex_buffer_count; i++) {
         pipe_buffer_unmap(pipe, r300->vertex_buffer[i].buffer,
                          vb_transfer[i]);
@@ -798,6 +802,10 @@ void r300_swtcl_draw_range_elements(struct pipe_context* pipe,
 
     draw_arrays(r300->draw, mode, start, count);
 
+    /* XXX Not sure whether this is the best fix.
+     * It prevents CS from being rejected and weird assertion failures. */
+    draw_flush(r300->draw);
+
     for (i = 0; i < r300->vertex_buffer_count; i++) {
         pipe_buffer_unmap(pipe, r300->vertex_buffer[i].buffer,
                          vb_transfer[i]);