a90d8fc08e
anv_state::offset in the context of anv_state_pool is equal to the offset from the begining of block_pool + start_offset. Like it is set in anv_state_pool_alloc_no_vg() in the path that allocs a new block in anv_block_pool. As anv_state_pool_return_chunk() expects only the offset from the begining of anv_block_pool so here subtracting to make the path that grabs a larger chunk of memory of the pool and split into smaler chunks to properly work. Cc: mesa-stable Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37669>