| 390 | } |
| 391 | |
| 392 | void VulkanObjectManager::FlushUnsafe(VulkanObject object, uint32_t offset, uint32_t size) |
| 393 | { |
| 394 | if (object.m_allocation->m_memoryBlock->m_isCoherent) |
| 395 | return; |
| 396 | |
| 397 | CHECK(object.m_allocation->m_memoryBlock->m_isBlocked, ()); |
| 398 | |
| 399 | VkMappedMemoryRange mappedRange = {}; |
| 400 | mappedRange.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; |
| 401 | mappedRange.memory = object.GetMemory(); |
| 402 | mappedRange.offset = object.GetAlignedOffset() + offset; |
| 403 | if (size == 0) |
| 404 | mappedRange.size = object.GetAlignedSize(); |
| 405 | else |
| 406 | mappedRange.size = size; |
| 407 | CHECK_VK_CALL(vkFlushMappedMemoryRanges(m_device, 1, &mappedRange)); |
| 408 | } |
| 409 | |
| 410 | void VulkanObjectManager::UnmapUnsafe(VulkanObject object) |
| 411 | { |
no test coverage detected