From e1d4781cd49cd6df2fed171ad6e034f576f219a8 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 16 Jan 2010 00:08:54 -0800 Subject: st/mesa: Remove unnecessary headers from st_cb_bitmap.c. --- src/mesa/state_tracker/st_cb_bitmap.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/mesa/state_tracker/st_cb_bitmap.c') diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 1960d171bf..4b85bf2e16 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -34,9 +34,7 @@ #include "main/image.h" #include "main/bufferobj.h" #include "main/macros.h" -#include "main/texformat.h" #include "shader/program.h" -#include "shader/prog_parameter.h" #include "shader/prog_print.h" #include "st_context.h" @@ -44,15 +42,12 @@ #include "st_atom_constbuf.h" #include "st_program.h" #include "st_cb_bitmap.h" -#include "st_cb_program.h" -#include "st_mesa_to_tgsi.h" #include "st_texture.h" #include "st_inlines.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" #include "pipe/p_inlines.h" -#include "util/u_tile.h" #include "util/u_draw_quad.h" #include "util/u_simple_shaders.h" #include "shader/prog_instruction.h" -- cgit v1.2.3 From 8410f7cde30cc1170ae266cf3a0eb7e0e37c454a Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 21 Jan 2010 09:42:05 -0800 Subject: 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(-) (limited to 'src/mesa/state_tracker/st_cb_bitmap.c') diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 4b85bf2e16..8602f6d32b 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 7c0d74acb5..3aa4b03159 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 a41cfeb96f..dccc46f12d 100644 --- a/src/mesa/state_tracker/st_inlines.h +++ b/src/mesa/state_tracker/st_inlines.h @@ -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, -- cgit v1.2.3