anv: Account for the header in anv_state_stream_alloc
authorJason Ekstrand <jason@jlekstrand.net>
Thu, 26 Mar 2020 17:22:48 +0000 (12:22 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 31 Mar 2020 08:12:07 +0000 (08:12 +0000)
commit63bec07e14d1cd8e01bf45bcda341bb364620cfc
tree21da79e49a38ecf1347e5a13ae82e0a75303137a
parent6e672074dd1f3c105396a9d7a9bc35ea785569c9
anv: Account for the header in anv_state_stream_alloc

If we have an allocation that's exactly the block size, we end up
computing a new block size to allocate that's exactly the block size,
add in the header, and then assert fail.  When computing the block size,
we need to account for the header.

Fixes: 955127db937 "anv/allocator: Add support for large stream..."
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4336>
src/intel/vulkan/anv_allocator.c