summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon/drm
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-12-09 00:02:46 +0100
committerMarek Olšák <[email protected]>2012-12-12 13:09:54 +0100
commit448cd5ea60403576c3eec86ffb2b892e78b9dfe0 (patch)
tree395a69bf618864ee3af1263a5531fea7a3c64f01 /src/gallium/winsys/radeon/drm
parent1d0bf69f831e138a05a282e59746f20141046fd6 (diff)
winsys/radeon: don't use BIND flags, add a flag for the cache bufmgr instead
Diffstat (limited to 'src/gallium/winsys/radeon/drm')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c5
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_winsys.h4
2 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 090a6faf50d..07e92c591b5 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -813,7 +813,7 @@ static struct pb_buffer *
radeon_winsys_bo_create(struct radeon_winsys *rws,
unsigned size,
unsigned alignment,
- unsigned bind,
+ boolean use_reusable_pool,
enum radeon_bo_domain domain)
{
struct radeon_drm_winsys *ws = radeon_drm_winsys(rws);
@@ -829,8 +829,7 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
desc.initial_domains = domain;
/* Assign a buffer manager. */
- if (bind & (PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_INDEX_BUFFER |
- PIPE_BIND_CONSTANT_BUFFER | PIPE_BIND_CUSTOM))
+ if (use_reusable_pool)
provider = ws->cman;
else
provider = ws->kman;
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index 8e4693be92a..b7eac3cfc1b 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -142,14 +142,14 @@ struct radeon_winsys {
* \param ws The winsys this function is called from.
* \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 use_reusable_pool Whether the cache buffer manager should be used.
* \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,
+ boolean use_reusable_pool,
enum radeon_bo_domain domain);
struct radeon_winsys_cs_handle *(*buffer_get_cs_handle)(