extensions.hpp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#pragma once


#include <vulkan/vulkan.h>

#include <vector>


namespace planet::vk::sdl {
    class window;
}


namespace planet::vk {

Vulkan extensions and validation layers

18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
    struct extensions final {
        std::vector<char const *> vulkan_extensions,
                device_extensions{VK_KHR_SWAPCHAIN_EXTENSION_NAME},
                validation_layers;


        extensions();
        extensions(vk::sdl::window &);


        bool has_validation() const { return not validation_layers.empty(); }


        static std::span<VkLayerProperties const> supported_validation_layers();
    };


}