Output warning to stderr if an extension is not supported (#756)

This commit is contained in:
Jérôme Leclercq 2020-08-27 19:36:24 +02:00 committed by GitHub
parent d5be770f55
commit 3298455373
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View file

@ -9,6 +9,7 @@
*/
#include <VulkanDevice.h>
#include <unordered_set>
namespace vks
{
@ -272,6 +273,12 @@ namespace vks
if (deviceExtensions.size() > 0)
{
for (const char* ext : deviceExtensions)
{
if (!extensionSupported(ext))
std::cerr << ext << " device extension support seems to be missing" << std::endl;
}
deviceCreateInfo.enabledExtensionCount = (uint32_t)deviceExtensions.size();
deviceCreateInfo.ppEnabledExtensionNames = deviceExtensions.data();
}