From b939f83eb7af8f818c638453b2d2522b2362a831 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 30 Jun 2010 00:02:27 +0200 Subject: r300g: add workaround for multiple contexts --- src/gallium/drivers/r300/r300_screen_buffer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gallium/drivers/r300/r300_screen_buffer.c') diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c index 7959e6a2f9..f49f36b626 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.c +++ b/src/gallium/drivers/r300/r300_screen_buffer.c @@ -178,7 +178,14 @@ r300_buffer_transfer_map( struct pipe_context *pipe, } } } + just_map: + /* XXX buffer_map might flush. + * We cannot flush here because there is a buffer manager between + * the context and winsys, and it does some magic to make the driver + * fast. This is a workaround for the case of multiple contexts. */ + rws->set_flush_cb(rws, r300_flush_cb, pipe); + map = rws->buffer_map(rws, rbuf->buf, transfer->usage); if (map == NULL) -- cgit v1.2.3