mesa: Use pipe_buffer_write_nooverlap where appropriate.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 21 Jan 2010 17:42:05 +0000 (09:42 -0800)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 21 Jan 2010 23:18:40 +0000 (15:18 -0800)
src/mesa/state_tracker/st_cb_bitmap.c
src/mesa/state_tracker/st_cb_clear.c
src/mesa/state_tracker/st_inlines.h

index 4b85bf2e169d8ae97ea048dc64d137c11bc35435..8602f6d32b4e1de87d27d252ec622eda3a16525e 100644 (file)
@@ -386,11 +386,11 @@ setup_bitmap_vertex_data(struct st_context *st,
    }
 
    /* put vertex data into vbuf */
-   st_no_flush_pipe_buffer_write(st,
-                                st->bitmap.vbuf,
-                                st->bitmap.vbuf_slot * sizeof st->bitmap.vertices,
-                                sizeof st->bitmap.vertices,
-                                st->bitmap.vertices);
+   st_no_flush_pipe_buffer_write_nooverlap(st,
+                                           st->bitmap.vbuf,
+                                           st->bitmap.vbuf_slot * sizeof st->bitmap.vertices,
+                                           sizeof st->bitmap.vertices,
+                                           st->bitmap.vertices);
 
    return st->bitmap.vbuf_slot++ * sizeof st->bitmap.vertices;
 }
index 7c0d74acb56f0116ccf5950af468ae7d3830e3d8..3aa4b03159a261cd49acdd95c2ce41641f2a811f 100644 (file)
@@ -162,10 +162,10 @@ draw_quad(GLcontext *ctx,
    }
 
    /* put vertex data into vbuf */
-   st_no_flush_pipe_buffer_write(st, st->clear.vbuf,
-                                st->clear.vbuf_slot * sizeof(st->clear.vertices),
-                                sizeof(st->clear.vertices),
-                                st->clear.vertices);
+   st_no_flush_pipe_buffer_write_nooverlap(st, st->clear.vbuf,
+                                           st->clear.vbuf_slot * sizeof(st->clear.vertices),
+                                           sizeof(st->clear.vertices),
+                                           st->clear.vertices);
 
    /* draw */
    util_draw_vertex_buffer(pipe, 
index a41cfeb96f7aec3918744b2d3f179422952ba6dc..dccc46f12d7d32039405ebedbb3051e573a7e30f 100644 (file)
@@ -125,6 +125,16 @@ st_no_flush_pipe_buffer_write(struct st_context *st,
    pipe_buffer_write(st->pipe->screen, buf, offset, size, data);
 }
 
+static INLINE void
+st_no_flush_pipe_buffer_write_nooverlap(struct st_context *st,
+                                        struct pipe_buffer *buf,
+                                        unsigned int offset,
+                                        unsigned int size,
+                                        const void * data)
+{
+   pipe_buffer_write_nooverlap(st->pipe->screen, buf, offset, size, data);
+}
+
 static INLINE void
 st_cond_flush_pipe_buffer_read(struct st_context *st,
                               struct pipe_buffer *buf,