mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 12:48:57 +00:00
Vulkan: Add a DriverDetails bug for "slow cached readback memory"
Using the cached memory type appears to be slower on Mali drivers, with ~10-15% CPU spent in the __pi___inval_cache_range kernel function.
This commit is contained in:
parent
c557aa4a15
commit
328d89db70
3 changed files with 20 additions and 1 deletions
|
@ -775,6 +775,16 @@ u32 VulkanContext::GetReadbackMemoryType(u32 bits, bool* is_coherent)
|
|||
{
|
||||
std::optional<u32> type_index;
|
||||
|
||||
// Mali driver appears to be significantly slower for readbacks when using cached memory.
|
||||
if (DriverDetails::HasBug(DriverDetails::BUG_SLOW_CACHED_READBACK_MEMORY))
|
||||
{
|
||||
type_index = GetMemoryType(
|
||||
bits, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, true,
|
||||
is_coherent);
|
||||
if (type_index)
|
||||
return type_index.value();
|
||||
}
|
||||
|
||||
// Optimal config uses cached+coherent.
|
||||
type_index =
|
||||
GetMemoryType(bits,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue