diff --git a/src/Magnum/Vk/vk-info.cpp b/src/Magnum/Vk/vk-info.cpp index 92d44509d..590e572dc 100644 --- a/src/Magnum/Vk/vk-info.cpp +++ b/src/Magnum/Vk/vk-info.cpp @@ -25,6 +25,7 @@ #include +#include "Magnum/Vk/DeviceFeatures.h" #include "Magnum/Vk/Extensions.h" #include "Magnum/Vk/ExtensionProperties.h" #include "Magnum/Vk/InstanceCreateInfo.h" @@ -307,6 +308,48 @@ int main(int argc, char** argv) { /* If we wanted only extension strings, exit now */ if(args.isSet("extension-strings")) return 0; + Debug{} << "Feature support:"; + { + #ifndef DOXYGEN_GENERATING_OUTPUT /* It gets really confused */ + const Vk::DeviceFeatures features = device.features(); + #define _c(value, field) \ + { \ + Debug d; \ + d << " " << #value << sixtyfourSpaces.prefix(63 - sizeof(#value)); \ + if(features & Vk::DeviceFeature::value) \ + d << "SUPPORTED"; \ + else \ + d << " - "; \ + } + #define _cver(value, field, suffix, version) \ + { \ + Debug d; \ + d << " " << #value << sixtyfourSpaces.prefix(63 - sizeof(#value)); \ + if(features & Vk::DeviceFeature::value) \ + d << "SUPPORTED"; \ + else if(device.isVersionSupported(Vk::Version::version)) \ + d << " - "; \ + else \ + d << " n/a "; \ + } + #define _cext(value, field, suffix, extension) \ + { \ + Debug d; \ + d << " " << #value << sixtyfourSpaces.prefix(63 - sizeof(#value)); \ + if(features & Vk::DeviceFeature::value) \ + d << "SUPPORTED"; \ + else if(device.isVersionSupported(Vk::Extensions::extension::coreVersion()) || extensionProperties.isSupported()) \ + d << " - "; \ + else \ + d << " n/a "; \ + } + #include "Magnum/Vk/Implementation/deviceFeatureMapping.hpp" + #undef _c + #undef _cver + #undef _cext + #endif + } + Debug{} << "Queue families:"; for(UnsignedInt i = 0; i != device.queueFamilyCount(); ++i) { Debug{} << " " << i << Debug::nospace << ":" << device.queueFamilyFlags(i);