fixing compatibility, workign on renderer

This commit is contained in:
Kbz-8
2022-12-18 04:04:10 +01:00
parent f52c4e51c9
commit 4a67aab716
48 changed files with 6535 additions and 75 deletions

48
src/renderer/core/vk_queues.h git.filemode.normal_file
View File

@@ -0,0 +1,48 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* vk_queues.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maldavid <kbz_8.dev@akel-engine.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/08 19:01:49 by maldavid #+# #+# */
/* Updated: 2022/12/18 01:08:04 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef __MLX_VK_QUEUES__
#define __MLX_VK_QUEUES__
#include <volk.h>
#include <optional>
#include <cstdint>
namespace mlx
{
class Queues
{
public:
struct QueueFamilyIndices
{
std::optional<uint32_t> graphicsFamily;
std::optional<uint32_t> presentFamily;
inline bool isComplete() { return graphicsFamily.has_value() && presentFamily.has_value(); }
};
QueueFamilyIndices findQueueFamilies(VkPhysicalDevice device);
void init();
inline VkQueue& getGraphic() noexcept { return _graphicsQueue; }
inline VkQueue& getPresent() noexcept { return _presentQueue; }
inline QueueFamilyIndices getFamilies() noexcept { return *_families; }
private:
VkQueue _graphicsQueue;
VkQueue _presentQueue;
std::optional<QueueFamilyIndices> _families;
};
}
#endif // __MLX_VK_QUEUES__