begenning the refactor

This commit is contained in:
Kbz-8
2024-03-27 23:03:54 +01:00
parent b5983ac24b
commit 0e04356ea7
131 changed files with 2135 additions and 1192 deletions

View File

@@ -0,0 +1,44 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ValidationLayers.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maldavid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/19 14:04:25 by maldavid #+# #+# */
/* Updated: 2024/03/27 22:59:00 by maldavid ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef __VK_VALIDATION_LAYERS__
#define __VK_VALIDATION_LAYERS__
namespace mlx
{
class ValidationLayers
{
public:
ValidationLayers() = default;
void Init();
void Destroy();
bool CheckValidationLayerSupport();
void PopulateDebugMessengerCreateInfo(VkDebugUtilsMessengerCreateInfoEXT& create_info);
VkResult SetDebugUtilsObjectNameEXT(VkObjectType object_type, std::uint64_t object_handle, const char* object_name);
~ValidationLayers() = default;
private:
VkResult CreateDebugUtilsMessengerEXT(const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator);
static VKAPI_ATTR VkBool32 VKAPI_CALL DebugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT message_severity, VkDebugUtilsMessageTypeFlagsEXT message_type, const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, void* pUserData);
void DestroyDebugUtilsMessengerEXT(const VkAllocationCallbacks* pAllocator);
private:
VkDebugUtilsMessengerEXT m_debug_messenger;
PFN_vkSetDebugUtilsObjectNameEXT f_vkSetDebugUtilsObjectNameEXT = nullptr;
};
}
#endif