MCPcopy Create free account
hub / github.com/comaps/comaps / FlushUnsafe

Method FlushUnsafe

libs/drape/vulkan/vulkan_object_manager.cpp:392–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392void 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
410void VulkanObjectManager::UnmapUnsafe(VulkanObject object)
411{

Callers 2

FlushMethod · 0.80
FlushMethod · 0.80

Calls 3

GetMemoryMethod · 0.80
GetAlignedOffsetMethod · 0.80
GetAlignedSizeMethod · 0.80

Tested by

no test coverage detected