2023-09-24 16:16:10 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <set>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <vulkan/vulkan.h>
|
|
|
|
|
|
|
|
#include "utils.h"
|
2023-10-14 22:57:47 +00:00
|
|
|
#include "surface.h"
|
2023-09-24 16:16:10 +00:00
|
|
|
|
|
|
|
namespace Engine {
|
|
|
|
class LogicalDevice;
|
|
|
|
|
|
|
|
class PhysicalDevice {
|
|
|
|
friend class LogicalDevice;
|
|
|
|
public:
|
|
|
|
PhysicalDevice(VkPhysicalDevice raw, const QueueFamilyIndices& indices, const SwapChainSupportDetails& swapChainSupport);
|
|
|
|
|
2023-10-14 22:57:47 +00:00
|
|
|
void recreateSwapChainSupportDetails(const Surface* surface);
|
|
|
|
|
2023-09-24 16:16:10 +00:00
|
|
|
static bool checkDeviceExtensionSupport(VkPhysicalDevice device, std::set<std::string> requiredExtensions);
|
|
|
|
|
|
|
|
const QueueFamilyIndices indices;
|
2023-10-14 22:57:47 +00:00
|
|
|
SwapChainSupportDetails swapChainSupport;
|
2023-09-24 16:16:10 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
VkPhysicalDevice vk;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|