MTL: regressions in vulkancts due to BO CCS allocations
bisected to:
646a7c864d3a4cf440164f5e199d6e339420a73c is the first bad commit
commit 646a7c864d3a4cf440164f5e199d6e339420a73c
Author: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Date: Wed Dec 27 11:16:50 2023 +0200
anv: re-introduce BO CCS allocations
On Gfx12.0, CCS allocations have to be allocated per image because the
format of the image goes into the AUX-TT PTEs. The effect on memory
allocations is limited since the main surface granularity in the
AUX-TT PTE is 64KB.
On Gfx12.5, the granularity of the AUX-TT PTE is 1MB. This creates a
lot of waste in the application memory allocations. Fortunately the HW
doesn't care about the format put into the PTEs anymore. So it becomes
possible to have 2 images share the same PTE.
To implement this we bring back an earlier version of AUX-TT mappings
where we used to allocate additional CCS space at the end of the
VkDeviceMemory objects. On Gfx12.5, if the BO has additional CCS
space, we will now map the main surface to that space.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26822>
Regressions:
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.memory_dep.buffer_copy_offset_24
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.sequential.65536
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.memory_dep.draw
dEQP-VK.memory.external_memory_host.bind_image_memory_and_render.with_zero_offset.r16g16b16a16_sfloat
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.sequential.4
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.overwrite.4
dEQP-VK.memory.external_memory_host.synchronization.synchronization
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.overwrite.1
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.overwrite.64_offset_24
dEQP-VK.memory.external_memory_host.simple_allocation.minImportedHostPointerAlignment_x3
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.memory_dep.buffer_copy
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.sequential.64_offset_16
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.memory_dep.dispatch_offset_24
dEQP-VK.memory.external_memory_host.bind_image_memory_and_render.with_non_zero_offset.r8g8b8a8_unorm
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.memory_dep.draw_offset_24
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.overwrite.64
dEQP-VK.memory.external_memory_host.simple_allocation.minImportedHostPointerAlignment_x1
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.memory_dep.dispatch_offset_24
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.overwrite.1
dEQP-VK.memory.external_memory_host.bind_image_memory_and_render.with_zero_offset.r32g32b32a32_sfloat
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.sequential.64_offset_16
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.memory_dep.buffer_copy
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.overwrite.64_offset_24
dEQP-VK.memory.external_memory_host.bind_image_memory_and_render.with_non_zero_offset.r16g16b16a16_sfloat
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.memory_dep.draw
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.overwrite.4
dEQP-VK.memory.external_memory_host.bind_image_memory_and_render.with_zero_offset.r8g8b8a8_unorm
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.sequential.65536
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.memory_dep.buffer_copy_offset_24
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.sequential.4
dEQP-VK.memory.external_memory_host.bind_image_memory_and_render.with_non_zero_offset.r16g16b16a16_unorm
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.sequential.65536_offset_1024
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.memory_dep.dispatch
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.sequential.64
dEQP-VK.memory.external_memory_host.bind_image_memory_and_render.with_non_zero_offset.r32g32b32a32_sfloat
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.memory_dep.dispatch
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.sequential.65536_offset_1024
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.memory_dep.draw_offset_24
dEQP-VK.memory.external_memory_host.bind_image_memory_and_render.with_zero_offset.r16g16b16a16_unorm
dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.sequential.64
dEQP-VK.api.buffer_marker.graphics.external_host_mem.top_of_pipe.overwrite.64
dEQP-VK.mesh_shader.ext.misc.custom_attributes_and_task_shader
$ ./deqp-vk -n dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.overwrite.4
Writing test log into TestResults.qpa
dEQP Core vulkan-cts-1.3.7.3-60-g612eb1142f463f89ba3061e971bf46c3f08ac4d3 (0x612eb114) starting..
target implementation = 'Default'
MESA-INTEL: warning: cannot initialize blitter engine
MESA-INTEL: warning: cannot initialize blitter engine
Test case 'dEQP-VK.api.buffer_marker.graphics.external_host_mem.bottom_of_pipe.overwrite.4'..
deqp-vk: ../src/intel/vulkan/anv_allocator.c:1622: anv_device_import_bo_from_host_ptr: Assertion `!(alloc_flags & (ANV_BO_ALLOC_MAPPED | ANV_BO_ALLOC_HOST_CACHED | ANV_BO_ALLOC_HOST_COHERENT | ANV_BO_ALLOC_AUX_CCS | ANV_BO_ALLOC_PROTECTED | ANV_BO_ALLOC_FIXED_ADDRESS))' failed.
Aborted