Skip to content

Commit

Permalink
fixing compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Kbz-8 committed Sep 17, 2024
1 parent bf43611 commit ef95989
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Akel/Runtime/Includes/Drivers/Vulkan/VulkanRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Ak
{
#define AK_VULKAN_GLOBAL_FUNCTION(fn) PFN_##fn fn;
#define AK_VULKAN_GLOBAL_FUNCTION(fn) extern PFN_##fn fn;
#include <Drivers/Vulkan/VulkanGlobalPrototypes.h>
#undef AK_VULKAN_GLOBAL_FUNCTION

Expand Down
12 changes: 0 additions & 12 deletions Akel/Runtime/Sources/Drivers/Vulkan/VulkanInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,9 @@ namespace Ak
VkDebugUtilsMessengerCreateInfoEXT debug_create_info;
if constexpr(VULKAN_DEBUG)
{
/*
if(RenderCore::Get().GetLayers().CheckValidationLayerSupport())
{
create_info.enabledLayerCount = static_cast<uint32_t>(validationLayers.size());
create_info.ppEnabledLayerNames = validationLayers.data();
RenderCore::Get().GetLayers().PopulateDebugMessengerCreateInfo(debugCreateInfo);
create_info.pNext = static_cast<VkDebugUtilsMessengerCreateInfoEXT*>(&debugCreateInfo);
}
*/
}

VkResult res;
if((res = vkCreateInstance(&create_info, nullptr, &m_instance)) != VK_SUCCESS)
FatalError("Vulkan : failed to create Vulkan instance, %", VerbaliseVkResult(res));
volkLoadInstance(m_instance);
DebugLog("Vulkan : created new instance");
}

Expand Down
14 changes: 5 additions & 9 deletions Akel/Runtime/Sources/Drivers/Vulkan/VulkanRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
#include <Core/Memory/MemoryManager.h>
#include <Core/Logs.h>

#define KVF_IMPLEMENTATION
#include <kvf.h>

#if defined(AK_PLAT_WINDOWS)
constexpr const char* VULKAN_LIB_NAME = "vulkan-1.dll";
#elif defined(AK_PLAT_MACOS)
Expand Down Expand Up @@ -72,11 +69,6 @@ namespace Ak

VulkanRenderer::VulkanRenderer() : RHIRenderer()
{
if(volkInitialize() != VK_SUCCESS)
FatalError("Vulkan loader : cannot load %, are you sure Vulkan is installed on your system ?", VULKAN_LIB_NAME);
kvfSetErrorCallback(&Internal::ErrorCallback);
kvfSetValidationErrorCallback(&Internal::ValidationErrorCallback);
kvfSetValidationWarningCallback(&Internal::ValidationWarningCallback);
// p_instance = MakeUnique<VulkanInstance>();
// p_device = MakeUnique<VulkanDevice>();
}
Expand All @@ -85,10 +77,14 @@ namespace Ak
{
// p_device.Reset();
// p_instance.Reset();
volkFinalize();
}
}

#define AK_VULKAN_GLOBAL_FUNCTION(fn) PFN_##fn fn;
#include <Drivers/Vulkan/VulkanGlobalPrototypes.h>
#undef AK_VULKAN_GLOBAL_FUNCTION


extern "C"
{
AK_EXPORT_API Ak::RHIRenderer* AkelLoadRendererDriver()
Expand Down

0 comments on commit ef95989

Please sign in to comment.