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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user