anv/allocator: Add a start_offset to anv_state_pool
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 4 May 2020 22:27:22 +0000 (17:27 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 8 May 2020 16:54:17 +0000 (16:54 +0000)
commitd11e4738a86ecac6bb4cfaf5cad5c1d32169b18f
tree5e8b69138b575968381a307d9702817a67684224
parent772b15ad3227e08bb4e18932ac9ecf4c29271160
anv/allocator: Add a start_offset to anv_state_pool

This allows a pool's allocations to start somewhere other than the base
address.  Our first real use of this will be to use a negative offset
for the binding table pool to make it so that the offset is baked into
the pool and the code in anv_batch_chain.c doesn't have to understand
pool offsetting.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4897>
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_batch_chain.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/tests/state_pool.c
src/intel/vulkan/tests/state_pool_free_list_only.c
src/intel/vulkan/tests/state_pool_no_free.c
src/intel/vulkan/tests/state_pool_padding.c