summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-04-22 22:58:38 -0500
committerNicolai Hähnle <[email protected]>2016-04-27 11:16:41 -0500
commit562c4a17b7e4fb56c7db679233b4a48f8b80b0f2 (patch)
treea8a7d2656ea3cb4e708d81a436d89af986e9925e /src/gallium/winsys
parent13acf2b24375af40b62571d5f07c75342c1acb14 (diff)
winsys/radeon: remove use_reusable_pool parameter from buffer_create
All callers set this parameter to true. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_bo.c14
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_cs.c2
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c11
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_cs.c2
4 files changed, 11 insertions, 18 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
index 036301ef089..691d9c2f53b 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
@@ -456,7 +456,6 @@ static struct pb_buffer *
amdgpu_bo_create(struct radeon_winsys *rws,
uint64_t size,
unsigned alignment,
- boolean use_reusable_pool,
enum radeon_bo_domain domain,
enum radeon_bo_flag flags)
{
@@ -481,13 +480,10 @@ amdgpu_bo_create(struct radeon_winsys *rws,
usage |= 1 << (flags + 3);
/* Get a buffer from the cache. */
- if (use_reusable_pool) {
- bo = (struct amdgpu_winsys_bo*)
- pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment,
- usage);
- if (bo)
- return &bo->base;
- }
+ bo = (struct amdgpu_winsys_bo*)
+ pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage);
+ if (bo)
+ return &bo->base;
/* Create a new one. */
bo = amdgpu_create_bo(ws, size, alignment, usage, domain, flags);
@@ -499,7 +495,7 @@ amdgpu_bo_create(struct radeon_winsys *rws,
return NULL;
}
- bo->use_reusable_pool = use_reusable_pool;
+ bo->use_reusable_pool = true;
return &bo->base;
}
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
index 69fb9bb4f9d..8f50f358751 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
@@ -236,7 +236,7 @@ static bool amdgpu_get_new_ib(struct radeon_winsys *ws, struct amdgpu_ib *ib,
ib->used_ib_space = 0;
ib->big_ib_buffer = ws->buffer_create(ws, buffer_size,
- 4096, true,
+ 4096,
RADEON_DOMAIN_GTT,
RADEON_FLAG_CPU_ACCESS);
if (!ib->big_ib_buffer)
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index dd6555c9502..2c3098e4695 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -720,7 +720,6 @@ static struct pb_buffer *
radeon_winsys_bo_create(struct radeon_winsys *rws,
uint64_t size,
unsigned alignment,
- boolean use_reusable_pool,
enum radeon_bo_domain domain,
enum radeon_bo_flag flags)
{
@@ -748,11 +747,9 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
assert(flags < sizeof(usage) * 8 - 3);
usage |= 1 << (flags + 3);
- if (use_reusable_pool) {
- bo = radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage));
- if (bo)
- return &bo->base;
- }
+ bo = radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage));
+ if (bo)
+ return &bo->base;
bo = radeon_create_bo(ws, size, alignment, usage, domain, flags);
if (!bo) {
@@ -763,7 +760,7 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
return NULL;
}
- bo->use_reusable_pool = use_reusable_pool;
+ bo->use_reusable_pool = true;
pipe_mutex_lock(ws->bo_handles_mutex);
util_hash_table_set(ws->bo_handles, (void*)(uintptr_t)bo->handle, bo);
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
index 6b2694c6938..11ea9bbe80b 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -638,7 +638,7 @@ radeon_cs_create_fence(struct radeon_winsys_cs *rcs)
struct pb_buffer *fence;
/* Create a fence, which is a dummy BO. */
- fence = cs->ws->base.buffer_create(&cs->ws->base, 1, 1, TRUE,
+ fence = cs->ws->base.buffer_create(&cs->ws->base, 1, 1,
RADEON_DOMAIN_GTT, 0);
/* Add the fence as a dummy relocation. */
cs->ws->base.cs_add_buffer(rcs, fence,