mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
anv: Don't allocate VMA for CCS on XeHP
On XeHP, CCS doesn't require VMA on XeHP. The HW provides anything allocated in LMEM a mapping to a CCS memory range for free. So, we: 1) use the implicit CCS framework to avoid adding an image memory binding for the CCS surface. 2) leave each BO sized as-is instead of adding on space for the CCS. Thankfully the framework only adds on space if an aux-map is present. XeHP has no aux-map, so this patch doesn't explicitly do anything for this. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14431>
This commit is contained in:
parent
382f6ccda8
commit
793338266c
2 changed files with 5 additions and 3 deletions
|
|
@ -1716,7 +1716,8 @@ anv_device_alloc_bo(struct anv_device *device,
|
|||
.is_external = (alloc_flags & ANV_BO_ALLOC_EXTERNAL),
|
||||
.has_client_visible_address =
|
||||
(alloc_flags & ANV_BO_ALLOC_CLIENT_VISIBLE_ADDRESS) != 0,
|
||||
.has_implicit_ccs = ccs_size > 0,
|
||||
.has_implicit_ccs = ccs_size > 0 || (device->info.verx10 >= 125 &&
|
||||
(alloc_flags & ANV_BO_ALLOC_LOCAL_MEM)),
|
||||
};
|
||||
|
||||
if (alloc_flags & ANV_BO_ALLOC_MAPPED) {
|
||||
|
|
|
|||
|
|
@ -937,7 +937,8 @@ anv_physical_device_try_create(struct anv_instance *instance,
|
|||
*/
|
||||
device->has_bindless_samplers = device->info.ver >= 8;
|
||||
|
||||
device->has_implicit_ccs = device->info.has_aux_map;
|
||||
device->has_implicit_ccs = device->info.has_aux_map ||
|
||||
device->info.verx10 >= 125;
|
||||
|
||||
/* Check if we can read the GPU timestamp register from the CPU */
|
||||
uint64_t u64_ignore;
|
||||
|
|
@ -3614,7 +3615,7 @@ VkResult anv_AllocateMemory(
|
|||
}
|
||||
|
||||
/* By default, we want all VkDeviceMemory objects to support CCS */
|
||||
if (device->physical->has_implicit_ccs)
|
||||
if (device->physical->has_implicit_ccs && device->info.has_aux_map)
|
||||
alloc_flags |= ANV_BO_ALLOC_IMPLICIT_CCS;
|
||||
|
||||
if (vk_flags & VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT_KHR)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue