| 396 | } |
| 397 | |
| 398 | uint32_t findGraphicsQueueFamilyIndex( std::vector<vk::QueueFamilyProperties> const & queueFamilyProperties ) |
| 399 | { |
| 400 | // get the first index into queueFamiliyProperties which supports graphics |
| 401 | std::vector<vk::QueueFamilyProperties>::const_iterator graphicsQueueFamilyProperty = |
| 402 | std::find_if( queueFamilyProperties.begin(), |
| 403 | queueFamilyProperties.end(), |
| 404 | []( vk::QueueFamilyProperties const & qfp ) { return qfp.queueFlags & vk::QueueFlagBits::eGraphics; } ); |
| 405 | assert( graphicsQueueFamilyProperty != queueFamilyProperties.end() ); |
| 406 | return static_cast<uint32_t>( std::distance( queueFamilyProperties.begin(), graphicsQueueFamilyProperty ) ); |
| 407 | } |
| 408 | |
| 409 | std::pair<uint32_t, uint32_t> findGraphicsAndPresentQueueFamilyIndex( vk::PhysicalDevice physicalDevice, vk::SurfaceKHR const & surface ) |
| 410 | { |
no outgoing calls
no test coverage detected