summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/radeon/drm/radeon_winsys.h
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-12-24 08:15:40 +0100
committerMarek Olšák <maraeo@gmail.com>2011-12-24 21:28:43 +0100
commit93f4e3cb6c1ca303ee1f5c2a2491a8eff33f2633 (patch)
treec6515ad448336db16756adba362412b025ce8cde /src/gallium/winsys/radeon/drm/radeon_winsys.h
parente6e9becd5016df649d3c19a3e81e85bd63b895b7 (diff)
winsys/radeon: move managing GEM domains back to drivers
This partially reverts commit 363ff844753c46ac9c13866627e096b091ea81f8. It caused severe performance drops in Nexuiz. Reported by Phoronix. Tested by me on r300g and by IRC people on r600g.
Diffstat (limited to 'src/gallium/winsys/radeon/drm/radeon_winsys.h')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_winsys.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index ea335d87113..59c1aad3308 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -58,6 +58,11 @@ enum radeon_bo_layout {
RADEON_LAYOUT_UNKNOWN
};
+enum radeon_bo_domain { /* bitfield */
+ RADEON_DOMAIN_GTT = 2,
+ RADEON_DOMAIN_VRAM = 4
+};
+
enum radeon_bo_usage { /* bitfield */
RADEON_USAGE_READ = 2,
RADEON_USAGE_WRITE = 4,
@@ -137,13 +142,14 @@ struct radeon_winsys {
* \param size The size to allocate.
* \param alignment An alignment of the buffer in memory.
* \param bind A bitmask of the PIPE_BIND_* flags.
- * \param usage A bitmask of the PIPE_USAGE_* flags.
+ * \param domain A bitmask of the RADEON_DOMAIN_* flags.
* \return The created buffer object.
*/
struct pb_buffer *(*buffer_create)(struct radeon_winsys *ws,
unsigned size,
unsigned alignment,
- unsigned bind, unsigned usage);
+ unsigned bind,
+ enum radeon_bo_domain domain);
struct radeon_winsys_cs_handle *(*buffer_get_cs_handle)(
struct pb_buffer *buf);
@@ -271,12 +277,14 @@ struct radeon_winsys {
*
* \param cs A command stream to add buffer for validation against.
* \param buf A winsys buffer to validate.
- * \param usage Whether the buffer is used for read and/or write.
+ * \param usage Whether the buffer is used for read and/or write.
+ * \param domain Bitmask of the RADEON_DOMAIN_* flags.
* \return Relocation index.
*/
unsigned (*cs_add_reloc)(struct radeon_winsys_cs *cs,
struct radeon_winsys_cs_handle *buf,
- enum radeon_bo_usage usage);
+ enum radeon_bo_usage usage,
+ enum radeon_bo_domain domain);
/**
* Return TRUE if there is enough memory in VRAM and GTT for the relocs