anv/allocator: Add helper to push states back to the state table.
authorRafael Antognolli <rafael.antognolli@intel.com>
Tue, 11 Dec 2018 23:37:15 +0000 (15:37 -0800)
committerRafael Antognolli <rafael.antognolli@intel.com>
Thu, 17 Jan 2019 23:07:47 +0000 (15:07 -0800)
commit6a1dcfe73d070d42f19b1450b883e345c5aa001a
tree479b870d9c3d8681fef656c2a356dccda8e1c4da
parente8b6e0a5ba888d2b5d188cf06d962b6d8bc35332
anv/allocator: Add helper to push states back to the state table.

The use of anv_state_table_add() combined with anv_state_table_push(),
specially when adding a bunch of states to the table, is very verbose.
So we add this helper that makes things easier to digest.

We also already add the anv_state_table member in this commit, so things
can compile properly, even though it's not used.

v2: assert that the states are always aligned to their size (Jason)
v3: Add "table" member to anv_state_pool in this commit.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_private.h