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

Function pickDepthFormat

samples/utils/utils.cpp:505–518  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503 }
504
505 vk::Format pickDepthFormat( vk::PhysicalDevice const & physicalDevice )
506 {
507 std::vector<vk::Format> candidates = { vk::Format::eD32Sfloat, vk::Format::eD32SfloatS8Uint, vk::Format::eD24UnormS8Uint };
508 for ( vk::Format format : candidates )
509 {
510 vk::FormatProperties props = physicalDevice.getFormatProperties( format );
511
512 if ( props.optimalTilingFeatures & vk::FormatFeatureFlagBits::eDepthStencilAttachment )
513 {
514 return format;
515 }
516 }
517 throw std::runtime_error( "failed to find supported format!" );
518 }
519
520 vk::PresentModeKHR pickPresentMode( std::vector<vk::PresentModeKHR> const & presentModes )
521 {

Callers 1

mainFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected