From 562c4a17b7e4fb56c7db679233b4a48f8b80b0f2 Mon Sep 17 00:00:00 2001 From: Nicolai Hähnle Date: Fri, 22 Apr 2016 22:58:38 -0500 Subject: winsys/radeon: remove use_reusable_pool parameter from buffer_create MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All callers set this parameter to true. Reviewed-by: Marek Olšák --- src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 14 +++++--------- src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'src/gallium/winsys/amdgpu/drm') 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) -- cgit v1.2.3