460aa58911
Xe2 replaces auxiliary surface mapping by software to compress buffers with reserving part of the memory for the compression purpose. To enable compression in Xe2 it is necessary to bind memory with one of the PAT indexes that has compression enabled. We're introducing 2 new iris_heaps to allocate compressed BO's out of on Xe2, one for integrated and another for discrete platforms. With these new iris_heaps we gain cache and sub-allocation for free. If the compression requirements are met iris_resource_image_is_pat_compressible() returns true so BO_ALLOC_COMPRESSED is set and the the BO is allocated out of the correct heap. At this moment iris_resource_image_is_pat_compressible() defaults to returning false as more work needs to be done but the foundation for the compressed allocation is here. Reviewed-by: Rohan Garg <rohan.garg@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28833>