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

Function GetMemoryPropertyFlags

libs/drape/vulkan/vulkan_memory_manager.cpp:30–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}};
29
30VkMemoryPropertyFlags GetMemoryPropertyFlags(VulkanMemoryManager::ResourceType resourceType,
31 std::optional<VkMemoryPropertyFlags> & fallbackTypeBits)
32{
33 switch (resourceType)
34 {
35 case VulkanMemoryManager::ResourceType::Geometry:
36 fallbackTypeBits = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
37 return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
38
39 case VulkanMemoryManager::ResourceType::Staging:
40 // No fallback.
41 return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
42
43 case VulkanMemoryManager::ResourceType::Uniform:
44 // No fallback.
45 return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
46
47 case VulkanMemoryManager::ResourceType::Image:
48 // No fallback.
49 return VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
50
51 case VulkanMemoryManager::ResourceType::Count: CHECK(false, ());
52 }
53 return 0;
54}
55
56struct LessBlockSize
57{

Callers 1

AllocateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected