summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2016-05-08 13:40:40 +0200
committerMarek Olšák <[email protected]>2016-05-10 17:20:09 +0200
commitc2377b394b7820419b18dd92f29ac367ad6e39da (patch)
tree0e6482bf129e8afbc08f846b85330f203a716746 /src
parent544967faf59b20b6254d713fca94f6e9aa86754c (diff)
gallium/radeon: align alignments for better buffer reuse
It's for the buffer cache. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/amdgpu/drm/amdgpu_bo.c1
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
index eb28ba91482..ed12f3073d9 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
@@ -470,6 +470,7 @@ amdgpu_bo_create(struct radeon_winsys *rws,
* like constant/uniform buffers, can benefit from better and more reuse.
*/
size = align64(size, ws->info.gart_page_size);
+ alignment = align(alignment, ws->info.gart_page_size);
/* Only set one usage bit each for domains and flags, or the cache manager
* might consider different sets of domains / flags compatible
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index b24964f1c57..b07afe67f40 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -732,6 +732,7 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
* like constant/uniform buffers, can benefit from better and more reuse.
*/
size = align(size, ws->info.gart_page_size);
+ alignment = align(alignment, ws->info.gart_page_size);
/* Only set one usage bit each for domains and flags, or the cache manager
* might consider different sets of domains / flags compatible