1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 19:24:12 +01:00

[d3d11] Re-enable image mapping

After more extensive testing, it looks like commit 4eacff21
actually fixed the issue in most (all?) cases.
This commit is contained in:
Philip Rebohle 2018-03-12 12:54:05 +01:00
parent 3d0aad705d
commit 3e60c8f316
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -148,7 +148,7 @@ namespace dxvk {
if (CPUAccessFlags & D3D11_CPU_ACCESS_READ) { if (CPUAccessFlags & D3D11_CPU_ACCESS_READ) {
pImageInfo->access |= VK_ACCESS_HOST_READ_BIT; pImageInfo->access |= VK_ACCESS_HOST_READ_BIT;
// pImageInfo->tiling = VK_IMAGE_TILING_LINEAR; pImageInfo->tiling = VK_IMAGE_TILING_LINEAR;
} }
} }
@ -169,19 +169,17 @@ namespace dxvk {
* \returns Image memory properties * \returns Image memory properties
*/ */
static VkMemoryPropertyFlags GetImageMemoryFlags(UINT CPUAccessFlags) { static VkMemoryPropertyFlags GetImageMemoryFlags(UINT CPUAccessFlags) {
// FIXME investigate why image mapping breaks games if (CPUAccessFlags & D3D11_CPU_ACCESS_READ) {
return VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT
// if (CPUAccessFlags & D3D11_CPU_ACCESS_READ) { | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
// return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
// | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT } else {
// | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; // If only write access is required, we will emulate
// } else { // image mapping through a buffer. Some games ignore
// // If only write access is required, we will emulate // the row pitch when mapping images, which leads to
// // image mapping through a buffer. Some games ignore // incorrect rendering.
// // the row pitch when mapping images, which leads to return VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
// // incorrect rendering. }
// return VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
// }
} }