diff options
author | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-07-12 14:37:38 -0700 |
---|---|---|
committer | Caio Marcelo de Oliveira Filho <[email protected]> | 2019-07-12 22:25:37 -0700 |
commit | 09c4037ddada76ad07cca2fd6b46f5451fa55f1b (patch) | |
tree | 5a965e3b6fd5dcd556bf8909f33840cb1e5a4c7c /src/intel/vulkan/anv_allocator.c | |
parent | aa139210792b8380ae937e932248ee0aba6a0e4c (diff) |
anv: Fix pool allocator when first alloc needs to grow
When using softpin, the first allocation was not calculating the
padding and offset correctly for the case the first allocation needed
to grow. We were missing initialize the state.end right after
expanding the pool for the first time.
This is not a problem for non-softpin since there we don't use
leftover padding so the ends would re-arrange incrementally.
This fixes running dEQP-VK.ssbo.phys.layout.random.16bit.scalar.13 in
SKL -- the test uses a shader larger than the initial size for the
instruction pool.
Fixes: dfc9ab2ccd9 "anv/allocator: Add padding information."
Reviewed-by: Rafael Antognolli <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_allocator.c')
-rw-r--r-- | src/intel/vulkan/anv_allocator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index fa923543703..48d41891cfb 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -478,6 +478,11 @@ anv_block_pool_init(struct anv_block_pool *pool, if (result != VK_SUCCESS) goto fail_mmap_cleanups; + /* Make the entire pool available in the front of the pool. If back + * allocation needs to use this space, the "ends" will be re-arranged. + */ + pool->state.end = pool->size; + return VK_SUCCESS; fail_mmap_cleanups: |