Class for device.
More...
#include <Device.hpp>
|
| Device (Window &window) |
|
| ~Device () |
|
| Device (const Device &)=delete |
|
Device & | operator= (const Device &)=delete |
|
| Device (Device &&)=delete |
|
Device & | operator= (Device &&)=delete |
|
VkCommandPool | getCommandPool () const |
|
VkDevice | device () const |
|
VkSurfaceKHR | surface () const |
|
VkQueue | graphicsQueue () const |
|
VkQueue | presentQueue () const |
|
SwapChainSupportDetails | getSwapChainSupport () const |
|
uint32_t | findMemoryType (uint32_t typeFilter, VkMemoryPropertyFlags properties) const |
|
QueueFamilyIndices | findPhysicalQueueFamilies () const |
|
VkPhysicalDevice | getPhysicalDevice () const |
|
VkQueue | getGraphicsQueue () const |
|
VkFormat | findSupportedFormat (const std::vector< VkFormat > &candidates, VkImageTiling tiling, VkFormatFeatureFlags features) const |
|
VkPhysicalDeviceProperties | getProperties () const |
|
VkInstance | getInstance () const |
|
void | createBuffer (VkDeviceSize size, VkBufferUsageFlags usage, VkMemoryPropertyFlags properties, VkBuffer &buffer, VkDeviceMemory &bufferMemory) const |
|
VkCommandBuffer | beginSingleTimeCommands () const |
|
void | endSingleTimeCommands (VkCommandBuffer commandBuffer) const |
|
void | copyBuffer (VkBuffer srcBuffer, VkBuffer dstBuffer, VkDeviceSize size) const |
|
void | copyBufferToImage (VkBuffer buffer, VkImage image, uint32_t width, uint32_t height, uint32_t layerCount) const |
|
void | createImageWithInfo (const VkImageCreateInfo &imageInfo, VkMemoryPropertyFlags properties, VkImage &image, VkDeviceMemory &imageMemory) const |
|
void | transitionImageLayout (VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout, uint32_t mipLevels=1, uint32_t layerCount=1) const |
|
Class for device.
Definition at line 35 of file Device.hpp.
◆ Device() [1/3]
ven::Device::Device |
( |
Window & | window | ) |
|
|
explicit |
◆ ~Device()
◆ Device() [2/3]
ven::Device::Device |
( |
const Device & | | ) |
|
|
delete |
◆ Device() [3/3]
ven::Device::Device |
( |
Device && | | ) |
|
|
delete |
◆ beginSingleTimeCommands()
VkCommandBuffer ven::Device::beginSingleTimeCommands |
( |
| ) |
const |
|
nodiscard |
◆ checkDeviceExtensionSupport()
bool ven::Device::checkDeviceExtensionSupport |
( |
VkPhysicalDevice | device | ) |
const |
|
private |
◆ checkValidationLayerSupport()
bool ven::Device::checkValidationLayerSupport |
( |
| ) |
const |
|
nodiscardprivate |
◆ copyBuffer()
void ven::Device::copyBuffer |
( |
VkBuffer | srcBuffer, |
|
|
VkBuffer | dstBuffer, |
|
|
VkDeviceSize | size ) const |
◆ copyBufferToImage()
void ven::Device::copyBufferToImage |
( |
VkBuffer | buffer, |
|
|
VkImage | image, |
|
|
uint32_t | width, |
|
|
uint32_t | height, |
|
|
uint32_t | layerCount ) const |
◆ createBuffer()
void ven::Device::createBuffer |
( |
VkDeviceSize | size, |
|
|
VkBufferUsageFlags | usage, |
|
|
VkMemoryPropertyFlags | properties, |
|
|
VkBuffer & | buffer, |
|
|
VkDeviceMemory & | bufferMemory ) const |
◆ createCommandPool()
void ven::Device::createCommandPool |
( |
| ) |
|
|
private |
◆ createImageWithInfo()
void ven::Device::createImageWithInfo |
( |
const VkImageCreateInfo & | imageInfo, |
|
|
VkMemoryPropertyFlags | properties, |
|
|
VkImage & | image, |
|
|
VkDeviceMemory & | imageMemory ) const |
◆ createInstance()
void ven::Device::createInstance |
( |
| ) |
|
|
private |
◆ createLogicalDevice()
void ven::Device::createLogicalDevice |
( |
| ) |
|
|
private |
◆ createSurface()
void ven::Device::createSurface |
( |
| ) |
|
|
inlineprivate |
◆ device()
VkDevice ven::Device::device |
( |
| ) |
const |
|
inlinenodiscard |
Definition at line 54 of file Device.hpp.
References m_device.
Referenced by ven::Renderer::createCommandBuffers(), ven::ARenderSystemBase::createPipelineLayout(), ven::DescriptorPool::DescriptorPool(), ven::DescriptorSetLayout::DescriptorSetLayout(), ven::DescriptorPool::freeDescriptors(), ven::Gui::init(), ven::DescriptorPool::resetPool(), ven::Texture::Texture(), ven::ARenderSystemBase::~ARenderSystemBase(), ven::DescriptorPool::~DescriptorPool(), ven::DescriptorSetLayout::~DescriptorSetLayout(), ven::Shaders::~Shaders(), and ven::SwapChain::~SwapChain().
◆ endSingleTimeCommands()
void ven::Device::endSingleTimeCommands |
( |
VkCommandBuffer | commandBuffer | ) |
const |
◆ findMemoryType()
uint32_t ven::Device::findMemoryType |
( |
uint32_t | typeFilter, |
|
|
VkMemoryPropertyFlags | properties ) const |
|
nodiscard |
◆ findPhysicalQueueFamilies()
◆ findQueueFamilies()
◆ findSupportedFormat()
VkFormat ven::Device::findSupportedFormat |
( |
const std::vector< VkFormat > & | candidates, |
|
|
VkImageTiling | tiling, |
|
|
VkFormatFeatureFlags | features ) const |
|
nodiscard |
◆ getCommandPool()
VkCommandPool ven::Device::getCommandPool |
( |
| ) |
const |
|
inlinenodiscard |
◆ getGraphicsQueue()
VkQueue ven::Device::getGraphicsQueue |
( |
| ) |
const |
|
inlinenodiscard |
◆ getInstance()
VkInstance ven::Device::getInstance |
( |
| ) |
const |
|
inlinenodiscard |
◆ getPhysicalDevice()
VkPhysicalDevice ven::Device::getPhysicalDevice |
( |
| ) |
const |
|
inlinenodiscard |
◆ getProperties()
VkPhysicalDeviceProperties ven::Device::getProperties |
( |
| ) |
const |
|
inlinenodiscard |
◆ getRequiredExtensions()
std::vector< const char * > ven::Device::getRequiredExtensions |
( |
| ) |
const |
|
nodiscardprivate |
◆ getSwapChainSupport()
◆ graphicsQueue()
VkQueue ven::Device::graphicsQueue |
( |
| ) |
const |
|
inlinenodiscard |
◆ hasGlfwRequiredInstanceExtensions()
void ven::Device::hasGlfwRequiredInstanceExtensions |
( |
| ) |
const |
|
private |
◆ isDeviceSuitable()
bool ven::Device::isDeviceSuitable |
( |
VkPhysicalDevice | device | ) |
const |
|
private |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ pickPhysicalDevice()
void ven::Device::pickPhysicalDevice |
( |
| ) |
|
|
private |
◆ populateDebugMessengerCreateInfo()
void ven::Device::populateDebugMessengerCreateInfo |
( |
VkDebugUtilsMessengerCreateInfoEXT & | createInfo | ) |
|
|
staticprivate |
◆ presentQueue()
VkQueue ven::Device::presentQueue |
( |
| ) |
const |
|
inlinenodiscard |
◆ querySwapChainSupport()
◆ setupDebugMessenger()
void ven::Device::setupDebugMessenger |
( |
| ) |
|
|
private |
◆ surface()
VkSurfaceKHR ven::Device::surface |
( |
| ) |
const |
|
inlinenodiscard |
◆ transitionImageLayout()
void ven::Device::transitionImageLayout |
( |
VkImage | image, |
|
|
VkFormat | format, |
|
|
VkImageLayout | oldLayout, |
|
|
VkImageLayout | newLayout, |
|
|
uint32_t | mipLevels = 1, |
|
|
uint32_t | layerCount = 1 ) const |
◆ enableValidationLayers
const bool ven::Device::enableValidationLayers = true |
◆ m_commandPool
VkCommandPool ven::Device::m_commandPool |
|
private |
◆ m_debugMessenger
VkDebugUtilsMessengerEXT ven::Device::m_debugMessenger |
|
private |
◆ m_device
VkDevice ven::Device::m_device |
|
private |
◆ m_deviceExtensions
const std::vector<const char *> ven::Device::m_deviceExtensions = {VK_KHR_SWAPCHAIN_EXTENSION_NAME} |
|
private |
◆ m_graphicsQueue
VkQueue ven::Device::m_graphicsQueue |
|
private |
◆ m_instance
VkInstance ven::Device::m_instance |
|
private |
◆ m_physicalDevice
VkPhysicalDevice ven::Device::m_physicalDevice = VK_NULL_HANDLE |
|
private |
◆ m_presentQueue
VkQueue ven::Device::m_presentQueue |
|
private |
◆ m_properties
VkPhysicalDeviceProperties ven::Device::m_properties |
|
private |
◆ m_surface
VkSurfaceKHR ven::Device::m_surface |
|
private |
◆ m_validationLayers
const std::vector<const char *> ven::Device::m_validationLayers = {"VK_LAYER_KHRONOS_validation"} |
|
private |
◆ m_window
The documentation for this class was generated from the following files:
- /home/runner/work/VEngine/VEngine/include/VEngine/Core/Device.hpp
- /home/runner/work/VEngine/VEngine/src/Core/device.cpp