Set warnings as errors for the generator, the samples, and the tests.

This commit is contained in:
asuessenbach 2020-09-30 12:00:32 +02:00
parent 5ecb57bdc5
commit 8d1c84b3f5
43 changed files with 644 additions and 309 deletions

View File

@ -47,12 +47,6 @@ else()
message(WARNING " Could not find clang-format version 10 and up. Generated vulkan.hpp will not be nicely formatted.")
endif()
if(MSVC)
add_compile_options(/W4 /permissive-)
else(MSVC)
add_compile_options(-Wall)
endif(MSVC)
if (NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
endif()
@ -118,6 +112,12 @@ add_executable(VulkanHppGenerator
set_property(TARGET VulkanHppGenerator PROPERTY CXX_STANDARD 14)
if(MSVC)
target_compile_options(VulkanHppGenerator PRIVATE /W4 /WX /permissive-)
else(MSVC)
target_compile_options(VulkanHppGenerator PRIVATE -Wall -Wextra -pedantic -Werror)
endif(MSVC)
target_include_directories(VulkanHppGenerator PRIVATE ${VULKAN_HPP_TINYXML2_SRC_DIR})
option (VULKAN_HPP_RUN_GENERATOR "Run the HPP generator" OFF)

View File

@ -5586,17 +5586,6 @@ std::string
std::set<size_t> skippedParams = ::determineSkippedParams( returnParamIndex, vectorParamIndices );
if ( skippedParams.size() + ( commandData.handle.empty() ? 0 : 1 ) < commandData.params.size() )
{
// determine the last argument, where we might provide some default for
size_t lastArgument = INVALID_INDEX;
for ( size_t i = commandData.params.size() - 1; i < commandData.params.size(); i-- )
{
if ( skippedParams.find( i ) == skippedParams.end() )
{
lastArgument = i;
break;
}
}
str += " ";
bool argEncountered = false;
for ( size_t i = commandData.handle.empty() ? 0 : 1; i < commandData.params.size(); i++ )
@ -7198,7 +7187,7 @@ std::map<size_t, size_t>
{
if ( !it->len.empty() )
{
auto findIt = std::find_if( params.begin(), it, [this, &params, &it]( ParamData const & pd ) {
auto findIt = std::find_if( params.begin(), it, [this, &it]( ParamData const & pd ) {
return ( pd.name == it->len ) || isParamIndirect( it->len, pd );
} );
@ -11095,6 +11084,10 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h
# endif
#endif
#if !defined(__has_include)
# define __has_include(x) false
#endif
#if ( 201711 <= __cpp_impl_three_way_comparison ) && __has_include( <compare> )
# define VULKAN_HPP_HAS_SPACESHIP_OPERATOR
#endif

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : 02_EnumerateDevices
// Enumerate physical devices
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wunused-variable"
#elif defined( __GNUC__ )
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/utils.hpp"
#include "vulkan/vulkan.hpp"

View File

@ -85,7 +85,7 @@ int main( int /*argc*/, char ** /*argv*/ )
}
typeBits >>= 1;
}
assert( typeIndex != ~0 );
assert( typeIndex != uint32_t( ~0 ) );
vk::UniqueDeviceMemory depthMemory =
device->allocateMemoryUnique( vk::MemoryAllocateInfo( memoryRequirements.size, typeIndex ) );

View File

@ -15,14 +15,22 @@
// VulkanHpp Samples : 07_InitUniformBuffer
// Initialize a uniform buffer
#if defined( _MSC_VER )
# pragma warning( disable : 4127 ) // disable warning 4127: conditional expression is constant
# pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
#elif defined( __GNUC__ )
// don't know how to switch off that warning here
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/utils.hpp"
#include "vulkan/vulkan.hpp"
#include <iostream>
#define GLM_FORCE_RADIANS
#pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
# define GLM_FORCE_RADIANS
#include <glm/gtc/matrix_transform.hpp>
static char const * AppName = "07_InitUniformBuffer";

View File

@ -15,6 +15,15 @@
// VulkanHpp Samples : 09_InitDescriptorSet
// Initialize a descriptor set
#if defined( _MSC_VER )
# pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
#elif defined( __GNUC__ )
// don't know how to switch off that warning here
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/math.hpp"
#include "../utils/utils.hpp"
#include "vulkan/vulkan.hpp"
@ -22,8 +31,6 @@
#include <iostream>
#define GLM_FORCE_RADIANS
#pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
#include <glm/gtc/matrix_transform.hpp>
static char const * AppName = "09_InitDescriptorSet";

View File

@ -15,14 +15,21 @@
// VulkanHpp Samples : 10_InitRenderPass
// Initialize a render pass
#if defined( _MSC_VER )
# pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
#elif defined( __GNUC__ )
// don't know how to switch off that warning here
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/utils.hpp"
#include "vulkan/vulkan.hpp"
#include <iostream>
#define GLM_FORCE_RADIANS
#pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
#include <glm/gtc/matrix_transform.hpp>
static char const * AppName = "10_InitRenderPass";

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : 13_InitVertexBuffer
// Initialize vertex buffer
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/utils.hpp"
#include "vulkan/vulkan.hpp"

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : 14_InitPipeline
// Initialize graphics pipeline
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
// no need to ignore any warnings with GCC
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : 15_DrawCube
// Draw a cube
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -171,7 +181,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -23,6 +23,12 @@ if(NOT (SAMPLES_BUILD_ONLY_DYNAMIC AND SAMPLES_BUILD_WITH_LOCAL_VULKAN_HPP))
find_package(Vulkan REQUIRED)
endif()
if(MSVC)
add_compile_options(/W4 /WX /permissive-)
else(MSVC)
add_compile_options(-Wall -Wextra -pedantic -Werror)
endif(MSVC)
if (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_definitions(-DNOMINMAX -DVK_USE_PLATFORM_WIN32_KHR)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")

View File

@ -235,7 +235,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -63,12 +63,12 @@ int main( int /*argc*/, char ** /*argv*/ )
/* VULKAN_KEY_END */
}
catch ( vk::SystemError err )
catch ( vk::SystemError & err )
{
std::cout << "vk::SystemError: " << err.what() << std::endl;
exit( -1 );
}
catch ( std::exception err )
catch ( std::exception & err )
{
std::cout << "std::exception: " << err.what() << std::endl;
exit( -1 );

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : DrawTexturedCube
// Draw a textured cube
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -178,7 +188,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : DynamicUniform
// Draw 2 Cubes using dynamic uniform buffer
#if defined( _MSC_VER )
# pragma warning( disable : 4127 ) // conditional expression is constant
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -223,7 +233,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : EnableValidationWithCallback
// Show how to enable validation layers and provide callback
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wunused-variable"
#elif defined( __GNUC__ )
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/utils.hpp"
#include "vulkan/vulkan.hpp"

View File

@ -15,6 +15,18 @@
// VulkanHpp Samples : ImmutableSampler
// Use an immutable sampler to texture a cube.
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -189,7 +201,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : InitTexture
// Initialize texture
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wunused-variable"
#elif defined( __GNUC__ )
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : InputAttachment
// Use an input attachment to draw a yellow triangle
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
// no need to ignore any warnings with GCC
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -275,7 +285,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,18 @@
// VulkanHpp Samples : MultipleSets
// Use multiple descriptor sets to draw a textured cube.
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -257,7 +269,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : OcclusionQuery
// Use occlusion query to determine if drawing renders any samples.
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -212,7 +222,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( rv.result )
{
case vk::Result::eSuccess: break;
case vk::Result::eNotReady: std::cout << "vk::Device::getQueryPoolResults returned vk::Result::eNotReady !\n";
case vk::Result::eNotReady:
std::cout << "vk::Device::getQueryPoolResults returned vk::Result::eNotReady !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
@ -237,7 +249,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,15 @@
// VulkanHpp Samples : PhysicalDeviceFeatures
// Get the fine-grained features of the physical devices that can be supported by an implementation.
// ignore warning 4503: decorated name length exceeded, name was truncated
#if defined( _MSC_VER )
# pragma warning( disable : 4503 )
#elif defined( __GNUC__ )
// don't know how to switch off that warning here
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/utils.hpp"
#include "vulkan/vulkan.hpp"
@ -99,125 +108,125 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceYcbcrImageArraysFeaturesEXT>();
vk::PhysicalDeviceFeatures const & features = features2.get<vk::PhysicalDeviceFeatures2>().features;
std::cout << "\tFeatures:\n";
std::cout << "\t\talphaToOne : " << static_cast<bool>( features.alphaToOne ) << "\n";
std::cout << "\t\tdepthBiasClamp : " << static_cast<bool>( features.depthBiasClamp )
std::cout << "\t\talphaToOne : " << !!features.alphaToOne << "\n";
std::cout << "\t\tdepthBiasClamp : " << !!features.depthBiasClamp
<< "\n";
std::cout << "\t\tdepthBounds : " << static_cast<bool>( features.depthBounds )
std::cout << "\t\tdepthBounds : " << !!features.depthBounds
<< "\n";
std::cout << "\t\tdepthClamp : " << static_cast<bool>( features.depthClamp ) << "\n";
std::cout << "\t\tdepthClamp : " << !!features.depthClamp << "\n";
std::cout << "\t\tdrawIndirectFirstInstance : "
<< static_cast<bool>( features.drawIndirectFirstInstance ) << "\n";
std::cout << "\t\tdualSrcBlend : " << static_cast<bool>( features.dualSrcBlend )
<< !!features.drawIndirectFirstInstance << "\n";
std::cout << "\t\tdualSrcBlend : " << !!features.dualSrcBlend
<< "\n";
std::cout << "\t\tfillModeNonSolid : " << static_cast<bool>( features.fillModeNonSolid )
std::cout << "\t\tfillModeNonSolid : " << !!features.fillModeNonSolid
<< "\n";
std::cout << "\t\tfragmentStoresAndAtomics : "
<< static_cast<bool>( features.fragmentStoresAndAtomics ) << "\n";
std::cout << "\t\tfullDrawIndexUint32 : " << static_cast<bool>( features.fullDrawIndexUint32 )
<< !!features.fragmentStoresAndAtomics << "\n";
std::cout << "\t\tfullDrawIndexUint32 : " << !!features.fullDrawIndexUint32
<< "\n";
std::cout << "\t\tgeometryShader : " << static_cast<bool>( features.geometryShader )
std::cout << "\t\tgeometryShader : " << !!features.geometryShader
<< "\n";
std::cout << "\t\timageCubeArray : " << static_cast<bool>( features.imageCubeArray )
std::cout << "\t\timageCubeArray : " << !!features.imageCubeArray
<< "\n";
std::cout << "\t\tindependentBlend : " << static_cast<bool>( features.independentBlend )
std::cout << "\t\tindependentBlend : " << !!features.independentBlend
<< "\n";
std::cout << "\t\tinheritedQueries : " << static_cast<bool>( features.inheritedQueries )
std::cout << "\t\tinheritedQueries : " << !!features.inheritedQueries
<< "\n";
std::cout << "\t\tlargePoints : " << static_cast<bool>( features.largePoints )
std::cout << "\t\tlargePoints : " << !!features.largePoints
<< "\n";
std::cout << "\t\tlogicOp : " << static_cast<bool>( features.logicOp ) << "\n";
std::cout << "\t\tmultiDrawIndirect : " << static_cast<bool>( features.multiDrawIndirect )
std::cout << "\t\tlogicOp : " << !!features.logicOp << "\n";
std::cout << "\t\tmultiDrawIndirect : " << !!features.multiDrawIndirect
<< "\n";
std::cout << "\t\tmultiViewport : " << static_cast<bool>( features.multiViewport )
std::cout << "\t\tmultiViewport : " << !!features.multiViewport
<< "\n";
std::cout << "\t\tocclusionQueryPrecise : "
<< static_cast<bool>( features.occlusionQueryPrecise ) << "\n";
<< !!features.occlusionQueryPrecise << "\n";
std::cout << "\t\tpipelineStatisticsQuery : "
<< static_cast<bool>( features.pipelineStatisticsQuery ) << "\n";
std::cout << "\t\trobustBufferAccess : " << static_cast<bool>( features.robustBufferAccess )
<< !!features.pipelineStatisticsQuery << "\n";
std::cout << "\t\trobustBufferAccess : " << !!features.robustBufferAccess
<< "\n";
std::cout << "\t\tsamplerAnisotropy : " << static_cast<bool>( features.samplerAnisotropy )
std::cout << "\t\tsamplerAnisotropy : " << !!features.samplerAnisotropy
<< "\n";
std::cout << "\t\tsampleRateShading : " << static_cast<bool>( features.sampleRateShading )
std::cout << "\t\tsampleRateShading : " << !!features.sampleRateShading
<< "\n";
std::cout << "\t\tshaderClipDistance : " << static_cast<bool>( features.shaderClipDistance )
std::cout << "\t\tshaderClipDistance : " << !!features.shaderClipDistance
<< "\n";
std::cout << "\t\tshaderCullDistance : " << static_cast<bool>( features.shaderCullDistance )
std::cout << "\t\tshaderCullDistance : " << !!features.shaderCullDistance
<< "\n";
std::cout << "\t\tshaderFloat64 : " << static_cast<bool>( features.shaderFloat64 )
std::cout << "\t\tshaderFloat64 : " << !!features.shaderFloat64
<< "\n";
std::cout << "\t\tshaderImageGatherExtended : "
<< static_cast<bool>( features.shaderImageGatherExtended ) << "\n";
std::cout << "\t\tshaderInt16 : " << static_cast<bool>( features.shaderInt16 )
<< !!features.shaderImageGatherExtended << "\n";
std::cout << "\t\tshaderInt16 : " << !!features.shaderInt16
<< "\n";
std::cout << "\t\tshaderInt64 : " << static_cast<bool>( features.shaderInt64 )
std::cout << "\t\tshaderInt64 : " << !!features.shaderInt64
<< "\n";
std::cout << "\t\tshaderResourceMinLod : "
<< static_cast<bool>( features.shaderResourceMinLod ) << "\n";
<< !!features.shaderResourceMinLod << "\n";
std::cout << "\t\tshaderResourceResidency : "
<< static_cast<bool>( features.shaderResourceResidency ) << "\n";
<< !!features.shaderResourceResidency << "\n";
std::cout << "\t\tshaderSampledImageArrayDynamicIndexing : "
<< static_cast<bool>( features.shaderSampledImageArrayDynamicIndexing ) << "\n";
<< !!features.shaderSampledImageArrayDynamicIndexing << "\n";
std::cout << "\t\tshaderStorageBufferArrayDynamicIndexing : "
<< static_cast<bool>( features.shaderStorageBufferArrayDynamicIndexing ) << "\n";
<< !!features.shaderStorageBufferArrayDynamicIndexing << "\n";
std::cout << "\t\tshaderStorageImageArrayDynamicIndexing : "
<< static_cast<bool>( features.shaderStorageImageArrayDynamicIndexing ) << "\n";
<< !!features.shaderStorageImageArrayDynamicIndexing << "\n";
std::cout << "\t\tshaderStorageImageExtendedFormats : "
<< static_cast<bool>( features.shaderStorageImageExtendedFormats ) << "\n";
<< !!features.shaderStorageImageExtendedFormats << "\n";
std::cout << "\t\tshaderStorageImageMultisample : "
<< static_cast<bool>( features.shaderStorageImageMultisample ) << "\n";
<< !!features.shaderStorageImageMultisample << "\n";
std::cout << "\t\tshaderStorageImageReadWithoutFormat : "
<< static_cast<bool>( features.shaderStorageImageReadWithoutFormat ) << "\n";
<< !!features.shaderStorageImageReadWithoutFormat << "\n";
std::cout << "\t\tshaderStorageImageWriteWithoutFormat : "
<< static_cast<bool>( features.shaderStorageImageWriteWithoutFormat ) << "\n";
<< !!features.shaderStorageImageWriteWithoutFormat << "\n";
std::cout << "\t\tshaderTessellationAndGeometryPointSize : "
<< static_cast<bool>( features.shaderTessellationAndGeometryPointSize ) << "\n";
<< !!features.shaderTessellationAndGeometryPointSize << "\n";
std::cout << "\t\tshaderUniformBufferArrayDynamicIndexing : "
<< static_cast<bool>( features.shaderUniformBufferArrayDynamicIndexing ) << "\n";
std::cout << "\t\tsparseBinding : " << static_cast<bool>( features.sparseBinding )
<< !!features.shaderUniformBufferArrayDynamicIndexing << "\n";
std::cout << "\t\tsparseBinding : " << !!features.sparseBinding
<< "\n";
std::cout << "\t\tsparseResidency16Samples : "
<< static_cast<bool>( features.sparseResidency16Samples ) << "\n";
<< !!features.sparseResidency16Samples << "\n";
std::cout << "\t\tsparseResidency2Samples : "
<< static_cast<bool>( features.sparseResidency2Samples ) << "\n";
<< !!features.sparseResidency2Samples << "\n";
std::cout << "\t\tsparseResidency4Samples : "
<< static_cast<bool>( features.sparseResidency4Samples ) << "\n";
<< !!features.sparseResidency4Samples << "\n";
std::cout << "\t\tsparseResidency8Samples : "
<< static_cast<bool>( features.sparseResidency8Samples ) << "\n";
<< !!features.sparseResidency8Samples << "\n";
std::cout << "\t\tsparseResidencyAliased : "
<< static_cast<bool>( features.sparseResidencyAliased ) << "\n";
<< !!features.sparseResidencyAliased << "\n";
std::cout << "\t\tsparseResidencyBuffer : "
<< static_cast<bool>( features.sparseResidencyBuffer ) << "\n";
<< !!features.sparseResidencyBuffer << "\n";
std::cout << "\t\tsparseResidencyImage2D : "
<< static_cast<bool>( features.sparseResidencyImage2D ) << "\n";
<< !!features.sparseResidencyImage2D << "\n";
std::cout << "\t\tsparseResidencyImage3D : "
<< static_cast<bool>( features.sparseResidencyImage3D ) << "\n";
std::cout << "\t\ttessellationShader : " << static_cast<bool>( features.tessellationShader )
<< !!features.sparseResidencyImage3D << "\n";
std::cout << "\t\ttessellationShader : " << !!features.tessellationShader
<< "\n";
std::cout << "\t\ttextureCompressionASTC_LDR : "
<< static_cast<bool>( features.textureCompressionASTC_LDR ) << "\n";
<< !!features.textureCompressionASTC_LDR << "\n";
std::cout << "\t\ttextureCompressionBC : "
<< static_cast<bool>( features.textureCompressionBC ) << "\n";
<< !!features.textureCompressionBC << "\n";
std::cout << "\t\ttextureCompressionETC2 : "
<< static_cast<bool>( features.textureCompressionETC2 ) << "\n";
<< !!features.textureCompressionETC2 << "\n";
std::cout << "\t\tvariableMultisampleRate : "
<< static_cast<bool>( features.variableMultisampleRate ) << "\n";
<< !!features.variableMultisampleRate << "\n";
std::cout << "\t\tvertexPipelineStoresAndAtomics : "
<< static_cast<bool>( features.vertexPipelineStoresAndAtomics ) << "\n";
std::cout << "\t\twideLines : " << static_cast<bool>( features.wideLines ) << "\n";
<< !!features.vertexPipelineStoresAndAtomics << "\n";
std::cout << "\t\twideLines : " << !!features.wideLines << "\n";
std::cout << "\n";
vk::PhysicalDevice16BitStorageFeatures const & sixteenBitStorageFeatures =
features2.get<vk::PhysicalDevice16BitStorageFeatures>();
std::cout << "\t16BitStorageFeatures:\n";
std::cout << "\t\tstorageBuffer16BitAccess : "
<< static_cast<bool>( sixteenBitStorageFeatures.storageBuffer16BitAccess ) << "\n";
<< !!sixteenBitStorageFeatures.storageBuffer16BitAccess << "\n";
std::cout << "\t\tstorageInputOutput16 : "
<< static_cast<bool>( sixteenBitStorageFeatures.storageInputOutput16 ) << "\n";
<< !!sixteenBitStorageFeatures.storageInputOutput16 << "\n";
std::cout << "\t\tstoragePushConstant16 : "
<< static_cast<bool>( sixteenBitStorageFeatures.storagePushConstant16 ) << "\n";
<< !!sixteenBitStorageFeatures.storagePushConstant16 << "\n";
std::cout << "\t\tuniformAndStorageBuffer16BitAccess : "
<< static_cast<bool>( sixteenBitStorageFeatures.uniformAndStorageBuffer16BitAccess ) << "\n";
<< !!sixteenBitStorageFeatures.uniformAndStorageBuffer16BitAccess << "\n";
std::cout << "\n";
if ( vk::su::contains( extensionProperties, "VK_KHR_8bit_storage" ) )
@ -226,11 +235,11 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDevice8BitStorageFeaturesKHR>();
std::cout << "\t8BitStorageFeatures:\n";
std::cout << "\t\tstorageBuffer8BitAccess : "
<< static_cast<bool>( eightBitStorageFeatures.storageBuffer8BitAccess ) << "\n";
<< !!eightBitStorageFeatures.storageBuffer8BitAccess << "\n";
std::cout << "\t\tstoragePushConstant8 : "
<< static_cast<bool>( eightBitStorageFeatures.storagePushConstant8 ) << "\n";
<< !!eightBitStorageFeatures.storagePushConstant8 << "\n";
std::cout << "\t\tuniformAndStorageBuffer8BitAccess : "
<< static_cast<bool>( eightBitStorageFeatures.uniformAndStorageBuffer8BitAccess ) << "\n";
<< !!eightBitStorageFeatures.uniformAndStorageBuffer8BitAccess << "\n";
std::cout << "\n";
}
@ -240,7 +249,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceASTCDecodeFeaturesEXT>();
std::cout << "\tASTCDecodeFeature:\n";
std::cout << "\t\tdecodeModeSharedExponent : "
<< static_cast<bool>( astcDecodeFeatures.decodeModeSharedExponent ) << "\n";
<< !!astcDecodeFeatures.decodeModeSharedExponent << "\n";
std::cout << "\n";
}
@ -250,7 +259,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceBlendOperationAdvancedFeaturesEXT>();
std::cout << "\tBlendOperationAdvancedFeatures:\n";
std::cout << "\t\tadvancedBlendCoherentOperations : "
<< static_cast<bool>( blendOperationAdvancedFeatures.advancedBlendCoherentOperations ) << "\n";
<< !!blendOperationAdvancedFeatures.advancedBlendCoherentOperations << "\n";
std::cout << "\n";
}
@ -260,11 +269,11 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceBufferDeviceAddressFeaturesEXT>();
std::cout << "\tBufferDeviceAddressFeatures:\n";
std::cout << "\t\tbufferDeviceAddress : "
<< static_cast<bool>( bufferDeviceAddressFeatures.bufferDeviceAddress ) << "\n";
<< !!bufferDeviceAddressFeatures.bufferDeviceAddress << "\n";
std::cout << "\t\tbufferDeviceAddressCaptureReplay : "
<< static_cast<bool>( bufferDeviceAddressFeatures.bufferDeviceAddressCaptureReplay ) << "\n";
<< !!bufferDeviceAddressFeatures.bufferDeviceAddressCaptureReplay << "\n";
std::cout << "\t\tbufferDeviceAddressMultiDevice : "
<< static_cast<bool>( bufferDeviceAddressFeatures.bufferDeviceAddressMultiDevice ) << "\n";
<< !!bufferDeviceAddressFeatures.bufferDeviceAddressMultiDevice << "\n";
std::cout << "\n";
}
@ -273,7 +282,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceCoherentMemoryFeaturesAMD const & coherentMemoryFeatures =
features2.get<vk::PhysicalDeviceCoherentMemoryFeaturesAMD>();
std::cout << "\tCoherentMemoryFeatures:\n";
std::cout << "\t\tdeviceCoherentMemory : " << static_cast<bool>( coherentMemoryFeatures.deviceCoherentMemory )
std::cout << "\t\tdeviceCoherentMemory : " << !!coherentMemoryFeatures.deviceCoherentMemory
<< "\n";
std::cout << "\n";
}
@ -284,9 +293,9 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceComputeShaderDerivativesFeaturesNV>();
std::cout << "\tComputeShaderDerivativeFeatures:\n";
std::cout << "\t\tcomputeDerivativeGroupLinear : "
<< static_cast<bool>( computeShaderDerivativesFeatures.computeDerivativeGroupLinear ) << "\n";
<< !!computeShaderDerivativesFeatures.computeDerivativeGroupLinear << "\n";
std::cout << "\t\tcomputeDerivativeGroupQuads : "
<< static_cast<bool>( computeShaderDerivativesFeatures.computeDerivativeGroupQuads ) << "\n";
<< !!computeShaderDerivativesFeatures.computeDerivativeGroupQuads << "\n";
std::cout << "\n";
}
@ -296,9 +305,9 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceConditionalRenderingFeaturesEXT>();
std::cout << "\tConditionalRenderingFeatures:\n";
std::cout << "\t\tconditionalRendering : "
<< static_cast<bool>( conditionalRenderingFeatures.conditionalRendering ) << "\n";
<< !!conditionalRenderingFeatures.conditionalRendering << "\n";
std::cout << "\t\tinheritedConditionalRendering : "
<< static_cast<bool>( conditionalRenderingFeatures.inheritedConditionalRendering ) << "\n";
<< !!conditionalRenderingFeatures.inheritedConditionalRendering << "\n";
std::cout << "\n";
}
@ -308,9 +317,9 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceCooperativeMatrixFeaturesNV>();
std::cout << "\tCooperativeMatrixFeatures:\n";
std::cout << "\t\tcooperativeMatrix : "
<< static_cast<bool>( cooperativeMatrixFeatures.cooperativeMatrix ) << "\n";
<< !!cooperativeMatrixFeatures.cooperativeMatrix << "\n";
std::cout << "\t\tcooperativeMatrixRobustBufferAccess : "
<< static_cast<bool>( cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess ) << "\n";
<< !!cooperativeMatrixFeatures.cooperativeMatrixRobustBufferAccess << "\n";
std::cout << "\n";
}
@ -319,7 +328,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceCornerSampledImageFeaturesNV const & cornerSampledImageFeatures =
features2.get<vk::PhysicalDeviceCornerSampledImageFeaturesNV>();
std::cout << "\tCornerSampledImageFeatures:\n";
std::cout << "\t\tcornerSampledImage : " << static_cast<bool>( cornerSampledImageFeatures.cornerSampledImage )
std::cout << "\t\tcornerSampledImage : " << !!cornerSampledImageFeatures.cornerSampledImage
<< "\n";
std::cout << "\n";
}
@ -330,7 +339,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceCoverageReductionModeFeaturesNV>();
std::cout << "\tCoverageReductionModeFeatures:\n";
std::cout << "\t\tcoverageReductionMode : "
<< static_cast<bool>( coverageReductionModeFeatures.coverageReductionMode ) << "\n";
<< !!coverageReductionModeFeatures.coverageReductionMode << "\n";
std::cout << "\n";
}
@ -340,7 +349,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceDedicatedAllocationImageAliasingFeaturesNV>();
std::cout << "\tDedicatedAllocationAliasingFeatures:\n";
std::cout << "\t\tdedicatedAllocationImageAliasing : "
<< static_cast<bool>( dedicatedAllocationImageAliasingFeatures.dedicatedAllocationImageAliasing )
<< !!dedicatedAllocationImageAliasingFeatures.dedicatedAllocationImageAliasing
<< "\n";
std::cout << "\n";
}
@ -350,7 +359,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceDepthClipEnableFeaturesEXT const & depthClipEnabledFeatures =
features2.get<vk::PhysicalDeviceDepthClipEnableFeaturesEXT>();
std::cout << "\tDepthClipEnabledFeatures:\n";
std::cout << "\t\tdepthClipEnable : " << static_cast<bool>( depthClipEnabledFeatures.depthClipEnable ) << "\n";
std::cout << "\t\tdepthClipEnable : " << !!depthClipEnabledFeatures.depthClipEnable << "\n";
std::cout << "\n";
}
@ -360,55 +369,55 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceDescriptorIndexingFeaturesEXT>();
std::cout << "\tDescriptorIndexingFeatures:\n";
std::cout << "\t\tdescriptorBindingPartiallyBound : "
<< static_cast<bool>( descriptorIndexingFeatures.descriptorBindingPartiallyBound ) << "\n";
<< !!descriptorIndexingFeatures.descriptorBindingPartiallyBound << "\n";
std::cout << "\t\tdescriptorBindingSampledImageUpdateAfterBind : "
<< static_cast<bool>( descriptorIndexingFeatures.descriptorBindingSampledImageUpdateAfterBind )
<< !!descriptorIndexingFeatures.descriptorBindingSampledImageUpdateAfterBind
<< "\n";
std::cout << "\t\tdescriptorBindingStorageBufferUpdateAfterBind : "
<< static_cast<bool>( descriptorIndexingFeatures.descriptorBindingStorageBufferUpdateAfterBind )
<< !!descriptorIndexingFeatures.descriptorBindingStorageBufferUpdateAfterBind
<< "\n";
std::cout << "\t\tdescriptorBindingStorageImageUpdateAfterBind : "
<< static_cast<bool>( descriptorIndexingFeatures.descriptorBindingStorageImageUpdateAfterBind )
<< !!descriptorIndexingFeatures.descriptorBindingStorageImageUpdateAfterBind
<< "\n";
std::cout << "\t\tdescriptorBindingStorageTexelBufferUpdateAfterBind : "
<< static_cast<bool>( descriptorIndexingFeatures.descriptorBindingStorageTexelBufferUpdateAfterBind )
<< !!descriptorIndexingFeatures.descriptorBindingStorageTexelBufferUpdateAfterBind
<< "\n";
std::cout << "\t\tdescriptorBindingUniformBufferUpdateAfterBind : "
<< static_cast<bool>( descriptorIndexingFeatures.descriptorBindingUniformBufferUpdateAfterBind )
<< !!descriptorIndexingFeatures.descriptorBindingUniformBufferUpdateAfterBind
<< "\n";
std::cout << "\t\tdescriptorBindingUniformTexelBufferUpdateAfterBind : "
<< static_cast<bool>( descriptorIndexingFeatures.descriptorBindingUniformTexelBufferUpdateAfterBind )
<< !!descriptorIndexingFeatures.descriptorBindingUniformTexelBufferUpdateAfterBind
<< "\n";
std::cout << "\t\tdescriptorBindingUpdateUnusedWhilePending : "
<< static_cast<bool>( descriptorIndexingFeatures.descriptorBindingUpdateUnusedWhilePending ) << "\n";
<< !!descriptorIndexingFeatures.descriptorBindingUpdateUnusedWhilePending << "\n";
std::cout << "\t\tdescriptorBindingVariableDescriptorCount : "
<< static_cast<bool>( descriptorIndexingFeatures.descriptorBindingVariableDescriptorCount ) << "\n";
<< !!descriptorIndexingFeatures.descriptorBindingVariableDescriptorCount << "\n";
std::cout << "\t\truntimeDescriptorArray : "
<< static_cast<bool>( descriptorIndexingFeatures.runtimeDescriptorArray ) << "\n";
<< !!descriptorIndexingFeatures.runtimeDescriptorArray << "\n";
std::cout << "\t\tshaderInputAttachmentArrayDynamicIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderInputAttachmentArrayDynamicIndexing ) << "\n";
<< !!descriptorIndexingFeatures.shaderInputAttachmentArrayDynamicIndexing << "\n";
std::cout << "\t\tshaderInputAttachmentArrayNonUniformIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderInputAttachmentArrayNonUniformIndexing )
<< !!descriptorIndexingFeatures.shaderInputAttachmentArrayNonUniformIndexing
<< "\n";
std::cout << "\t\tshaderSampledImageArrayNonUniformIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderSampledImageArrayNonUniformIndexing ) << "\n";
<< !!descriptorIndexingFeatures.shaderSampledImageArrayNonUniformIndexing << "\n";
std::cout << "\t\tshaderStorageBufferArrayNonUniformIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderStorageBufferArrayNonUniformIndexing ) << "\n";
<< !!descriptorIndexingFeatures.shaderStorageBufferArrayNonUniformIndexing << "\n";
std::cout << "\t\tshaderStorageImageArrayNonUniformIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderStorageImageArrayNonUniformIndexing ) << "\n";
<< !!descriptorIndexingFeatures.shaderStorageImageArrayNonUniformIndexing << "\n";
std::cout << "\t\tshaderStorageTexelBufferArrayDynamicIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderStorageTexelBufferArrayDynamicIndexing )
<< !!descriptorIndexingFeatures.shaderStorageTexelBufferArrayDynamicIndexing
<< "\n";
std::cout << "\t\tshaderStorageTexelBufferArrayNonUniformIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderStorageTexelBufferArrayNonUniformIndexing )
<< !!descriptorIndexingFeatures.shaderStorageTexelBufferArrayNonUniformIndexing
<< "\n";
std::cout << "\t\tshaderUniformBufferArrayNonUniformIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderUniformBufferArrayNonUniformIndexing ) << "\n";
<< !!descriptorIndexingFeatures.shaderUniformBufferArrayNonUniformIndexing << "\n";
std::cout << "\t\tshaderUniformTexelBufferArrayDynamicIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderUniformTexelBufferArrayDynamicIndexing )
<< !!descriptorIndexingFeatures.shaderUniformTexelBufferArrayDynamicIndexing
<< "\n";
std::cout << "\t\tshaderUniformTexelBufferArrayNonUniformIndexing : "
<< static_cast<bool>( descriptorIndexingFeatures.shaderUniformTexelBufferArrayNonUniformIndexing )
<< !!descriptorIndexingFeatures.shaderUniformTexelBufferArrayNonUniformIndexing
<< "\n";
std::cout << "\n";
}
@ -418,7 +427,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceExclusiveScissorFeaturesNV const & exclusiveScissorFeatures =
features2.get<vk::PhysicalDeviceExclusiveScissorFeaturesNV>();
std::cout << "\tExclusiveScissorFeatures:\n";
std::cout << "\t\texclusiveScissor : " << static_cast<bool>( exclusiveScissorFeatures.exclusiveScissor )
std::cout << "\t\texclusiveScissor : " << !!exclusiveScissorFeatures.exclusiveScissor
<< "\n";
std::cout << "\n";
}
@ -429,11 +438,11 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceFragmentDensityMapFeaturesEXT>();
std::cout << "\tFragmentDensityMapFeatures:\n";
std::cout << "\t\tfragmentDensityMap : "
<< static_cast<bool>( fragmentDensityMapFeatures.fragmentDensityMap ) << "\n";
<< !!fragmentDensityMapFeatures.fragmentDensityMap << "\n";
std::cout << "\t\tfragmentDensityMapDynamic : "
<< static_cast<bool>( fragmentDensityMapFeatures.fragmentDensityMapDynamic ) << "\n";
<< !!fragmentDensityMapFeatures.fragmentDensityMapDynamic << "\n";
std::cout << "\t\tfragmentDensityMapNonSubsampledImages : "
<< static_cast<bool>( fragmentDensityMapFeatures.fragmentDensityMapNonSubsampledImages ) << "\n";
<< !!fragmentDensityMapFeatures.fragmentDensityMapNonSubsampledImages << "\n";
std::cout << "\n";
}
@ -443,7 +452,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceFragmentShaderBarycentricFeaturesNV>();
std::cout << "\tFragmentShaderBarycentricFeatures:\n";
std::cout << "\t\tfragmentShaderBarycentric : "
<< static_cast<bool>( fragmentShaderBarycentricFeatures.fragmentShaderBarycentric ) << "\n";
<< !!fragmentShaderBarycentricFeatures.fragmentShaderBarycentric << "\n";
std::cout << "\n";
}
@ -453,11 +462,11 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceFragmentShaderInterlockFeaturesEXT>();
std::cout << "\tFragmentShaderInterlockFeatures:\n";
std::cout << "\t\tfragmentShaderPixelInterlock : "
<< static_cast<bool>( fragmentShaderInterlockFeatures.fragmentShaderPixelInterlock ) << "\n";
<< !!fragmentShaderInterlockFeatures.fragmentShaderPixelInterlock << "\n";
std::cout << "\t\tfragmentShaderSampleInterlock : "
<< static_cast<bool>( fragmentShaderInterlockFeatures.fragmentShaderSampleInterlock ) << "\n";
<< !!fragmentShaderInterlockFeatures.fragmentShaderSampleInterlock << "\n";
std::cout << "\t\tfragmentShaderShadingRateInterlock : "
<< static_cast<bool>( fragmentShaderInterlockFeatures.fragmentShaderShadingRateInterlock ) << "\n";
<< !!fragmentShaderInterlockFeatures.fragmentShaderShadingRateInterlock << "\n";
std::cout << "\n";
}
@ -466,7 +475,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceHostQueryResetFeaturesEXT const & hostQueryResetFeatures =
features2.get<vk::PhysicalDeviceHostQueryResetFeaturesEXT>();
std::cout << "\tHostQueryResetFeatures:\n";
std::cout << "\t\thostQueryReset : " << static_cast<bool>( hostQueryResetFeatures.hostQueryReset ) << "\n";
std::cout << "\t\thostQueryReset : " << !!hostQueryResetFeatures.hostQueryReset << "\n";
std::cout << "\n";
}
@ -476,7 +485,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceImagelessFramebufferFeaturesKHR>();
std::cout << "\tImagelessFramebufferFeatures:\n";
std::cout << "\t\timagelessFramebuffer : "
<< static_cast<bool>( imagelessFramebufferFeatures.imagelessFramebuffer ) << "\n";
<< !!imagelessFramebufferFeatures.imagelessFramebuffer << "\n";
std::cout << "\n";
}
@ -485,7 +494,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceIndexTypeUint8FeaturesEXT const & indexTypeUint8Features =
features2.get<vk::PhysicalDeviceIndexTypeUint8FeaturesEXT>();
std::cout << "\tIndexTypeUint8Features:\n";
std::cout << "\t\tindexTypeUint8 : " << static_cast<bool>( indexTypeUint8Features.indexTypeUint8 ) << "\n";
std::cout << "\t\tindexTypeUint8 : " << !!indexTypeUint8Features.indexTypeUint8 << "\n";
std::cout << "\n";
}
@ -495,10 +504,10 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceInlineUniformBlockFeaturesEXT>();
std::cout << "\tInlineUniformBlockFeatures:\n";
std::cout << "\t\tdescriptorBindingInlineUniformBlockUpdateAfterBind : "
<< static_cast<bool>( inlineUniformBlockFeatures.descriptorBindingInlineUniformBlockUpdateAfterBind )
<< !!inlineUniformBlockFeatures.descriptorBindingInlineUniformBlockUpdateAfterBind
<< "\n";
std::cout << "\t\tinlineUniformBlock : "
<< static_cast<bool>( inlineUniformBlockFeatures.inlineUniformBlock ) << "\n";
<< !!inlineUniformBlockFeatures.inlineUniformBlock << "\n";
std::cout << "\n";
}
@ -507,18 +516,18 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceLineRasterizationFeaturesEXT const & lineRasterizationFeatures =
features2.get<vk::PhysicalDeviceLineRasterizationFeaturesEXT>();
std::cout << "\tLineRasterizationFeatures:\n";
std::cout << "\t\tbresenhamLines : " << static_cast<bool>( lineRasterizationFeatures.bresenhamLines )
std::cout << "\t\tbresenhamLines : " << !!lineRasterizationFeatures.bresenhamLines
<< "\n";
std::cout << "\t\trectangularLines : "
<< static_cast<bool>( lineRasterizationFeatures.rectangularLines ) << "\n";
std::cout << "\t\tsmoothLines : " << static_cast<bool>( lineRasterizationFeatures.smoothLines )
<< !!lineRasterizationFeatures.rectangularLines << "\n";
std::cout << "\t\tsmoothLines : " << !!lineRasterizationFeatures.smoothLines
<< "\n";
std::cout << "\t\tstippledBresenhamLines : "
<< static_cast<bool>( lineRasterizationFeatures.stippledBresenhamLines ) << "\n";
<< !!lineRasterizationFeatures.stippledBresenhamLines << "\n";
std::cout << "\t\tstippledRectangularLines : "
<< static_cast<bool>( lineRasterizationFeatures.stippledRectangularLines ) << "\n";
<< !!lineRasterizationFeatures.stippledRectangularLines << "\n";
std::cout << "\t\tstippledSmoothLines : "
<< static_cast<bool>( lineRasterizationFeatures.stippledSmoothLines ) << "\n";
<< !!lineRasterizationFeatures.stippledSmoothLines << "\n";
std::cout << "\n";
}
@ -527,7 +536,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceMemoryPriorityFeaturesEXT const & memoryPriorityFeatures =
features2.get<vk::PhysicalDeviceMemoryPriorityFeaturesEXT>();
std::cout << "\tMemoryPriorityFeatures:\n";
std::cout << "\t\tmemoryPriority : " << static_cast<bool>( memoryPriorityFeatures.memoryPriority ) << "\n";
std::cout << "\t\tmemoryPriority : " << !!memoryPriorityFeatures.memoryPriority << "\n";
std::cout << "\n";
}
@ -536,19 +545,19 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceMeshShaderFeaturesNV const & meshShaderFeatures =
features2.get<vk::PhysicalDeviceMeshShaderFeaturesNV>();
std::cout << "\tMeshShaderFeatures:\n";
std::cout << "\t\tmeshShader : " << static_cast<bool>( meshShaderFeatures.meshShader ) << "\n";
std::cout << "\t\ttaskShader : " << static_cast<bool>( meshShaderFeatures.taskShader ) << "\n";
std::cout << "\t\tmeshShader : " << !!meshShaderFeatures.meshShader << "\n";
std::cout << "\t\ttaskShader : " << !!meshShaderFeatures.taskShader << "\n";
std::cout << "\n";
}
vk::PhysicalDeviceMultiviewFeatures const & multiviewFeatures =
features2.get<vk::PhysicalDeviceMultiviewFeatures>();
std::cout << "\tMultiviewFeatures:\n";
std::cout << "\t\tmultiview : " << static_cast<bool>( multiviewFeatures.multiview ) << "\n";
std::cout << "\t\tmultiview : " << !!multiviewFeatures.multiview << "\n";
std::cout << "\t\tmultiviewGeometryShader : "
<< static_cast<bool>( multiviewFeatures.multiviewGeometryShader ) << "\n";
<< !!multiviewFeatures.multiviewGeometryShader << "\n";
std::cout << "\t\tmultiviewTessellationShader : "
<< static_cast<bool>( multiviewFeatures.multiviewTessellationShader ) << "\n";
<< !!multiviewFeatures.multiviewTessellationShader << "\n";
std::cout << "\n";
if ( vk::su::contains( extensionProperties, "VK_KHR_pipeline_executable_properties" ) )
@ -557,14 +566,14 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDevicePipelineExecutablePropertiesFeaturesKHR>();
std::cout << "\tPipelineExectuablePropertiesFeatures:\n";
std::cout << "\t\tpipelineExecutableInfo : "
<< static_cast<bool>( pipelineExecutablePropertiesFeatures.pipelineExecutableInfo ) << "\n";
<< !!pipelineExecutablePropertiesFeatures.pipelineExecutableInfo << "\n";
std::cout << "\n";
}
vk::PhysicalDeviceProtectedMemoryFeatures const & protectedMemoryFeatures =
features2.get<vk::PhysicalDeviceProtectedMemoryFeatures>();
std::cout << "\tProtectedMemoryFeatures:\n";
std::cout << "\t\tprotectedMemory : " << static_cast<bool>( protectedMemoryFeatures.protectedMemory ) << "\n";
std::cout << "\t\tprotectedMemory : " << !!protectedMemoryFeatures.protectedMemory << "\n";
std::cout << "\n";
if ( vk::su::contains( extensionProperties, "VK_NV_representative_fragment_test" ) )
@ -573,7 +582,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceRepresentativeFragmentTestFeaturesNV>();
std::cout << "\tRepresentativeFragmentTestFeatures:\n";
std::cout << "\t\trepresentativeFragmentTest : "
<< static_cast<bool>( representativeFragmentTestFeatures.representativeFragmentTest ) << "\n";
<< !!representativeFragmentTestFeatures.representativeFragmentTest << "\n";
std::cout << "\n";
}
@ -581,7 +590,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceSamplerYcbcrConversionFeatures>();
std::cout << "\tSamplerYcbcrConversionFeatures:\n";
std::cout << "\t\tsamplerYcbcrConversion : "
<< static_cast<bool>( samplerYcbcrConversionFeatures.samplerYcbcrConversion ) << "\n";
<< !!samplerYcbcrConversionFeatures.samplerYcbcrConversion << "\n";
std::cout << "\n";
if ( vk::su::contains( extensionProperties, "VK_EXT_scalar_block_layout" ) )
@ -589,7 +598,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceScalarBlockLayoutFeaturesEXT const & scalarBlockLayoutFeatures =
features2.get<vk::PhysicalDeviceScalarBlockLayoutFeaturesEXT>();
std::cout << "\tScalarBlockLayoutFeatures:\n";
std::cout << "\t\tscalarBlockLayout : " << static_cast<bool>( scalarBlockLayoutFeatures.scalarBlockLayout )
std::cout << "\t\tscalarBlockLayout : " << !!scalarBlockLayoutFeatures.scalarBlockLayout
<< "\n";
std::cout << "\n";
}
@ -600,9 +609,9 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceShaderAtomicInt64FeaturesKHR>();
std::cout << "\tShaderAtomicInt64Features:\n";
std::cout << "\t\tshaderBufferInt64Atomics : "
<< static_cast<bool>( shaderAtomicInt64Features.shaderBufferInt64Atomics ) << "\n";
<< !!shaderAtomicInt64Features.shaderBufferInt64Atomics << "\n";
std::cout << "\t\tshaderSharedInt64Atomics : "
<< static_cast<bool>( shaderAtomicInt64Features.shaderSharedInt64Atomics ) << "\n";
<< !!shaderAtomicInt64Features.shaderSharedInt64Atomics << "\n";
std::cout << "\n";
}
@ -612,7 +621,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT>();
std::cout << "\tShaderDemoteToHelperInvocationFeatures:\n";
std::cout << "\t\tshaderDemoteToHelperInvocation : "
<< static_cast<bool>( shaderDemoteToHelperInvocationFeatures.shaderDemoteToHelperInvocation ) << "\n";
<< !!shaderDemoteToHelperInvocationFeatures.shaderDemoteToHelperInvocation << "\n";
std::cout << "\n";
}
@ -620,7 +629,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceShaderDrawParametersFeatures>();
std::cout << "\tShaderDrawParametersFeature:\n";
std::cout << "\t\tshaderDrawParameters : "
<< static_cast<bool>( shaderDrawParametersFeature.shaderDrawParameters ) << "\n";
<< !!shaderDrawParametersFeature.shaderDrawParameters << "\n";
std::cout << "\n";
if ( vk::su::contains( extensionProperties, "VK_KHR_shader_float16_int8" ) )
@ -628,8 +637,8 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceShaderFloat16Int8FeaturesKHR const & shaderFloat16Int8Features =
features2.get<vk::PhysicalDeviceShaderFloat16Int8FeaturesKHR>();
std::cout << "\tShaderFloat16Int8Features:\n";
std::cout << "\t\tshaderFloat16 : " << static_cast<bool>( shaderFloat16Int8Features.shaderFloat16 ) << "\n";
std::cout << "\t\tshaderInt8 : " << static_cast<bool>( shaderFloat16Int8Features.shaderInt8 ) << "\n";
std::cout << "\t\tshaderFloat16 : " << !!shaderFloat16Int8Features.shaderFloat16 << "\n";
std::cout << "\t\tshaderInt8 : " << !!shaderFloat16Int8Features.shaderInt8 << "\n";
std::cout << "\n";
}
@ -638,7 +647,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceShaderImageFootprintFeaturesNV const & shaderImageFootprintFeatures =
features2.get<vk::PhysicalDeviceShaderImageFootprintFeaturesNV>();
std::cout << "\tShaderImageFootprintFeatures:\n";
std::cout << "\t\timageFootprint : " << static_cast<bool>( shaderImageFootprintFeatures.imageFootprint )
std::cout << "\t\timageFootprint : " << !!shaderImageFootprintFeatures.imageFootprint
<< "\n";
std::cout << "\n";
}
@ -649,7 +658,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceShaderIntegerFunctions2FeaturesINTEL>();
std::cout << "\tShaderIntegerFunctions2Features:\n";
std::cout << "\t\tshaderIntegerFunctions2 : "
<< static_cast<bool>( shaderIntegerFunctions2Features.shaderIntegerFunctions2 ) << "\n";
<< !!shaderIntegerFunctions2Features.shaderIntegerFunctions2 << "\n";
std::cout << "\n";
}
@ -658,7 +667,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceShaderSMBuiltinsFeaturesNV const & shaderSMBuiltinsFeatures =
features2.get<vk::PhysicalDeviceShaderSMBuiltinsFeaturesNV>();
std::cout << "\tShaderSMBuiltinsFeatures:\n";
std::cout << "\t\tshaderSMBuiltins : " << static_cast<bool>( shaderSMBuiltinsFeatures.shaderSMBuiltins )
std::cout << "\t\tshaderSMBuiltins : " << !!shaderSMBuiltinsFeatures.shaderSMBuiltins
<< "\n";
std::cout << "\n";
}
@ -669,7 +678,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR>();
std::cout << "\tShaderSubgroupExtendedTypeFeatures:\n";
std::cout << "\t\tshaderSubgroupExtendedTypes : "
<< static_cast<bool>( shaderSubgroupExtendedTypesFeatures.shaderSubgroupExtendedTypes ) << "\n";
<< !!shaderSubgroupExtendedTypesFeatures.shaderSubgroupExtendedTypes << "\n";
std::cout << "\n";
}
@ -679,9 +688,9 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceShadingRateImageFeaturesNV>();
std::cout << "\tShadingRateImageFeatures:\n";
std::cout << "\t\tshadingRateCoarseSampleOrder : "
<< static_cast<bool>( shadingRateImageFeatures.shadingRateCoarseSampleOrder ) << "\n";
<< !!shadingRateImageFeatures.shadingRateCoarseSampleOrder << "\n";
std::cout << "\t\tshadingRateImage : "
<< static_cast<bool>( shadingRateImageFeatures.shadingRateImage ) << "\n";
<< !!shadingRateImageFeatures.shadingRateImage << "\n";
std::cout << "\n";
}
@ -691,9 +700,9 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceSubgroupSizeControlFeaturesEXT>();
std::cout << "\tSubgroupSizeControlFeatures:\n";
std::cout << "\t\tcomputeFullSubgroups : "
<< static_cast<bool>( subgroupSizeControlFeatures.computeFullSubgroups ) << "\n";
<< !!subgroupSizeControlFeatures.computeFullSubgroups << "\n";
std::cout << "\t\tsubgroupSizeControl : "
<< static_cast<bool>( subgroupSizeControlFeatures.subgroupSizeControl ) << "\n";
<< !!subgroupSizeControlFeatures.subgroupSizeControl << "\n";
std::cout << "\n";
}
@ -703,7 +712,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceTexelBufferAlignmentFeaturesEXT>();
std::cout << "\tTexelBufferAlignmentFeatures:\n";
std::cout << "\t\ttexelBufferAlignment : "
<< static_cast<bool>( texelBufferAlignmentFeatures.texelBufferAlignment ) << "\n";
<< !!texelBufferAlignmentFeatures.texelBufferAlignment << "\n";
std::cout << "\n";
}
@ -713,7 +722,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceTextureCompressionASTCHDRFeaturesEXT>();
std::cout << "\tTextureCompressionASTCHHRFeatures:\n";
std::cout << "\t\ttextureCompressionASTC_HDR : "
<< static_cast<bool>( textureCompressionASTCHDRFeatures.textureCompressionASTC_HDR ) << "\n";
<< !!textureCompressionASTCHDRFeatures.textureCompressionASTC_HDR << "\n";
std::cout << "\n";
}
@ -722,7 +731,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceTimelineSemaphoreFeaturesKHR const & timelineSemaphoreFeatures =
features2.get<vk::PhysicalDeviceTimelineSemaphoreFeaturesKHR>();
std::cout << "\tTimelineSemaphoreFeatures:\n";
std::cout << "\t\ttimelineSemaphore :" << static_cast<bool>( timelineSemaphoreFeatures.timelineSemaphore )
std::cout << "\t\ttimelineSemaphore :" << !!timelineSemaphoreFeatures.timelineSemaphore
<< "\n";
std::cout << "\n";
}
@ -732,8 +741,8 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceTransformFeedbackFeaturesEXT const & transformFeedbackFeatures =
features2.get<vk::PhysicalDeviceTransformFeedbackFeaturesEXT>();
std::cout << "\tTransformFeedbackFeatures:\n";
std::cout << "\t\tgeometryStreams : " << static_cast<bool>( transformFeedbackFeatures.geometryStreams ) << "\n";
std::cout << "\t\ttransformFeedback : " << static_cast<bool>( transformFeedbackFeatures.transformFeedback )
std::cout << "\t\tgeometryStreams : " << !!transformFeedbackFeatures.geometryStreams << "\n";
std::cout << "\t\ttransformFeedback : " << !!transformFeedbackFeatures.transformFeedback
<< "\n";
std::cout << "\n";
}
@ -744,7 +753,7 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR>();
std::cout << "\tUniformBufferStandardLayoutFeatures:\n";
std::cout << "\t\tuniformBufferStandardLayout : "
<< static_cast<bool>( uniformBufferStandardLayoutFeatures.uniformBufferStandardLayout ) << "\n";
<< !!uniformBufferStandardLayoutFeatures.uniformBufferStandardLayout << "\n";
std::cout << "\n";
}
@ -754,9 +763,9 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceVariablePointersFeatures>();
std::cout << "\tVariablePointersFeatures:\n";
std::cout << "\t\tvariablePointers : "
<< static_cast<bool>( variablePointersFeatures.variablePointers ) << "\n";
<< !!variablePointersFeatures.variablePointers << "\n";
std::cout << "\t\tvariablePointersStorageBuffer : "
<< static_cast<bool>( variablePointersFeatures.variablePointersStorageBuffer ) << "\n";
<< !!variablePointersFeatures.variablePointersStorageBuffer << "\n";
std::cout << "\n";
}
@ -766,9 +775,9 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceVertexAttributeDivisorFeaturesEXT>();
std::cout << "\tVertexAttributeDivisorFeature:\n";
std::cout << "\t\tvertexAttributeInstanceRateDivisor : "
<< static_cast<bool>( vertexAttributeDivisorFeatures.vertexAttributeInstanceRateDivisor ) << "\n";
<< !!vertexAttributeDivisorFeatures.vertexAttributeInstanceRateDivisor << "\n";
std::cout << "\t\tvertexAttributeInstanceRateZeroDivisor : "
<< static_cast<bool>( vertexAttributeDivisorFeatures.vertexAttributeInstanceRateZeroDivisor ) << "\n";
<< !!vertexAttributeDivisorFeatures.vertexAttributeInstanceRateZeroDivisor << "\n";
std::cout << "\n";
}
@ -778,12 +787,12 @@ int main( int /*argc*/, char ** /*argv*/ )
features2.get<vk::PhysicalDeviceVulkanMemoryModelFeaturesKHR>();
std::cout << "\tVulkanMemoryModelFeatures:\n";
std::cout << "\t\tvulkanMemoryModel : "
<< static_cast<bool>( vulkanMemoryModelFeatures.vulkanMemoryModel ) << "\n";
<< !!vulkanMemoryModelFeatures.vulkanMemoryModel << "\n";
std::cout << "\t\tvulkanMemoryModelAvailabilityVisibilityChains : "
<< static_cast<bool>( vulkanMemoryModelFeatures.vulkanMemoryModelAvailabilityVisibilityChains )
<< !!vulkanMemoryModelFeatures.vulkanMemoryModelAvailabilityVisibilityChains
<< "\n";
std::cout << "\t\tvulkanMemoryModelDeviceScope : "
<< static_cast<bool>( vulkanMemoryModelFeatures.vulkanMemoryModelDeviceScope ) << "\n";
<< !!vulkanMemoryModelFeatures.vulkanMemoryModelDeviceScope << "\n";
std::cout << "\n";
}
@ -792,7 +801,7 @@ int main( int /*argc*/, char ** /*argv*/ )
vk::PhysicalDeviceYcbcrImageArraysFeaturesEXT const & ycbcrImageArraysFeatures =
features2.get<vk::PhysicalDeviceYcbcrImageArraysFeaturesEXT>();
std::cout << "\tYcbcrImageArraysFeatures:\n";
std::cout << "\t\tycbcrImageArrays : " << static_cast<bool>( ycbcrImageArraysFeatures.ycbcrImageArrays )
std::cout << "\t\tycbcrImageArrays : " << !!ycbcrImageArraysFeatures.ycbcrImageArrays
<< "\n";
std::cout << "\n";
}

View File

@ -49,7 +49,7 @@ int main( int /*argc*/, char ** /*argv*/ )
std::cout << "\t\t" << j << " : " << groupProperties[i].physicalDevices[j].getProperties().deviceName << "\n";
}
std::cout << "\t"
<< "subsetAllocation = " << static_cast<bool>( groupProperties[i].subsetAllocation ) << "\n";
<< "subsetAllocation = " << !!groupProperties[i].subsetAllocation << "\n";
std::cout << "\n";
if ( 1 < groupProperties[i].physicalDeviceCount )

View File

@ -468,13 +468,13 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "\n";
std::cout << "\t\t\t"
<< "standardSampleLocations = "
<< static_cast<bool>( properties.limits.standardSampleLocations ) << "\n";
<< !!properties.limits.standardSampleLocations << "\n";
std::cout << "\t\t\t"
<< "storageImageSampleCounts = "
<< vk::to_string( properties.limits.storageImageSampleCounts ) << "\n";
std::cout << "\t\t\t"
<< "strictLines = "
<< static_cast<bool>( properties.limits.strictLines ) << "\n";
<< !!properties.limits.strictLines << "\n";
std::cout << "\t\t\t"
<< "subPixelInterpolationOffsetBits = "
<< properties.limits.subPixelInterpolationOffsetBits << "\n";
@ -486,7 +486,7 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "\n";
std::cout << "\t\t\t"
<< "timestampComputeAndGraphics = "
<< static_cast<bool>( properties.limits.timestampComputeAndGraphics ) << "\n";
<< !!properties.limits.timestampComputeAndGraphics << "\n";
std::cout << "\t\t\t"
<< "timestampPeriod = " << properties.limits.timestampPeriod << "\n";
std::cout << "\t\t\t"
@ -501,19 +501,19 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "sparseProperties:\n";
std::cout << "\t\t\t"
<< "residencyAlignedMipSize = "
<< static_cast<bool>( properties.sparseProperties.residencyAlignedMipSize ) << "\n";
<< !!properties.sparseProperties.residencyAlignedMipSize << "\n";
std::cout << "\t\t\t"
<< "residencyNonResidentStrict = "
<< static_cast<bool>( properties.sparseProperties.residencyNonResidentStrict ) << "\n";
<< !!properties.sparseProperties.residencyNonResidentStrict << "\n";
std::cout << "\t\t\t"
<< "residencyStandard2DBlockShape = "
<< static_cast<bool>( properties.sparseProperties.residencyStandard2DBlockShape ) << "\n";
<< !!properties.sparseProperties.residencyStandard2DBlockShape << "\n";
std::cout << "\t\t\t"
<< "residencyStandard2DMultisampleBlockShape = "
<< static_cast<bool>( properties.sparseProperties.residencyStandard2DMultisampleBlockShape ) << "\n";
<< !!properties.sparseProperties.residencyStandard2DMultisampleBlockShape << "\n";
std::cout << "\t\t\t"
<< "residencyStandard3DBlockShape = "
<< static_cast<bool>( properties.sparseProperties.residencyStandard3DBlockShape ) << "\n";
<< !!properties.sparseProperties.residencyStandard3DBlockShape << "\n";
std::cout << "\n";
if ( vk::su::contains( extensionProperties, "VK_EXT_blend_operation_advanced" ) )
@ -524,23 +524,23 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "BlendOperationAdvancedProperties:\n";
std::cout << "\t\t"
<< "advancedBlendAllOperations = "
<< static_cast<bool>( blendOperationAdvancedProperties.advancedBlendAllOperations ) << "\n";
<< !!blendOperationAdvancedProperties.advancedBlendAllOperations << "\n";
std::cout << "\t\t"
<< "advancedBlendCorrelatedOverlap = "
<< static_cast<bool>( blendOperationAdvancedProperties.advancedBlendCorrelatedOverlap ) << "\n";
<< !!blendOperationAdvancedProperties.advancedBlendCorrelatedOverlap << "\n";
std::cout << "\t\t"
<< "advancedBlendIndependentBlend = "
<< static_cast<bool>( blendOperationAdvancedProperties.advancedBlendIndependentBlend ) << "\n";
<< !!blendOperationAdvancedProperties.advancedBlendIndependentBlend << "\n";
std::cout << "\t\t"
<< "advancedBlendMaxColorAttachments = "
<< blendOperationAdvancedProperties.advancedBlendMaxColorAttachments << "\n";
std::cout << "\t\t"
<< "advancedBlendNonPremultipliedDstColor = "
<< static_cast<bool>( blendOperationAdvancedProperties.advancedBlendNonPremultipliedDstColor )
<< !!blendOperationAdvancedProperties.advancedBlendNonPremultipliedDstColor
<< "\n";
std::cout << "\t\t"
<< "advancedBlendNonPremultipliedSrcColor = "
<< static_cast<bool>( blendOperationAdvancedProperties.advancedBlendNonPremultipliedSrcColor )
<< !!blendOperationAdvancedProperties.advancedBlendNonPremultipliedSrcColor
<< "\n";
std::cout << "\n";
}
@ -553,24 +553,24 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "ConservativeRasterizationProperties:\n";
std::cout << "\t\t"
<< "conservativePointAndLineRasterization = "
<< static_cast<bool>( conservativeRasterizationProperties.conservativePointAndLineRasterization )
<< !!conservativeRasterizationProperties.conservativePointAndLineRasterization
<< "\n";
std::cout << "\t\t"
<< "conservativeRasterizationPostDepthCoverage = "
<< static_cast<bool>( conservativeRasterizationProperties.conservativeRasterizationPostDepthCoverage )
<< !!conservativeRasterizationProperties.conservativeRasterizationPostDepthCoverage
<< "\n";
std::cout << "\t\t"
<< "degenerateLinesRasterized = "
<< static_cast<bool>( conservativeRasterizationProperties.degenerateLinesRasterized ) << "\n";
<< !!conservativeRasterizationProperties.degenerateLinesRasterized << "\n";
std::cout << "\t\t"
<< "degenerateTrianglesRasterized = "
<< static_cast<bool>( conservativeRasterizationProperties.degenerateTrianglesRasterized ) << "\n";
<< !!conservativeRasterizationProperties.degenerateTrianglesRasterized << "\n";
std::cout << "\t\t"
<< "extraPrimitiveOverestimationSizeGranularity = "
<< conservativeRasterizationProperties.extraPrimitiveOverestimationSizeGranularity << "\n";
std::cout << "\t\t"
<< "fullyCoveredFragmentShaderInputVariable = "
<< static_cast<bool>( conservativeRasterizationProperties.fullyCoveredFragmentShaderInputVariable )
<< !!conservativeRasterizationProperties.fullyCoveredFragmentShaderInputVariable
<< "\n";
std::cout << "\t\t"
<< "maxExtraPrimitiveOverestimationSize = "
@ -580,7 +580,7 @@ int main( int /*argc*/, char ** /*argv*/ )
<< conservativeRasterizationProperties.primitiveOverestimationSize << "\n";
std::cout << "\t\t"
<< "primitiveUnderestimation = "
<< static_cast<bool>( conservativeRasterizationProperties.primitiveUnderestimation ) << "\n";
<< !!conservativeRasterizationProperties.primitiveUnderestimation << "\n";
std::cout << "\n";
}
@ -604,10 +604,10 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "DepthStencilResolveProperties:\n";
std::cout << "\t\t"
<< "independentResolve = "
<< static_cast<bool>( depthStencilResolveProperties.independentResolve ) << "\n";
<< !!depthStencilResolveProperties.independentResolve << "\n";
std::cout << "\t\t"
<< "independentResolveNone = "
<< static_cast<bool>( depthStencilResolveProperties.independentResolveNone ) << "\n";
<< !!depthStencilResolveProperties.independentResolveNone << "\n";
std::cout << "\t\t"
<< "supportedDepthResolveModes = "
<< vk::to_string( depthStencilResolveProperties.supportedDepthResolveModes ) << "\n";
@ -673,30 +673,29 @@ int main( int /*argc*/, char ** /*argv*/ )
<< descriptorIndexingProperties.maxUpdateAfterBindDescriptorsInAllPools << "\n";
std::cout << "\t\t"
<< "quadDivergentImplicitLod = "
<< static_cast<bool>( descriptorIndexingProperties.quadDivergentImplicitLod ) << "\n";
<< !!descriptorIndexingProperties.quadDivergentImplicitLod << "\n";
std::cout << "\t\t"
<< "robustBufferAccessUpdateAfterBind = "
<< static_cast<bool>( descriptorIndexingProperties.robustBufferAccessUpdateAfterBind ) << "\n";
<< !!descriptorIndexingProperties.robustBufferAccessUpdateAfterBind << "\n";
std::cout << "\t\t"
<< "shaderInputAttachmentArrayNonUniformIndexingNative = "
<< static_cast<bool>(
descriptorIndexingProperties.shaderInputAttachmentArrayNonUniformIndexingNative )
<< !!descriptorIndexingProperties.shaderInputAttachmentArrayNonUniformIndexingNative
<< "\n";
std::cout << "\t\t"
<< "shaderSampledImageArrayNonUniformIndexingNative = "
<< static_cast<bool>( descriptorIndexingProperties.shaderSampledImageArrayNonUniformIndexingNative )
<< !!descriptorIndexingProperties.shaderSampledImageArrayNonUniformIndexingNative
<< "\n";
std::cout << "\t\t"
<< "shaderStorageBufferArrayNonUniformIndexingNative = "
<< static_cast<bool>( descriptorIndexingProperties.shaderStorageBufferArrayNonUniformIndexingNative )
<< !!descriptorIndexingProperties.shaderStorageBufferArrayNonUniformIndexingNative
<< "\n";
std::cout << "\t\t"
<< "shaderStorageImageArrayNonUniformIndexingNative = "
<< static_cast<bool>( descriptorIndexingProperties.shaderStorageImageArrayNonUniformIndexingNative )
<< !!descriptorIndexingProperties.shaderStorageImageArrayNonUniformIndexingNative
<< "\n";
std::cout << "\t\t"
<< "shaderUniformBufferArrayNonUniformIndexingNative = "
<< static_cast<bool>( descriptorIndexingProperties.shaderUniformBufferArrayNonUniformIndexingNative )
<< !!descriptorIndexingProperties.shaderUniformBufferArrayNonUniformIndexingNative
<< "\n";
std::cout << "\n";
}
@ -758,49 +757,49 @@ int main( int /*argc*/, char ** /*argv*/ )
<< vk::to_string( floatControlsProperties.roundingModeIndependence ) << "\n";
std::cout << "\t\t"
<< "shaderDenormFlushToZeroFloat16 = "
<< static_cast<bool>( floatControlsProperties.shaderDenormFlushToZeroFloat16 ) << "\n";
<< !!floatControlsProperties.shaderDenormFlushToZeroFloat16 << "\n";
std::cout << "\t\t"
<< "shaderDenormFlushToZeroFloat32 = "
<< static_cast<bool>( floatControlsProperties.shaderDenormFlushToZeroFloat32 ) << "\n";
<< !!floatControlsProperties.shaderDenormFlushToZeroFloat32 << "\n";
std::cout << "\t\t"
<< "shaderDenormFlushToZeroFloat64 = "
<< static_cast<bool>( floatControlsProperties.shaderDenormFlushToZeroFloat64 ) << "\n";
<< !!floatControlsProperties.shaderDenormFlushToZeroFloat64 << "\n";
std::cout << "\t\t"
<< "shaderDenormPreserveFloat16 = "
<< static_cast<bool>( floatControlsProperties.shaderDenormPreserveFloat16 ) << "\n";
<< !!floatControlsProperties.shaderDenormPreserveFloat16 << "\n";
std::cout << "\t\t"
<< "shaderDenormPreserveFloat32 = "
<< static_cast<bool>( floatControlsProperties.shaderDenormPreserveFloat32 ) << "\n";
<< !!floatControlsProperties.shaderDenormPreserveFloat32 << "\n";
std::cout << "\t\t"
<< "shaderDenormPreserveFloat64 = "
<< static_cast<bool>( floatControlsProperties.shaderDenormPreserveFloat64 ) << "\n";
<< !!floatControlsProperties.shaderDenormPreserveFloat64 << "\n";
std::cout << "\t\t"
<< "shaderRoundingModeRTEFloat16 = "
<< static_cast<bool>( floatControlsProperties.shaderRoundingModeRTEFloat16 ) << "\n";
<< !!floatControlsProperties.shaderRoundingModeRTEFloat16 << "\n";
std::cout << "\t\t"
<< "shaderRoundingModeRTEFloat32 = "
<< static_cast<bool>( floatControlsProperties.shaderRoundingModeRTEFloat32 ) << "\n";
<< !!floatControlsProperties.shaderRoundingModeRTEFloat32 << "\n";
std::cout << "\t\t"
<< "shaderRoundingModeRTEFloat64 = "
<< static_cast<bool>( floatControlsProperties.shaderRoundingModeRTEFloat64 ) << "\n";
<< !!floatControlsProperties.shaderRoundingModeRTEFloat64 << "\n";
std::cout << "\t\t"
<< "shaderRoundingModeRTZFloat16 = "
<< static_cast<bool>( floatControlsProperties.shaderRoundingModeRTZFloat16 ) << "\n";
<< !!floatControlsProperties.shaderRoundingModeRTZFloat16 << "\n";
std::cout << "\t\t"
<< "shaderRoundingModeRTZFloat32 = "
<< static_cast<bool>( floatControlsProperties.shaderRoundingModeRTZFloat32 ) << "\n";
<< !!floatControlsProperties.shaderRoundingModeRTZFloat32 << "\n";
std::cout << "\t\t"
<< "shaderRoundingModeRTZFloat64 = "
<< static_cast<bool>( floatControlsProperties.shaderRoundingModeRTZFloat64 ) << "\n";
<< !!floatControlsProperties.shaderRoundingModeRTZFloat64 << "\n";
std::cout << "\t\t"
<< "shaderSignedZeroInfNanPreserveFloat16 = "
<< static_cast<bool>( floatControlsProperties.shaderSignedZeroInfNanPreserveFloat16 ) << "\n";
<< !!floatControlsProperties.shaderSignedZeroInfNanPreserveFloat16 << "\n";
std::cout << "\t\t"
<< "shaderSignedZeroInfNanPreserveFloat32 = "
<< static_cast<bool>( floatControlsProperties.shaderSignedZeroInfNanPreserveFloat32 ) << "\n";
<< !!floatControlsProperties.shaderSignedZeroInfNanPreserveFloat32 << "\n";
std::cout << "\t\t"
<< "shaderSignedZeroInfNanPreserveFloat64 = "
<< static_cast<bool>( floatControlsProperties.shaderSignedZeroInfNanPreserveFloat64 ) << "\n";
<< !!floatControlsProperties.shaderSignedZeroInfNanPreserveFloat64 << "\n";
std::cout << "\n";
}
@ -812,7 +811,7 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "FragmentDensityProperties:\n";
std::cout << "\t\t"
<< "fragmentDensityInvocations = "
<< static_cast<bool>( fragmentDensityMapProperties.fragmentDensityInvocations ) << "\n";
<< !!fragmentDensityMapProperties.fragmentDensityInvocations << "\n";
std::cout << "\t\t"
<< "maxFragmentDensityTexelSize = " << fragmentDensityMapProperties.maxFragmentDensityTexelSize.width
<< " x " << fragmentDensityMapProperties.maxFragmentDensityTexelSize.height << "\n";
@ -834,7 +833,7 @@ int main( int /*argc*/, char ** /*argv*/ )
std::cout << "\t\t"
<< "deviceNodeMask = " << std::hex << idProperties.deviceNodeMask << std::dec << "\n";
std::cout << "\t\t"
<< "deviceLUIDValid = " << static_cast<bool>( idProperties.deviceLUIDValid ) << "\n";
<< "deviceLUIDValid = " << !!idProperties.deviceLUIDValid << "\n";
std::cout << "\n";
if ( vk::su::contains( extensionProperties, "VK_EXT_inline_uniform_block" ) )
@ -935,7 +934,7 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "MultiviewPerViewAttributesProperties:\n";
std::cout << "\t\t"
<< "perViewPositionAllComponents = "
<< static_cast<bool>( multiviewPerViewAttributesProperties.perViewPositionAllComponents ) << "\n";
<< !!multiviewPerViewAttributesProperties.perViewPositionAllComponents << "\n";
std::cout << "\n";
}
@ -983,7 +982,7 @@ int main( int /*argc*/, char ** /*argv*/ )
std::cout << "\t"
<< "ProtectedMemoryProperties:\n";
std::cout << "\t\t"
<< "protectedNoFault = " << static_cast<bool>( protectedMemoryProperties.protectedNoFault ) << "\n";
<< "protectedNoFault = " << !!protectedMemoryProperties.protectedNoFault << "\n";
std::cout << "\n";
if ( vk::su::contains( extensionProperties, "VK_KHR_push_descriptor" ) )
@ -1045,7 +1044,7 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "sampleLocationSubPixelBits = " << sampleLocationProperties.sampleLocationSubPixelBits << "\n";
std::cout << "\t\t"
<< "variableSampleLocations = "
<< static_cast<bool>( sampleLocationProperties.variableSampleLocations ) << "\n";
<< !!sampleLocationProperties.variableSampleLocations << "\n";
std::cout << "\n";
}
@ -1057,10 +1056,10 @@ int main( int /*argc*/, char ** /*argv*/ )
<< "SamplerFilterMinmaxProperties:\n";
std::cout << "\t\t"
<< "filterMinmaxImageComponentMapping = "
<< static_cast<bool>( samplerFilterMinmaxProperties.filterMinmaxImageComponentMapping ) << "\n";
<< !!samplerFilterMinmaxProperties.filterMinmaxImageComponentMapping << "\n";
std::cout << "\t\t"
<< "filterMinmaxSingleComponentFormats = "
<< static_cast<bool>( samplerFilterMinmaxProperties.filterMinmaxSingleComponentFormats ) << "\n";
<< !!samplerFilterMinmaxProperties.filterMinmaxSingleComponentFormats << "\n";
std::cout << "\n";
}
@ -1150,7 +1149,7 @@ int main( int /*argc*/, char ** /*argv*/ )
std::cout << "\t"
<< "SubgroupProperties:\n";
std::cout << "\t\t"
<< "quadOperationsInAllStages = " << static_cast<bool>( subgroupProperties.quadOperationsInAllStages )
<< "quadOperationsInAllStages = " << !!subgroupProperties.quadOperationsInAllStages
<< "\n";
std::cout << "\t\t"
<< "subgroupSize = " << subgroupProperties.subgroupSize << "\n";
@ -1202,14 +1201,14 @@ int main( int /*argc*/, char ** /*argv*/ )
<< texelBufferAlignmentProperties.storageTexelBufferOffsetAlignmentBytes << "\n";
std::cout << "\t\t"
<< "storageTexelBufferOffsetSingleTexelAlignment = "
<< static_cast<bool>( texelBufferAlignmentProperties.storageTexelBufferOffsetSingleTexelAlignment )
<< !!texelBufferAlignmentProperties.storageTexelBufferOffsetSingleTexelAlignment
<< "\n";
std::cout << "\t\t"
<< "uniformTexelBufferOffsetAlignmentBytes = "
<< texelBufferAlignmentProperties.uniformTexelBufferOffsetAlignmentBytes << "\n";
std::cout << "\t\t"
<< "uniformTexelBufferOffsetSingleTexelAlignment = "
<< static_cast<bool>( texelBufferAlignmentProperties.uniformTexelBufferOffsetSingleTexelAlignment )
<< !!texelBufferAlignmentProperties.uniformTexelBufferOffsetSingleTexelAlignment
<< "\n";
std::cout << "\n";
}
@ -1240,17 +1239,17 @@ int main( int /*argc*/, char ** /*argv*/ )
<< transformFeedbackProperties.maxTransformFeedbackStreams << "\n";
std::cout << "\t\t"
<< "transformFeedbackDraw = "
<< static_cast<bool>( transformFeedbackProperties.transformFeedbackDraw ) << "\n";
<< !!transformFeedbackProperties.transformFeedbackDraw << "\n";
std::cout << "\t\t"
<< "transformFeedbackQueries = "
<< static_cast<bool>( transformFeedbackProperties.transformFeedbackQueries ) << "\n";
<< !!transformFeedbackProperties.transformFeedbackQueries << "\n";
std::cout << "\t\t"
<< "transformFeedbackRasterizationStreamSelect = "
<< static_cast<bool>( transformFeedbackProperties.transformFeedbackRasterizationStreamSelect )
<< !!transformFeedbackProperties.transformFeedbackRasterizationStreamSelect
<< "\n";
std::cout << "\t\t"
<< "transformFeedbackStreamsLinesTriangles = "
<< static_cast<bool>( transformFeedbackProperties.transformFeedbackStreamsLinesTriangles ) << "\n";
<< !!transformFeedbackProperties.transformFeedbackStreamsLinesTriangles << "\n";
std::cout << "\n";
}

View File

@ -15,6 +15,18 @@
// VulkanHpp Samples : PipelineCache
// This sample tries to save and reuse pipeline cache data between runs.
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -158,7 +170,7 @@ int main( int /*argc*/, char ** /*argv*/ )
{
// Determine cache size
readCacheStream.seekg( 0, readCacheStream.end );
startCacheSize = vk::su::checked_cast<size_t>( readCacheStream.tellg() );
startCacheSize = static_cast<size_t>( readCacheStream.tellg() );
readCacheStream.seekg( 0, readCacheStream.beg );
// Allocate memory to hold the initial cache data
@ -352,7 +364,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,18 @@
// VulkanHpp Samples : PipelineDerivative
// This sample creates pipeline derivative and draws with it.
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -308,7 +320,9 @@ void main()
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,18 @@
// VulkanHpp Samples : PushConstants
// Use push constants in a simple shader, validate the correct value was read.
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -236,7 +248,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : PushDescriptors
// Use Push Descriptors to Draw Textured Cube
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -214,7 +224,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -13,6 +13,19 @@
// limitations under the License.
//
// ignore warning 4127: conditional expression is constant
#if defined( _MSC_VER )
# pragma warning( disable : 4127 )
#elif defined( __clang__ )
# if ( 10 <= __clang_major__ )
# pragma clang diagnostic ignored "-Wdeprecated-volatile" // to keep glm/detail/type_half.inl compiling
# endif
#elif defined( __GNUC__ )
// don't know how to switch off that warning here
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "CameraManipulator.hpp"
#include <glm/glm.hpp>
@ -166,7 +179,7 @@ namespace vk
void CameraManipulator::wheel( int value )
{
float fValue = static_cast<float>( value );
float dx = ( fValue * abs( fValue ) ) / static_cast<float>( m_windowSize[0] );
float dx = ( fValue * std::abs( fValue ) ) / static_cast<float>( m_windowSize[0] );
glm::vec3 z = m_cameraPosition - m_centerPosition;
float length = z.length() * 0.1f;
@ -265,8 +278,7 @@ namespace vk
orbit( glm::vec2( delta[0], -delta[1] ), true );
}
break;
default:
break;
default: break;
}
update();

View File

@ -15,6 +15,22 @@
// VulkanHpp Samples : RayTracing
// Simple sample how to ray trace using Vulkan
#if defined( _MSC_VER )
# pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
# if ( 10 <= __clang_major__ )
# pragma clang diagnostic ignored "-Wdeprecated-volatile" // to keep glm/detail/type_half.inl compiling
# endif
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
// clang-format off
// we need to include vulkan.hpp before glfw3.h, so stop clang-format to reorder them
#include <vulkan/vulkan.hpp>
@ -27,8 +43,6 @@
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#define GLM_FORCE_RADIANS
#define GLM_ENABLE_EXPERIMENTAL
#pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
#include "../utils/shaders.hpp"
#include "../utils/utils.hpp"
#include "CameraManipulator.hpp"
@ -542,11 +556,11 @@ static void cursorPosCallback( GLFWwindow * window, double mouseX, double mouseY
vk::su::CameraManipulator::MouseButton mouseButton =
( glfwGetMouseButton( window, GLFW_MOUSE_BUTTON_LEFT ) == GLFW_PRESS )
? vk::su::CameraManipulator::MouseButton::Left
: ( glfwGetMouseButton( window, GLFW_MOUSE_BUTTON_MIDDLE ) == GLFW_PRESS )
? vk::su::CameraManipulator::MouseButton::Middle
: ( glfwGetMouseButton( window, GLFW_MOUSE_BUTTON_RIGHT ) == GLFW_PRESS )
? vk::su::CameraManipulator::MouseButton::Right
: vk::su::CameraManipulator::MouseButton::None;
: ( glfwGetMouseButton( window, GLFW_MOUSE_BUTTON_MIDDLE ) == GLFW_PRESS )
? vk::su::CameraManipulator::MouseButton::Middle
: ( glfwGetMouseButton( window, GLFW_MOUSE_BUTTON_RIGHT ) == GLFW_PRESS )
? vk::su::CameraManipulator::MouseButton::Right
: vk::su::CameraManipulator::MouseButton::None;
if ( mouseButton != vk::su::CameraManipulator::MouseButton::None )
{
vk::su::CameraManipulator::ModifierFlags modifiers;
@ -639,7 +653,7 @@ glm::vec3 randomVec3( float minValue, float maxValue )
randomDistribution( randomGenerator ) );
}
size_t roundUp( size_t value, size_t alignment )
uint32_t roundUp( uint32_t value, uint32_t alignment )
{
return ( ( value + alignment - 1 ) / alignment ) * alignment;
}
@ -772,7 +786,7 @@ int main( int /*argc*/, char ** /*argv*/ )
std::vector<vk::UniqueFramebuffer> framebuffers = vk::su::createFramebuffers(
device, renderPass, swapChainData.imageViews, depthBufferData.imageView, windowExtent );
bool samplerAnisotropy = supportedFeatures.get<vk::PhysicalDeviceFeatures2>().features.samplerAnisotropy;
bool samplerAnisotropy = !!supportedFeatures.get<vk::PhysicalDeviceFeatures2>().features.samplerAnisotropy;
// create some simple checkerboard textures, randomly sized and colored
const size_t textureCount = 10;
@ -1120,24 +1134,24 @@ int main( int /*argc*/, char ** /*argv*/ )
uint32_t shaderGroupHandleSize =
propertiesChain.get<vk::PhysicalDeviceRayTracingPropertiesNV>().shaderGroupHandleSize;
vk::DeviceSize raygenShaderBindingOffset = 0; // starting with raygen
uint32_t raygenShaderTableSize = shaderGroupHandleSize; // one raygen shader
vk::DeviceSize missShaderBindingOffset =
uint32_t raygenShaderBindingOffset = 0; // starting with raygen
uint32_t raygenShaderTableSize = shaderGroupHandleSize; // one raygen shader
uint32_t missShaderBindingOffset =
raygenShaderBindingOffset + roundUp( raygenShaderTableSize, shaderGroupBaseAlignment );
vk::DeviceSize missShaderBindingStride = shaderGroupHandleSize;
uint32_t missShaderTableSize = vk::su::checked_cast<uint32_t>( 2 * missShaderBindingStride ); // two raygen shaders
vk::DeviceSize hitShaderBindingOffset =
uint32_t missShaderBindingStride = shaderGroupHandleSize;
uint32_t missShaderTableSize = 2 * missShaderBindingStride; // two raygen shaders
uint32_t hitShaderBindingOffset =
missShaderBindingOffset + roundUp( missShaderTableSize, shaderGroupBaseAlignment );
vk::DeviceSize hitShaderBindingStride = shaderGroupHandleSize;
uint32_t hitShaderTableSize = vk::su::checked_cast<uint32_t>( 2 * hitShaderBindingStride ); // two hit shaders
uint32_t hitShaderBindingStride = shaderGroupHandleSize;
uint32_t hitShaderTableSize = 2 * hitShaderBindingStride; // two hit shaders
vk::DeviceSize shaderBindingTableSize = hitShaderBindingOffset + hitShaderTableSize;
uint32_t shaderBindingTableSize = hitShaderBindingOffset + hitShaderTableSize;
std::vector<uint8_t> shaderHandleStorage( shaderBindingTableSize );
device->getRayTracingShaderGroupHandlesNV(
(void)device->getRayTracingShaderGroupHandlesNV(
*rayTracingPipeline, 0, 1, raygenShaderTableSize, &shaderHandleStorage[raygenShaderBindingOffset] );
device->getRayTracingShaderGroupHandlesNV(
(void)device->getRayTracingShaderGroupHandlesNV(
*rayTracingPipeline, 1, 2, missShaderTableSize, &shaderHandleStorage[missShaderBindingOffset] );
device->getRayTracingShaderGroupHandlesNV(
(void)device->getRayTracingShaderGroupHandlesNV(
*rayTracingPipeline, 3, 2, hitShaderTableSize, &shaderHandleStorage[hitShaderBindingOffset] );
vk::su::BufferData shaderBindingTableBufferData( physicalDevice,
@ -1308,7 +1322,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
frameIndex = ( frameIndex + 1 ) % IMGUI_VK_QUEUED_FRAMES;

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : SecondaryCommandBuffer
// Draw several cubes using primary and secondary command buffers
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
// no need to ignore any warnings with GCC
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -234,7 +244,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -15,6 +15,18 @@
// VulkanHpp Samples : SeparateImageSampler
// Use separate image and sampler in descriptor set and shader to draw a textured cube.
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -257,7 +269,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -120,8 +120,7 @@ int main( int /*argc*/, char ** /*argv*/ )
surfaceCapabilities2.get<vk::DisplayNativeHdrSurfaceCapabilitiesAMD>();
std::cout << "\tDisplayNativeHdrSurfaceCapabilitiesAMD:\n";
std::cout << "\t\t"
<< "localDimmingSupport = "
<< static_cast<bool>( displayNativeHdrSurfaceCapabilities.localDimmingSupport ) << "\n";
<< "localDimmingSupport = " << !!displayNativeHdrSurfaceCapabilities.localDimmingSupport << "\n";
std::cout << "\n";
}
@ -143,7 +142,7 @@ int main( int /*argc*/, char ** /*argv*/ )
std::cout << "\tSurfaceCapabilitiesFullScreenExclusiveEXT:\n";
std::cout << "\t\t"
<< "fullScreenExclusiveSupported = "
<< static_cast<bool>( surfaceCapabilitiesFullScreenExclusive.fullScreenExclusiveSupported ) << "\n";
<< !!surfaceCapabilitiesFullScreenExclusive.fullScreenExclusiveSupported << "\n";
std::cout << "\n";
}
@ -153,8 +152,7 @@ int main( int /*argc*/, char ** /*argv*/ )
surfaceCapabilities2.get<vk::SurfaceProtectedCapabilitiesKHR>();
std::cout << "\tSurfaceProtectedCapabilitiesKHR:\n";
std::cout << "\t\t"
<< "supportsProtected = " << static_cast<bool>( surfaceProtectedCapabilities.supportsProtected )
<< "\n";
<< "supportsProtected = " << !!surfaceProtectedCapabilities.supportsProtected << "\n";
std::cout << "\n";
}
}

View File

@ -15,6 +15,16 @@
// VulkanHpp Samples : Template
// Template sample to start from. Draw textured cube with mostly helpers.
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __GNUC__ )
# if ( 9 <= __GNUC__ )
# pragma GCC diagnostic ignored "-Winit-list-lifetime"
# endif
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "../utils/geometries.hpp"
#include "../utils/math.hpp"
#include "../utils/shaders.hpp"
@ -175,7 +185,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -208,7 +208,9 @@ int main( int /*argc*/, char ** /*argv*/ )
switch ( result )
{
case vk::Result::eSuccess: break;
case vk::Result::eSuboptimalKHR: std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
case vk::Result::eSuboptimalKHR:
std::cout << "vk::Queue::presentKHR returned vk::Result::eSuboptimalKHR !\n";
break;
default: assert( false ); // an unexpected result is returned !
}
std::this_thread::sleep_for( std::chrono::milliseconds( 1000 ) );

View File

@ -13,6 +13,15 @@
// limitations under the License.
//
// ignore warning 4127: conditional expression is constant
#if defined( _MSC_VER )
# pragma warning( disable : 4127 )
#elif defined( __GNUC__ )
// don't know how to switch off that warning here
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "math.hpp"
namespace vk

View File

@ -13,14 +13,18 @@
// limitations under the License.
//
#include <vulkan/vulkan.hpp>
#define GLM_FORCE_RADIANS
#if defined(_MSC_VER)
#pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
#if defined( _MSC_VER )
# pragma warning( disable : 4201 ) // disable warning C4201: nonstandard extension used: nameless struct/union; needed
// to get glm/detail/type_vec?.hpp without warnings
#elif defined( __GNUC__ )
// don't know how to switch off that warning here
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include <vulkan/vulkan.hpp>
#define GLM_FORCE_RADIANS
#include <glm/gtc/matrix_transform.hpp>
namespace vk

View File

@ -13,6 +13,16 @@
// limitations under the License.
//
#if defined( _MSC_VER )
// no need to ignore any warnings with MSVC
#elif defined( __clang__ )
# pragma clang diagnostic ignored "-Wmissing-braces"
#elif defined( __GNUC__ )
// no need to ignore any warnings with GCC
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "utils.hpp"
#include "vulkan/vulkan.hpp"
@ -521,7 +531,7 @@ namespace vk
}
typeBits >>= 1;
}
assert( typeIndex != ~0 );
assert( typeIndex != uint32_t(~0) );
return typeIndex;
}
@ -1046,7 +1056,6 @@ namespace vk
bool forceStaging )
: format( vk::Format::eR8G8B8A8Unorm ), extent( extent_ )
{
vk::PhysicalDeviceMemoryProperties memoryProperties = physicalDevice.getMemoryProperties();
vk::FormatProperties formatProperties = physicalDevice.getFormatProperties( format );
formatFeatureFlags |= vk::FormatFeatureFlagBits::eSampledImage;

View File

@ -343,8 +343,10 @@ namespace vk
VULKAN_HPP_INLINE TargetType checked_cast( SourceType value )
{
static_assert( sizeof( TargetType ) <= sizeof( SourceType ), "No need to cast from smaller to larger type!" );
static_assert( !std::numeric_limits<TargetType>::is_signed, "Only unsigned types supported!" );
static_assert( std::numeric_limits<SourceType>::is_integer, "Only integer types supported!" );
static_assert( !std::numeric_limits<SourceType>::is_signed, "Only unsigned types supported!" );
static_assert( std::numeric_limits<TargetType>::is_integer, "Only integer types supported!" );
static_assert( !std::numeric_limits<TargetType>::is_signed, "Only unsigned types supported!" );
assert( value <= std::numeric_limits<TargetType>::max() );
return static_cast<TargetType>( value );
}

View File

@ -24,6 +24,12 @@ if (NOT (TESTS_BUILD_ONLY_DYNAMIC AND TESTS_BUILD_WITH_LOCAL_VULKAN_HPP))
find_package(Vulkan REQUIRED)
endif()
if(MSVC)
add_compile_options(/W4 /WX /permissive-)
else(MSVC)
add_compile_options(-Wall -Wextra -pedantic -Werror)
endif(MSVC)
if (WIN32)
add_definitions(-DNOMINMAX -DVK_USE_PLATFORM_WIN32_KHR)
elseif(UNIX)

View File

@ -15,6 +15,15 @@
// VulkanHpp Samples : DeviceFunctions
// Compile test on device functions
// ignore warning 4189: local variable is initialized but not referenced
#if defined( _MSC_VER )
# pragma warning( disable : 4189 )
#elif defined( __GNUC__ )
# pragma GCC diagnostic ignored "-Wunused-variable"
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#include "vulkan/vulkan.hpp"
#include <iostream>

View File

@ -15,6 +15,15 @@
// VulkanHpp Tests : StructureChain
// Compile-test for StructureChains
// ignore warning 4189: local variable is initialized but not referenced
#if defined( _MSC_VER )
# pragma warning( disable : 4189 )
#elif defined( __GNUC__ )
# pragma GCC diagnostic ignored "-Wunused-variable"
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
#define VULKAN_HPP_DISPATCH_LOADER_DYNAMIC 1
#include "vulkan/vulkan.hpp"
@ -24,14 +33,6 @@
static char const * AppName = "StructureChain";
static char const * EngineName = "Vulkan.hpp";
#if defined( _MSC_VER )
# pragma warning( disable : 4189 )
#elif defined( __GNUC__ )
# pragma GCC diagnostic ignored "-Wunused-variable"
#else
// unknow compiler... just ignore the warnings for yourselves ;)
#endif
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
template <typename T>

View File

@ -81,6 +81,10 @@ extern "C" __declspec( dllimport ) FARPROC __stdcall GetProcAddress( HINSTANCE h
# endif
#endif
#if !defined( __has_include )
# define __has_include( x ) false
#endif
#if ( 201711 <= __cpp_impl_three_way_comparison ) && __has_include( <compare> )
# define VULKAN_HPP_HAS_SPACESHIP_OPERATOR
#endif