diff options
author | Marek Olšák <[email protected]> | 2011-02-15 05:43:44 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-02-15 09:17:39 +0100 |
commit | b9e2cde6006b557a3a23a82384899f4d5a5ac7b8 (patch) | |
tree | a71d951e991ee3161fa1c2acc15ec58a79056caa /src/gallium/drivers/r300/r300_winsys.h | |
parent | 8e0437914bb786d0b05be8f95e4ff37bf5a19f44 (diff) |
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
Diffstat (limited to 'src/gallium/drivers/r300/r300_winsys.h')
-rw-r--r-- | src/gallium/drivers/r300/r300_winsys.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h index bf1dd5c980e..6733253ccc9 100644 --- a/src/gallium/drivers/r300/r300_winsys.h +++ b/src/gallium/drivers/r300/r300_winsys.h @@ -45,8 +45,8 @@ struct r300_winsys_screen; struct r300_winsys_cs_handle; /* for write_reloc etc. */ struct r300_winsys_cs { - unsigned cdw; /* Number of used dwords. */ - uint32_t buf[R300_MAX_CMDBUF_DWORDS]; /* The command buffer. */ + unsigned cdw; /* Number of used dwords. */ + uint32_t *buf; /* The command buffer. */ }; enum r300_value_id { @@ -269,6 +269,13 @@ struct r300_winsys_screen { void (*cs_flush)(struct r300_winsys_cs *cs); /** + * Wait until the last flush is completed. + * + * \param cs A command stream. + */ + void (*cs_sync_flush)(struct r300_winsys_cs *cs); + + /** * Set a flush callback which is called from winsys when flush is * required. * |