From 9f0775b1ac7365dbd82f1582b92c60b644b264d8 Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Thu, 8 Jul 2021 22:41:06 +0200 Subject: [PATCH] [d3d9] Always use cached memory for texture mapping buffers We read from that memory when uploading the texture. Fixes performance in Oblivion. --- src/d3d9/d3d9_common_texture.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/d3d9/d3d9_common_texture.cpp b/src/d3d9/d3d9_common_texture.cpp index a04d28576..8c81ba800 100644 --- a/src/d3d9/d3d9_common_texture.cpp +++ b/src/d3d9/d3d9_common_texture.cpp @@ -173,10 +173,8 @@ namespace dxvk { } VkMemoryPropertyFlags memType = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT - | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; - - if (m_mapMode == D3D9_COMMON_TEXTURE_MAP_MODE_SYSTEMMEM || IsManaged()) - memType |= VK_MEMORY_PROPERTY_HOST_CACHED_BIT; + | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT + | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; m_buffers[Subresource] = m_device->GetDXVKDevice()->createBuffer(info, memType); m_mappedSlices[Subresource] = m_buffers[Subresource]->getSliceHandle();