Browse Source

r300g: add workaround for multiple contexts

tags/mesa-7.9-rc1
Marek Olšák 15 years ago
parent
commit
b939f83eb7

+ 1
- 1
src/gallium/drivers/r300/r300_context.c View File

@@ -121,7 +121,7 @@ static void r300_destroy_context(struct pipe_context* context)
FREE(r300);
}

static void r300_flush_cb(void *data)
void r300_flush_cb(void *data)
{
struct r300_context* const cs_context_copy = data;


+ 1
- 0
src/gallium/drivers/r300/r300_context.h View File

@@ -564,6 +564,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,

boolean r300_check_cs(struct r300_context *r300, unsigned size);
void r300_finish(struct r300_context *r300);
void r300_flush_cb(void *data);

/* Context initialization. */
struct draw_stage* r300_draw_stage(struct r300_context* r300);

+ 7
- 0
src/gallium/drivers/r300/r300_screen_buffer.c View File

@@ -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)

Loading…
Cancel
Save