venus: Delete vn_renderer_info::has_cache_management

It has been false since commit 247232d596, when Venus was merged
upstream in April 2021.

Signed-off-by: Lina Versace <linyaa@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22099>
This commit is contained in:
Lina Versace
2023-03-23 13:57:07 -07:00
committed by Marge Bot
parent e58352930e
commit 436a0d2609
4 changed files with 14 additions and 18 deletions

View File

@@ -778,19 +778,21 @@ vn_physical_device_init_memory_properties(
instance, vn_physical_device_to_handle(physical_dev),
&physical_dev->memory_properties);
if (!instance->renderer->info.has_cache_management) {
VkPhysicalDeviceMemoryProperties *props =
&physical_dev->memory_properties.memoryProperties;
const uint32_t host_flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
VkPhysicalDeviceMemoryProperties *props =
&physical_dev->memory_properties.memoryProperties;
const uint32_t host_flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
for (uint32_t i = 0; i < props->memoryTypeCount; i++) {
const bool coherent = props->memoryTypes[i].propertyFlags &
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
if (!coherent)
props->memoryTypes[i].propertyFlags &= ~host_flags;
}
for (uint32_t i = 0; i < props->memoryTypeCount; i++) {
/* Kernel makes every mapping coherent. If a memory type is truly
* incoherent, it's better to remove the host-visible flag than silently
* making it coherent.
*/
const bool coherent = props->memoryTypes[i].propertyFlags &
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
if (!coherent)
props->memoryTypes[i].propertyFlags &= ~host_flags;
}
}

View File

@@ -62,7 +62,6 @@ struct vn_renderer_info {
} pci;
bool has_dma_buf_import;
bool has_cache_management;
bool has_external_sync;
bool has_implicit_fencing;
bool has_guest_vram;

View File

@@ -1375,10 +1375,6 @@ virtgpu_init_renderer_info(struct virtgpu *gpu)
}
info->has_dma_buf_import = true;
/* Kernel makes every mapping coherent. We are better off filtering
* incoherent memory types out than silently making them coherent.
*/
info->has_cache_management = false;
/* TODO drm_syncobj */
info->has_external_sync = false;

View File

@@ -938,7 +938,6 @@ vtest_init_renderer_info(struct vtest *vtest)
info->pci.device_id = VTEST_PCI_DEVICE_ID;
info->has_dma_buf_import = false;
info->has_cache_management = false;
info->has_external_sync = false;
info->has_implicit_fencing = false;