Revert "anv: Require the local heap for CCS on XeHP"

This reverts commit 382f6ccda8.

The spec requires that all color images created with the same tiling
(and a few other properties) support the same memoryTypeBits. So this
wasn't a valid change. It also wasn't necessary - we already have a
mechanism in anv_BindImageMemory2 for disabling compression if the BO
doesn't support it.

With this, XeHP passes the tests in
dEQP-VK.memory.requirements.*tiling_optimal

Fixes: 382f6ccd ("anv: Require the local heap for CCS on XeHP")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15068>
(cherry picked from commit dc05615ec1)
This commit is contained in:
Nanley Chery 2022-02-17 10:34:17 -08:00 committed by Dylan Baker
parent 6961f75931
commit 01db75635a
2 changed files with 4 additions and 19 deletions

View file

@ -841,7 +841,7 @@
"description": "Revert \"anv: Require the local heap for CCS on XeHP\"",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "382f6ccda8869f72134dbfa9c3cc68a229e01138"
},

View file

@ -1580,25 +1580,10 @@ anv_image_get_memory_requirements(struct anv_device *device,
* supported memory type for the resource. The bit `1<<i` is set if and
* only if the memory type `i` in the VkPhysicalDeviceMemoryProperties
* structure for the physical device is supported.
*
* All types are currently supported for images.
*/
uint32_t memory_types = 0;
for (int i = 0; i < device->physical->memory.type_count; i++) {
const uint32_t heap_index = device->physical->memory.types[i].heapIndex;
bool memory_type_supported = true;
u_foreach_bit(b, aspects) {
VkImageAspectFlagBits aspect = 1 << b;
const uint32_t plane = anv_image_aspect_to_plane(image, aspect);
if (device->info.verx10 >= 125 &&
isl_aux_usage_has_ccs(image->planes[plane].aux_usage) &&
!device->physical->memory.heaps[heap_index].is_local_mem)
memory_type_supported = false;
}
if (memory_type_supported)
memory_types |= 1 << i;
}
uint32_t memory_types = (1ull << device->physical->memory.type_count) - 1;
vk_foreach_struct(ext, pMemoryRequirements->pNext) {
switch (ext->sType) {