From 22584fb2d1a786a2d0a0994810b9df6602ece598 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Sat, 23 Jan 2021 16:30:21 +0300 Subject: [PATCH] vk/dma: Disable pasthrough DMA for NVIDIA+windows - The driver seems to cache page mapping as long as allocation has not been removed - This is undesirable as we cannot stop the emulator to remove stale allocations every time a page is unmapped --- rpcs3/Emu/RSX/VK/VKDMA.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/rpcs3/Emu/RSX/VK/VKDMA.cpp b/rpcs3/Emu/RSX/VK/VKDMA.cpp index 455b4ef79b..5dc258fab6 100644 --- a/rpcs3/Emu/RSX/VK/VKDMA.cpp +++ b/rpcs3/Emu/RSX/VK/VKDMA.cpp @@ -225,24 +225,6 @@ namespace vk bool test_host_pointer(u32 base_address, usz length) { -#if 0 // Unusable due to vm locks - auto block = vm::get(vm::any, base_address); - ensure(block); - - if ((block->addr + block->size) < (base_address + length)) - { - return false; - } - - if (block->flags & 0x120) - { - return true; - } - - auto range_info = block->peek(base_address, u32(length)); - return !!range_info.second; -#endif - #ifdef _WIN32 MEMORY_BASIC_INFORMATION mem_info; if (!::VirtualQuery(vm::get_super_ptr(base_address), &mem_info, sizeof(mem_info))) @@ -263,7 +245,8 @@ namespace vk #ifdef _WIN32 const bool allow_host_buffers = (vendor == driver_vendor::NVIDIA) ? - test_host_pointer(base_address, expected_length) : + //test_host_pointer(base_address, expected_length) : + rsx::get_location(base_address) == CELL_GCM_LOCATION_LOCAL : // NVIDIA workaround true; #else // Anything running on AMDGPU kernel driver will not work due to the check for fd-backed memory allocations