From 8b4002ff14b534c526a2c1cc4867aac582488243 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 17 Sep 2020 13:20:42 -0700 Subject: Added UnifiedMemoryCPUAccess member to GraphicsAdapterInfo struct (API Version 240072) --- Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineVulkan') 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(HeapInfo.size); -- cgit v1.2.3