diff options
author | Marek Olšák <[email protected]> | 2016-07-17 00:53:55 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-07-19 23:45:06 +0200 |
commit | 3cdc0e133f77b5095525d23a30827b40954be1c7 (patch) | |
tree | 49275e3869a2430f1ff4ce5d0605140796534cc9 /src/gallium/winsys | |
parent | fec7f74129622f846c79edc3a6b050db62c89554 (diff) |
gallium/pb_cache: divide the cache into buckets for reducing cache misses
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 4 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index b4dc6c7901a..3545b78f769 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -303,7 +303,7 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *ws, return NULL; } - pb_cache_init_entry(&ws->bo_cache, &bo->cache_entry, &bo->base); + pb_cache_init_entry(&ws->bo_cache, &bo->cache_entry, &bo->base, 0); request.alloc_size = size; request.phys_alignment = alignment; @@ -508,7 +508,7 @@ amdgpu_bo_create(struct radeon_winsys *rws, /* Get a buffer from the cache. */ bo = (struct amdgpu_winsys_bo*) - pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage); + pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage, 0); if (bo) return &bo->base; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 52b1ccd65a7..82dec8ed981 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -551,7 +551,7 @@ static struct radeon_bo *radeon_create_bo(struct radeon_drm_winsys *rws, bo->va = 0; bo->initial_domain = initial_domains; pipe_mutex_init(bo->map_mutex); - pb_cache_init_entry(&rws->bo_cache, &bo->cache_entry, &bo->base); + pb_cache_init_entry(&rws->bo_cache, &bo->cache_entry, &bo->base, 0); if (rws->info.has_virtual_memory) { struct drm_radeon_gem_va va; @@ -746,7 +746,7 @@ radeon_winsys_bo_create(struct radeon_winsys *rws, assert(flags < sizeof(usage) * 8 - 3); usage |= 1 << (flags + 3); - bo = radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage)); + bo = radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage, 0)); if (bo) return &bo->base; |