diff --git a/samples/10_InitRenderPass/10_InitRenderPass.cpp b/samples/10_InitRenderPass/10_InitRenderPass.cpp index 52555c3..ef78427 100644 --- a/samples/10_InitRenderPass/10_InitRenderPass.cpp +++ b/samples/10_InitRenderPass/10_InitRenderPass.cpp @@ -25,6 +25,15 @@ static char const* AppName = "10_InitRenderPass"; static char const* EngineName = "Vulkan.hpp"; +static std::vector getDeviceExtensions() +{ + std::vector extensions; + + extensions.push_back(VK_KHR_SWAPCHAIN_EXTENSION_NAME); + + return extensions; +} + static std::vector getInstanceExtensions() { std::vector extensions; @@ -170,7 +179,8 @@ int main(int /*argc*/, char * /*argv[]*/) // create a device float queuePriority = 0.0f; vk::DeviceQueueCreateInfo deviceQueueCreateInfo({}, static_cast(graphicsQueueFamilyIndex), 1, &queuePriority); - vk::UniqueDevice device = physicalDevices[0].createDeviceUnique(vk::DeviceCreateInfo({}, 1, &deviceQueueCreateInfo, 0, nullptr)); + std::vector deviceExtensionNames = getDeviceExtensions(); + vk::UniqueDevice device = physicalDevices[0].createDeviceUnique(vk::DeviceCreateInfo({}, 1, &deviceQueueCreateInfo, 0, nullptr, static_cast(deviceExtensionNames.size()), deviceExtensionNames.data())); // get the supported VkFormats vk::SurfaceCapabilitiesKHR surfaceCapabilities = physicalDevices[0].getSurfaceCapabilitiesKHR(surface.get());