From 448cd5ea60403576c3eec86ffb2b892e78b9dfe0 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sun, 9 Dec 2012 00:02:46 +0100 Subject: winsys/radeon: don't use BIND flags, add a flag for the cache bufmgr instead --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 5 ++--- src/gallium/winsys/radeon/drm/radeon_winsys.h | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/gallium/winsys/radeon') 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)( -- cgit v1.2.3