[dxvk] Don't enforce HOST_CACHED flag when allocating memory

The better fix would be to support non-coherent memory properly,
but this will have to do for now. Fixes #947.
This commit is contained in:
Philip Rebohle 2019-03-14 16:47:17 +01:00
parent c35af973bb
commit f272071d8d
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 6 additions and 3 deletions

View File

@ -186,10 +186,13 @@ namespace dxvk {
float priority) {
std::lock_guard<std::mutex> lock(m_mutex);
DxvkMemory result = this->tryAlloc(req, dedAllocInfo, flags, priority);
VkMemoryPropertyFlags optFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
| VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
if (!result && (flags & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT))
result = this->tryAlloc(req, dedAllocInfo, flags & ~VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, priority);
DxvkMemory result = this->tryAlloc(req, dedAllocInfo, flags, priority);
if (!result && (flags & optFlags))
result = this->tryAlloc(req, dedAllocInfo, flags & ~optFlags, priority);
if (!result) {
Logger::err(str::format(