aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-04-20 21:52:41 -0700
committerJason Ekstrand <[email protected]>2018-04-26 13:17:14 -0700
commit3db93f9128e5329f6658c9018cf23eb31807c24c (patch)
tree5dd22a812180c9c05255c0cdb1270936c0253159 /src/intel/vulkan
parent76ee9edcb4f5be8699cfb9a6c4aa231c4e7d4183 (diff)
anv/allocator: Don't shrink either end of the block pool
Previously, we only tried to ensure that we didn't shrink either end below what was already handed out. However, due to the way we handle relocations with block pools, we can't shrink the back end at all. It's probably best to not shrink in either direction. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105374 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106147 Tested-by: Eero Tamminen <[email protected]> Reviewed-by: Scott D Phillips <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_allocator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index f884ac3b827..642e1618c10 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -508,12 +508,12 @@ anv_block_pool_grow(struct anv_block_pool *pool, struct anv_block_state *state)
assert(center_bo_offset >= back_used);
/* Make sure we don't shrink the back end of the pool */
- if (center_bo_offset < pool->back_state.end)
- center_bo_offset = pool->back_state.end;
+ if (center_bo_offset < back_required)
+ center_bo_offset = back_required;
/* Make sure that we don't shrink the front end of the pool */
- if (size - center_bo_offset < pool->state.end)
- center_bo_offset = size - pool->state.end;
+ if (size - center_bo_offset < front_required)
+ center_bo_offset = size - front_required;
}
assert(center_bo_offset % PAGE_SIZE == 0);