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

Method GetOffsetAlignment

libs/drape/vulkan/vulkan_memory_manager.cpp:110–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110uint32_t VulkanMemoryManager::GetOffsetAlignment(ResourceType resourceType) const
111{
112 if (resourceType == ResourceType::Uniform)
113 {
114 static uint32_t const kUniformAlignment =
115 math::LCM(static_cast<uint32_t>(m_deviceLimits.minUniformBufferOffsetAlignment),
116 static_cast<uint32_t>(m_deviceLimits.nonCoherentAtomSize));
117 return kUniformAlignment;
118 }
119
120 static uint32_t const kAlignment = math::LCM(static_cast<uint32_t>(m_deviceLimits.minMemoryMapAlignment),
121 static_cast<uint32_t>(m_deviceLimits.nonCoherentAtomSize));
122 return kAlignment;
123}
124
125uint32_t VulkanMemoryManager::GetSizeAlignment(VkMemoryRequirements const & memReqs) const
126{

Callers 2

CreateUniformBufferFunction · 0.80
VulkanStagingBufferMethod · 0.80

Calls 1

LCMFunction · 0.85

Tested by

no test coverage detected