summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-09-17 20:20:42 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-09-17 20:20:42 +0000
commit8b4002ff14b534c526a2c1cc4867aac582488243 (patch)
treec86c378f126f505dd36f6686574b8405d9434df9 /Graphics/GraphicsEngineVulkan
parentUpdated unified buffers logic: removed implicit decay to DEFAULT bufers (diff)
downloadDiligentCore-8b4002ff14b534c526a2c1cc4867aac582488243.tar.gz
DiligentCore-8b4002ff14b534c526a2c1cc4867aac582488243.zip
Added UnifiedMemoryCPUAccess member to GraphicsAdapterInfo struct (API Version 240072)
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
index ad29fd21..2c245dfa 100644
--- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
@@ -189,7 +189,10 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters*
if ((MemTypeInfo.propertyFlags & UnifiedMemoryFlags) == UnifiedMemoryFlags)
{
IsUnified = true;
- break;
+ if (MemTypeInfo.propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)
+ AdapterInfo.UnifiedMemoryCPUAccess |= CPU_ACCESS_WRITE;
+ if (MemTypeInfo.propertyFlags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
+ AdapterInfo.UnifiedMemoryCPUAccess |= CPU_ACCESS_READ;
}
}
(IsUnified ? AdapterInfo.UnifiedMemory : AdapterInfo.DeviceLocalMemory) += static_cast<Uint64>(HeapInfo.size);