r300g: validate buffers when using SWTCL
authorMarek Olšák <maraeo@gmail.com>
Sun, 7 Mar 2010 01:40:57 +0000 (02:40 +0100)
committerMarek Olšák <maraeo@gmail.com>
Sun, 7 Mar 2010 01:44:57 +0000 (02:44 +0100)
src/gallium/drivers/r300/r300_render.c

index 073664fa451030d5b85d741890a12518c9f0522c..c8420bcdd5be0fb28b9e3f565187a777eb2abd09 100644 (file)
@@ -186,7 +186,7 @@ static void r300_emit_draw_arrays_immediate(struct r300_context *r300,
     dwords = 10 + count * vertex_size;
 
     r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + dwords);
-    r300_emit_buffer_validate(r300, FALSE, 0);
+    r300_emit_buffer_validate(r300, FALSE, NULL);
     r300_emit_dirty_state(r300);
 
     BEGIN_CS(dwords);
@@ -450,7 +450,7 @@ void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
         /* Make sure there are at least 128 spare dwords in the command buffer.
          * (most of it being consumed by emit_aos) */
         r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + 128);
-        r300_emit_buffer_validate(r300, TRUE, 0);
+        r300_emit_buffer_validate(r300, TRUE, NULL);
         r300_emit_dirty_state(r300);
 
         if (alt_num_verts || count <= 65535) {
@@ -468,7 +468,7 @@ void r300_draw_arrays(struct pipe_context* pipe, unsigned mode,
                 /* Again, we emit both AOS and draw_arrays so there should be
                  * at least 128 spare dwords. */
                 if (count && r300_reserve_cs_space(r300, 128)) {
-                    r300_emit_buffer_validate(r300, TRUE, 0);
+                    r300_emit_buffer_validate(r300, TRUE, NULL);
                     r300_emit_dirty_state(r300);
                 }
             } while (count);
@@ -688,6 +688,7 @@ static void r300_render_draw_arrays(struct vbuf_render* render,
     CS_LOCALS(r300);
 
     r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + 2);
+    r300_emit_buffer_validate(r300, FALSE, NULL);
     r300_emit_dirty_state(r300);
 
     DBG(r300, DBG_DRAW, "r300: Doing vbuf render, count %d\n", count);
@@ -711,6 +712,7 @@ static void r300_render_draw(struct vbuf_render* render,
     CS_LOCALS(r300);
 
     r300_reserve_cs_space(r300, r300_get_num_dirty_dwords(r300) + dwords);
+    r300_emit_buffer_validate(r300, FALSE, NULL);
     r300_emit_dirty_state(r300);
 
     BEGIN_CS(dwords);