From b9e2cde6006b557a3a23a82384899f4d5a5ac7b8 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 15 Feb 2011 05:43:44 +0100 Subject: r300g: offload the CS ioctl to another thread This is a multi-threading optimization which hides the kernel overhead behind a thread. It improves performance in CPU-limited apps by 2-15%. Of course you must have at least 2 cores for it to make any difference. It can be disabled with: export RADEON_THREAD=0 --- src/gallium/drivers/r300/r300_flush.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/drivers/r300/r300_flush.c') diff --git a/src/gallium/drivers/r300/r300_flush.c b/src/gallium/drivers/r300/r300_flush.c index bfc15ceae72..c4bb332aec3 100644 --- a/src/gallium/drivers/r300/r300_flush.c +++ b/src/gallium/drivers/r300/r300_flush.c @@ -94,6 +94,10 @@ static void r300_flush(struct pipe_context* pipe, r300->rws->cs_flush(r300->cs); } } + + if (flags & PIPE_FLUSH_FRAME) { + r300->rws->cs_sync_flush(r300->cs); + } } void r300_init_flush_functions(struct r300_context* r300) -- cgit v1.2.3