anv/allocator: Compare to start_offset in state_pool_free_no_vg
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 9 Jun 2020 01:37:51 +0000 (20:37 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 9 Jun 2020 22:52:26 +0000 (22:52 +0000)
commit0c37cbf807f06b6aae1f17c99d653274110bad5d
tree94dfad8ec264742eb82edb3023591cf303fd743b
parent5d547858dac2e9a608416e3b1310b01805e6f5d4
anv/allocator: Compare to start_offset in state_pool_free_no_vg

In d11e4738a86ec, we started using a start_offset to allow us to
allocate pools where the base address isn't at the start of the pool.
This is useful for binding table pools which want to be relative to
surface state base address (more or less), among other things.  However,
we had a bug where, if you have a negative offset, everything returned
to the pool would end up being returned to the "back" of the pool.  This
isn't what we want for binding tables in the softpin world.  This was
causing us to never actually re-use any binding table blocks.  How this
passed CTS, I have no idea.

Closes: #3100
Fixes: d11e4738a86ec "anv/allocator: Add a start_offset to anv_state_pool"
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5395>
src/intel/vulkan/anv_allocator.c