diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-05-11 13:57:11 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-05-11 14:00:01 +0100 |
commit | b0427bedde80e3189524651a327235bdfddbc613 (patch) | |
tree | c41db798d6d4bbcbb7e07f20a39f828baa6df8d4 /src/mesa/state_tracker/st_cb_bitmap.c | |
parent | d99a7497ed383e0d7872b95f2aa63eff916680ea (diff) |
mesa/st: Remove internal flushes from Mesa state tracker.
Now that transfers are context operations it is the driver's
responsibility to ensure that transfers happen in order with all other
context operations, so flushes and finishes inside Mesa should be no
longer necessary. The attached patch implements that.
This should proportionate significant improvements for hardware drivers
which are able to stream transfers in the command buffers.
You can use the softpipe/llvmpipe_flush_resource() as reference
implementation of the worst case scenario, where the driver is not able
to streamline transfers. But the expectation is that driver
implementators will want to avoid flushing as much as possible.
Diffstat (limited to 'src/mesa/state_tracker/st_cb_bitmap.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 797c0ba7f5..6aefa7b7df 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -43,7 +43,6 @@ #include "st_program.h" #include "st_cb_bitmap.h" #include "st_texture.h" -#include "st_inlines.h" #include "pipe/p_context.h" #include "pipe/p_defines.h" @@ -282,7 +281,7 @@ make_bitmap_texture(GLcontext *ctx, GLsizei width, GLsizei height, return NULL; } - transfer = st_no_flush_get_tex_transfer(st, pt, 0, 0, 0, + transfer = pipe_get_transfer(st->pipe, pt, 0, 0, 0, PIPE_TRANSFER_WRITE, 0, 0, width, height); @@ -382,7 +381,7 @@ setup_bitmap_vertex_data(struct st_context *st, } /* put vertex data into vbuf */ - st_no_flush_pipe_buffer_write_nooverlap(st, + pipe_buffer_write_nooverlap(st->pipe, st->bitmap.vbuf, st->bitmap.vbuf_slot * sizeof st->bitmap.vertices, sizeof st->bitmap.vertices, @@ -579,7 +578,7 @@ create_cache_trans(struct st_context *st) /* Map the texture transfer. * Subsequent glBitmap calls will write into the texture image. */ - cache->trans = st_no_flush_get_tex_transfer(st, cache->texture, 0, 0, 0, + cache->trans = pipe_get_transfer(st->pipe, cache->texture, 0, 0, 0, PIPE_TRANSFER_WRITE, 0, 0, BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT); |