vk/allocator: Solve a data race in anv_block_pool
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Aug 2015 08:19:34 +0000 (01:19 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Aug 2015 08:19:34 +0000 (01:19 -0700)
commitfacf587deac3375e42338aa304d77b34a527b26e
tree38c27a4ddd2493c14cfbad5c2443c6c1cd0848aa
parent5e5a783530aba5c65e9d08683c905fb4cfd329c5
vk/allocator: Solve a data race in anv_block_pool

The anv_block_pool data structure suffered from the exact same race as the
state pool.  Namely, that the uniqueness of the blocks handed out depends
on the next_block value increasing monotonically.  However, this invariant
did not hold thanks to our block "return" concept.
src/vulkan/anv_allocator.c
src/vulkan/anv_private.h