Change ColumnLimit with clang-format from 120 to 160.
This commit is contained in:
@@ -29,8 +29,7 @@ void cout( vk::SurfaceCapabilitiesKHR const & surfaceCapabilities )
|
||||
{
|
||||
std::cout << "\tCapabilities:\n";
|
||||
std::cout << "\t\t"
|
||||
<< "currentExtent = " << surfaceCapabilities.currentExtent.width << " x "
|
||||
<< surfaceCapabilities.currentExtent.height << "\n";
|
||||
<< "currentExtent = " << surfaceCapabilities.currentExtent.width << " x " << surfaceCapabilities.currentExtent.height << "\n";
|
||||
std::cout << "\t\t"
|
||||
<< "currentTransform = " << vk::to_string( surfaceCapabilities.currentTransform ) << "\n";
|
||||
std::cout << "\t\t"
|
||||
@@ -38,13 +37,11 @@ void cout( vk::SurfaceCapabilitiesKHR const & surfaceCapabilities )
|
||||
std::cout << "\t\t"
|
||||
<< "maxImageCount = " << surfaceCapabilities.maxImageCount << "\n";
|
||||
std::cout << "\t\t"
|
||||
<< "maxImageExtent = " << surfaceCapabilities.maxImageExtent.width << " x "
|
||||
<< surfaceCapabilities.maxImageExtent.height << "\n";
|
||||
<< "maxImageExtent = " << surfaceCapabilities.maxImageExtent.width << " x " << surfaceCapabilities.maxImageExtent.height << "\n";
|
||||
std::cout << "\t\t"
|
||||
<< "minImageCount = " << surfaceCapabilities.minImageCount << "\n";
|
||||
std::cout << "\t\t"
|
||||
<< "minImageExtent = " << surfaceCapabilities.minImageExtent.width << " x "
|
||||
<< surfaceCapabilities.minImageExtent.height << "\n";
|
||||
<< "minImageExtent = " << surfaceCapabilities.minImageExtent.width << " x " << surfaceCapabilities.minImageExtent.height << "\n";
|
||||
std::cout << "\t\t"
|
||||
<< "supportedCompositeAlpha = " << vk::to_string( surfaceCapabilities.supportedCompositeAlpha ) << "\n";
|
||||
std::cout << "\t\t"
|
||||
@@ -61,16 +58,15 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
// need to initialize the dynamic dispatcher before the very first vulkan call
|
||||
#if ( VULKAN_HPP_DISPATCH_LOADER_DYNAMIC == 1 )
|
||||
static vk::DynamicLoader dl;
|
||||
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr =
|
||||
dl.getProcAddress<PFN_vkGetInstanceProcAddr>( "vkGetInstanceProcAddr" );
|
||||
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = dl.getProcAddress<PFN_vkGetInstanceProcAddr>( "vkGetInstanceProcAddr" );
|
||||
VULKAN_HPP_DEFAULT_DISPATCHER.init( vkGetInstanceProcAddr );
|
||||
#endif
|
||||
|
||||
std::vector<vk::ExtensionProperties> instanceExtensionProperties = vk::enumerateInstanceExtensionProperties();
|
||||
auto propertyIterator = std::find_if(
|
||||
instanceExtensionProperties.begin(), instanceExtensionProperties.end(), []( vk::ExtensionProperties const & ep ) {
|
||||
return strcmp( ep.extensionName, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME ) == 0;
|
||||
} );
|
||||
auto propertyIterator =
|
||||
std::find_if( instanceExtensionProperties.begin(),
|
||||
instanceExtensionProperties.end(),
|
||||
[]( vk::ExtensionProperties const & ep ) { return strcmp( ep.extensionName, VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME ) == 0; } );
|
||||
bool supportsGetSurfaceCapabilities2 = ( propertyIterator != instanceExtensionProperties.end() );
|
||||
|
||||
std::vector<std::string> extensions = vk::su::getInstanceExtensions();
|
||||
@@ -81,8 +77,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
|
||||
vk::Instance instance = vk::su::createInstance( AppName, EngineName, {}, extensions );
|
||||
#if !defined( NDEBUG )
|
||||
vk::DebugUtilsMessengerEXT debugUtilsMessenger =
|
||||
instance.createDebugUtilsMessengerEXT( vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
vk::DebugUtilsMessengerEXT debugUtilsMessenger = instance.createDebugUtilsMessengerEXT( vk::su::makeDebugUtilsMessengerCreateInfoEXT() );
|
||||
#endif
|
||||
|
||||
// enumerate the physicalDevices
|
||||
@@ -96,22 +91,19 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
for ( size_t i = 0; i < physicalDevices.size(); i++ )
|
||||
{
|
||||
// some properties are only valid, if a corresponding extension is available!
|
||||
std::vector<vk::ExtensionProperties> extensionProperties =
|
||||
physicalDevices[i].enumerateDeviceExtensionProperties();
|
||||
std::vector<vk::ExtensionProperties> extensionProperties = physicalDevices[i].enumerateDeviceExtensionProperties();
|
||||
|
||||
std::cout << "PhysicalDevice " << i << "\n";
|
||||
if ( supportsGetSurfaceCapabilities2 )
|
||||
{
|
||||
auto surfaceCapabilities2 =
|
||||
physicalDevices[i]
|
||||
.getSurfaceCapabilities2KHR<vk::SurfaceCapabilities2KHR,
|
||||
vk::DisplayNativeHdrSurfaceCapabilitiesAMD,
|
||||
vk::SharedPresentSurfaceCapabilitiesKHR,
|
||||
vk::SurfaceCapabilitiesFullScreenExclusiveEXT,
|
||||
vk::SurfaceProtectedCapabilitiesKHR>( surfaceData.surface );
|
||||
auto surfaceCapabilities2 = physicalDevices[i]
|
||||
.getSurfaceCapabilities2KHR<vk::SurfaceCapabilities2KHR,
|
||||
vk::DisplayNativeHdrSurfaceCapabilitiesAMD,
|
||||
vk::SharedPresentSurfaceCapabilitiesKHR,
|
||||
vk::SurfaceCapabilitiesFullScreenExclusiveEXT,
|
||||
vk::SurfaceProtectedCapabilitiesKHR>( surfaceData.surface );
|
||||
|
||||
vk::SurfaceCapabilitiesKHR const & surfaceCapabilities =
|
||||
surfaceCapabilities2.get<vk::SurfaceCapabilities2KHR>().surfaceCapabilities;
|
||||
vk::SurfaceCapabilitiesKHR const & surfaceCapabilities = surfaceCapabilities2.get<vk::SurfaceCapabilities2KHR>().surfaceCapabilities;
|
||||
cout( surfaceCapabilities );
|
||||
|
||||
if ( vk::su::contains( extensionProperties, "VK_AMD_display_native_hdr" ) )
|
||||
@@ -126,12 +118,10 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
|
||||
if ( vk::su::contains( extensionProperties, "VK_KHR_shared_presentable_image" ) )
|
||||
{
|
||||
vk::SharedPresentSurfaceCapabilitiesKHR sharedPresentSurfaceCapabilities =
|
||||
surfaceCapabilities2.get<vk::SharedPresentSurfaceCapabilitiesKHR>();
|
||||
vk::SharedPresentSurfaceCapabilitiesKHR sharedPresentSurfaceCapabilities = surfaceCapabilities2.get<vk::SharedPresentSurfaceCapabilitiesKHR>();
|
||||
std::cout << "\tSharedPresentSurfaceCapabilitiesKHR:\n";
|
||||
std::cout << "\t\t"
|
||||
<< "sharedPresentSupportedUsageFlags = "
|
||||
<< vk::to_string( sharedPresentSurfaceCapabilities.sharedPresentSupportedUsageFlags ) << "\n";
|
||||
<< "sharedPresentSupportedUsageFlags = " << vk::to_string( sharedPresentSurfaceCapabilities.sharedPresentSupportedUsageFlags ) << "\n";
|
||||
std::cout << "\n";
|
||||
}
|
||||
|
||||
@@ -141,15 +131,13 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
surfaceCapabilities2.get<vk::SurfaceCapabilitiesFullScreenExclusiveEXT>();
|
||||
std::cout << "\tSurfaceCapabilitiesFullScreenExclusiveEXT:\n";
|
||||
std::cout << "\t\t"
|
||||
<< "fullScreenExclusiveSupported = "
|
||||
<< !!surfaceCapabilitiesFullScreenExclusive.fullScreenExclusiveSupported << "\n";
|
||||
<< "fullScreenExclusiveSupported = " << !!surfaceCapabilitiesFullScreenExclusive.fullScreenExclusiveSupported << "\n";
|
||||
std::cout << "\n";
|
||||
}
|
||||
|
||||
if ( vk::su::contains( extensionProperties, "VK_KHR_surface_protected_capabilities" ) )
|
||||
{
|
||||
vk::SurfaceProtectedCapabilitiesKHR surfaceProtectedCapabilities =
|
||||
surfaceCapabilities2.get<vk::SurfaceProtectedCapabilitiesKHR>();
|
||||
vk::SurfaceProtectedCapabilitiesKHR surfaceProtectedCapabilities = surfaceCapabilities2.get<vk::SurfaceProtectedCapabilitiesKHR>();
|
||||
std::cout << "\tSurfaceProtectedCapabilitiesKHR:\n";
|
||||
std::cout << "\t\t"
|
||||
<< "supportsProtected = " << !!surfaceProtectedCapabilities.supportsProtected << "\n";
|
||||
@@ -158,8 +146,7 @@ int main( int /*argc*/, char ** /*argv*/ )
|
||||
}
|
||||
else
|
||||
{
|
||||
vk::SurfaceCapabilitiesKHR surfaceCapabilities =
|
||||
physicalDevices[i].getSurfaceCapabilitiesKHR( surfaceData.surface );
|
||||
vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevices[i].getSurfaceCapabilitiesKHR( surfaceData.surface );
|
||||
cout( surfaceCapabilities );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user