mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-15 09:01:24 +00:00
- remove unused code
This commit is contained in:
parent
9ed1c7f40b
commit
27e78e7d8d
1 changed files with 0 additions and 80 deletions
|
@ -71,83 +71,3 @@ private:
|
|||
|
||||
friend class VulkanSwapChain;
|
||||
};
|
||||
|
||||
#if 0
|
||||
|
||||
struct QueueFamilyIndices
|
||||
{
|
||||
int graphicsFamily = -1;
|
||||
int presentFamily = -1;
|
||||
|
||||
bool isComplete()
|
||||
{
|
||||
return graphicsFamily >= 0 && presentFamily >= 0;
|
||||
}
|
||||
};
|
||||
|
||||
struct SwapChainSupportDetails
|
||||
{
|
||||
VkSurfaceCapabilitiesKHR capabilities;
|
||||
std::vector<VkSurfaceFormatKHR> formats;
|
||||
std::vector<VkPresentModeKHR> presentModes;
|
||||
};
|
||||
|
||||
class VulkanDevice
|
||||
{
|
||||
public:
|
||||
VkInstance vkInstance = VK_NULL_HANDLE;
|
||||
VkSurfaceKHR vkSurface = VK_NULL_HANDLE;
|
||||
VkPhysicalDevice vkPhysicalDevice = VK_NULL_HANDLE;
|
||||
VkDevice vkDevice = VK_NULL_HANDLE;
|
||||
VkDebugReportCallbackEXT vkCallback = VK_NULL_HANDLE;
|
||||
VkQueue vkGraphicsQueue = VK_NULL_HANDLE;
|
||||
VkQueue vkTransferQueue = VK_NULL_HANDLE; // for image transfers only.
|
||||
VkQueue vkPresentQueue = VK_NULL_HANDLE;
|
||||
VmaAllocator vkAllocator = VK_NULL_HANDLE;
|
||||
VkCommandPool vkCommandPool = VK_NULL_HANDLE;
|
||||
int numAllocatorExtensions = 0;
|
||||
VkPhysicalDeviceProperties physicalProperties = {};
|
||||
|
||||
private:
|
||||
void CreateInstance();
|
||||
bool CheckValidationLayerSupport();
|
||||
void SetupDebugCallback();
|
||||
void CreateSurface();
|
||||
void PickPhysicalDevice();
|
||||
bool IsDeviceSuitable(VkPhysicalDevice device);
|
||||
bool CheckDeviceExtensionSupport(VkPhysicalDevice device);
|
||||
void CreateLogicalDevice();
|
||||
void CreateAllocator();
|
||||
void CreateCommandPool();
|
||||
|
||||
std::vector<const char*> GetRequiredExtensions();
|
||||
|
||||
std::mutex vkSingleTimeQueueMutex;
|
||||
|
||||
public:
|
||||
// This cannot be set up in the constructor because it may throw exceptions when initialization fails.
|
||||
void CreateDevice();
|
||||
void DestroyDevice();
|
||||
QueueFamilyIndices FindQueueFamilies(VkPhysicalDevice device);
|
||||
SwapChainSupportDetails QuerySwapChainSupport(VkPhysicalDevice device);
|
||||
~VulkanDevice()
|
||||
{
|
||||
DestroyDevice();
|
||||
}
|
||||
|
||||
VkCommandBuffer BeginSingleTimeCommands();
|
||||
void EndSingleTimeCommands(VkCommandBuffer commandBuffer);
|
||||
VkResult TransitionImageLayout(VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout, uint32_t mipLevels);
|
||||
|
||||
int GetTexDimension(int d)
|
||||
{
|
||||
return std::min<int>(d, physicalProperties.limits.maxImageDimension2D);
|
||||
}
|
||||
|
||||
int GetUniformBufferAlignment()
|
||||
{
|
||||
return (int)physicalProperties.limits.minUniformBufferOffsetAlignment;
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue