mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 18:50:31 +01:00
venus: workaround excessive dma-buf import failure on turnip
Workaround dEQP-VK.wsi.android.swapchain.simulate_oom.* test failures on turnip where excessive imports can fail, and venus has to propagate oom. Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28941>
This commit is contained in:
parent
824a8542d7
commit
fdc21a95aa
1 changed files with 9 additions and 1 deletions
|
|
@ -30,7 +30,15 @@ vn_device_memory_alloc_simple(struct vn_device *dev,
|
|||
{
|
||||
VkDevice dev_handle = vn_device_to_handle(dev);
|
||||
VkDeviceMemory mem_handle = vn_device_memory_to_handle(mem);
|
||||
if (VN_PERF(NO_ASYNC_MEM_ALLOC)) {
|
||||
|
||||
/* Workaround dEQP-VK.wsi.android.swapchain.simulate_oom.* test failures on
|
||||
* turnip where excessive imports can fail, and venus has to propagate oom.
|
||||
*/
|
||||
const bool force_sync =
|
||||
mem->base.base.import_handle_type ==
|
||||
VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT &&
|
||||
dev->physical_device->renderer_driver_id == VK_DRIVER_ID_MESA_TURNIP;
|
||||
if (VN_PERF(NO_ASYNC_MEM_ALLOC) || force_sync) {
|
||||
return vn_call_vkAllocateMemory(dev->primary_ring, dev_handle,
|
||||
alloc_info, NULL, &mem_handle);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue