mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
anv: remove heuristic preferring dedicated allocations
This heuristic doesn't show much difference when you have a beafy
processor but on lower end skus, it increase the number of buffers in
the execbuffer ioctl, adding significant overhead in i915.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4cdd3178fb ("anv: Meet CCS alignment reqs with dedicated allocs")
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26335>
This commit is contained in:
parent
7b87e1afbc
commit
b18006397b
1 changed files with 6 additions and 21 deletions
|
|
@ -1928,32 +1928,17 @@ anv_image_get_memory_requirements(struct anv_device *device,
|
|||
switch (ext->sType) {
|
||||
case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS: {
|
||||
VkMemoryDedicatedRequirements *requirements = (void *)ext;
|
||||
if (image->vk.wsi_legacy_scanout || image->from_ahb) {
|
||||
/* If we need to set the tiling for external consumers, we need a
|
||||
* dedicated allocation.
|
||||
if (image->vk.wsi_legacy_scanout ||
|
||||
image->from_ahb ||
|
||||
(isl_drm_modifier_has_aux(image->vk.drm_format_mod) &&
|
||||
anv_image_uses_aux_map(device, image))) {
|
||||
/* If we need to set the tiling for external consumers or the
|
||||
* modifier involves AUX tables, we need a dedicated allocation.
|
||||
*
|
||||
* See also anv_AllocateMemory.
|
||||
*/
|
||||
requirements->prefersDedicatedAllocation = true;
|
||||
requirements->requiresDedicatedAllocation = true;
|
||||
} else if (anv_image_uses_aux_map(device, image)) {
|
||||
/* We request a dedicated allocation to guarantee that the BO will
|
||||
* be aux-map compatible (see anv_bo_vma_alloc_or_close and
|
||||
* anv_bo_allows_aux_map).
|
||||
*
|
||||
* TODO: This is an untested heuristic. It's not known if this
|
||||
* guarantee is worth losing suballocation.
|
||||
*
|
||||
* If we don't have an aux-map compatible BO at the time we bind
|
||||
* this image to device memory, we'll change the aux usage.
|
||||
*
|
||||
* It may be possible to handle an image using a modifier in the
|
||||
* same way. However, we choose to keep things simple and require
|
||||
* a dedicated allocation for that case.
|
||||
*/
|
||||
requirements->prefersDedicatedAllocation = true;
|
||||
requirements->requiresDedicatedAllocation =
|
||||
isl_drm_modifier_has_aux(image->vk.drm_format_mod);
|
||||
} else {
|
||||
requirements->prefersDedicatedAllocation = false;
|
||||
requirements->requiresDedicatedAllocation = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue