Vulkan: Add physical device retrieval
Former-commit-id: 5c0e8256123fcfe5d3563b224bdcc11efa645fd3 [formerly cecb3404e98b1be4a5176fe27c1dec533e16701a] Former-commit-id: a2fa7f6d96e3fe6f43af97b5c882d939a947fb9a
This commit is contained in:
28
include/Nazara/Vulkan/VkPhysicalDevice.hpp
Normal file
28
include/Nazara/Vulkan/VkPhysicalDevice.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// Copyright (C) 2016 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Vulkan"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_VULKAN_VKPHYSICALDEVICE_HPP
|
||||
#define NAZARA_VULKAN_VKPHYSICALDEVICE_HPP
|
||||
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
namespace Vk
|
||||
{
|
||||
struct PhysicalDevice
|
||||
{
|
||||
VkPhysicalDevice device;
|
||||
VkPhysicalDeviceFeatures features;
|
||||
VkPhysicalDeviceMemoryProperties memoryProperties;
|
||||
VkPhysicalDeviceProperties properties;
|
||||
std::vector<VkQueueFamilyProperties> queues;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NAZARA_VULKAN_VKPHYSICALDEVICE_HPP
|
||||
@@ -13,7 +13,10 @@
|
||||
#include <Nazara/Vulkan/Config.hpp>
|
||||
#include <Nazara/Vulkan/VkDevice.hpp>
|
||||
#include <Nazara/Vulkan/VkInstance.hpp>
|
||||
#include <Nazara/Vulkan/VkPhysicalDevice.hpp>
|
||||
#include <Nazara/Vulkan/VkSurface.hpp>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
@@ -27,6 +30,8 @@ namespace Nz
|
||||
|
||||
static Vk::Instance& GetInstance();
|
||||
|
||||
static const std::vector<Vk::PhysicalDevice>& GetPhysicalDevices();
|
||||
|
||||
static bool Initialize();
|
||||
|
||||
static bool IsInitialized();
|
||||
@@ -39,6 +44,7 @@ namespace Nz
|
||||
|
||||
private:
|
||||
static std::list<Vk::Device> s_devices;
|
||||
static std::vector<Vk::PhysicalDevice> s_physDevices;
|
||||
static Vk::Instance s_instance;
|
||||
static ParameterList s_initializationParameters;
|
||||
static unsigned int s_moduleReferenceCounter;
|
||||
|
||||
Reference in New Issue
Block a user