MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-Hpp / findMemoryType

Function findMemoryType

samples/utils/utils.cpp:460–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458 }
459
460 uint32_t findMemoryType( vk::PhysicalDeviceMemoryProperties const & memoryProperties, uint32_t typeBits, vk::MemoryPropertyFlags requirementsMask )
461 {
462 uint32_t typeIndex = uint32_t( ~0 );
463 for ( uint32_t i = 0; i < memoryProperties.memoryTypeCount; i++ )
464 {
465 if ( ( typeBits & 1 ) && ( ( memoryProperties.memoryTypes[i].propertyFlags & requirementsMask ) == requirementsMask ) )
466 {
467 typeIndex = i;
468 break;
469 }
470 typeBits >>= 1;
471 }
472 assert( typeIndex != uint32_t( ~0 ) );
473 return typeIndex;
474 }
475
476 std::vector<std::string> getDeviceExtensions()
477 {

Callers 14

allocateDeviceMemoryFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
allocateDeviceMemoryFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected