physical_device.hpp

1
2
3
4
5
6
7
8
#pragma once


#include <planet/vk/forward.hpp>
#include <planet/vk/helpers.hpp>


namespace planet::vk {

Vulkan physical device

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    class physical_device final {
        VkPhysicalDevice handle;

      public:
        physical_device(VkPhysicalDevice, VkSurfaceKHR);

        VkPhysicalDevice get() const noexcept { return handle; }

        VkPhysicalDeviceProperties properties = {};
        VkPhysicalDeviceFeatures features = {};
        VkPhysicalDeviceMemoryProperties memory_properties = {};

        VkSampleCountFlagBits msaa_samples = VK_SAMPLE_COUNT_1_BIT;

        std::vector<VkExtensionProperties> extensions;

API wrappers

vkGetPhysicalDeviceFormatProperties

32
33
34
35
36
        VkFormatProperties format_properties(VkFormat) const;
    };


}