Mesa (mesa_7_7_branch): mesa: Use pipe_buffer_write_nooverlap where appropriate.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu Jan 21 23:27:44 UTC 2010


Module: Mesa
Branch: mesa_7_7_branch
Commit: 8410f7cde30cc1170ae266cf3a0eb7e0e37c454a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8410f7cde30cc1170ae266cf3a0eb7e0e37c454a

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu Jan 21 09:42:05 2010 -0800

mesa: Use pipe_buffer_write_nooverlap where appropriate.

---

 src/mesa/state_tracker/st_cb_bitmap.c |   10 +++++-----
 src/mesa/state_tracker/st_cb_clear.c  |    8 ++++----
 src/mesa/state_tracker/st_inlines.h   |   10 ++++++++++
 3 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index 4b85bf2..8602f6d 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -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;
 }
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 7c0d74a..3aa4b03 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -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, 
diff --git a/src/mesa/state_tracker/st_inlines.h b/src/mesa/state_tracker/st_inlines.h
index a41cfeb..dccc46f 100644
--- a/src/mesa/state_tracker/st_inlines.h
+++ b/src/mesa/state_tracker/st_inlines.h
@@ -126,6 +126,16 @@ st_no_flush_pipe_buffer_write(struct st_context *st,
 }
 
 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,
 			       unsigned int offset,




More information about the mesa-commit mailing list