From f54ba626c2d6052b65efe56bf60de9e04ed43f10 Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Tue, 17 Sep 2024 09:36:15 +0200 Subject: [PATCH] adding Vulkan prototypes --- .github/workflows/linux-build.yml | 2 +- .github/workflows/macos-build.yml | 2 +- .github/workflows/msys2-build.yml | 2 +- .github/workflows/windows-build.yml | 2 +- .../Includes/Drivers/Vulkan/PreCompiled.h | 41 +++++- .../Includes/Drivers/Vulkan/VulkanDevice.h | 4 + .../Drivers/Vulkan/VulkanDevicePrototypes.h | 134 ++++++++++++++++++ .../Drivers/Vulkan/VulkanGlobalPrototypes.h | 87 ++++++++++++ .../Includes/Drivers/Vulkan/VulkanRenderer.h | 13 +- .../Drivers/Vulkan/VulkanRenderer.inl | 26 ++-- .../Sources/Graphics/GraphicsModule.cpp | 2 +- README.md | 2 +- 12 files changed, 293 insertions(+), 24 deletions(-) create mode 100644 Akel/Runtime/Includes/Drivers/Vulkan/VulkanDevicePrototypes.h create mode 100644 Akel/Runtime/Includes/Drivers/Vulkan/VulkanGlobalPrototypes.h diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 35370b3a..e8d72142 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -29,7 +29,7 @@ jobs: - { mode: debug, config: --asan=y, archive: false, cache_key: -asan } - { mode: debug, config: --lsan=y, archive: false } - { mode: debug, config: --tsan=y, archive: false } - - { mode: releasedbg, archive: yes } + - { mode: release, archive: yes } runs-on: ${{ matrix.os }} if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 24684fda..1e1ef19a 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -25,7 +25,7 @@ jobs: - { mode: debug, config: --asan=y, archive: false, cache_key: -asan } - { mode: debug, config: --lsan=y, archive: false } - { mode: debug, config: --tsan=y, archive: false } - - { mode: releasedbg, archive: yes } + - { mode: release, archive: yes } runs-on: ${{ matrix.os }} if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} diff --git a/.github/workflows/msys2-build.yml b/.github/workflows/msys2-build.yml index fe8faa38..7959f2a7 100644 --- a/.github/workflows/msys2-build.yml +++ b/.github/workflows/msys2-build.yml @@ -19,7 +19,7 @@ jobs: msystem: [mingw64] os: [windows-latest] arch: [x86_64] - mode: [debug, releasedbg] + mode: [debug, release] kind: [shared, static] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 0f3ae34d..2b6f1e06 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -18,7 +18,7 @@ jobs: matrix: os: [windows-latest] arch: [x64] - mode: [debug, releasedbg] + mode: [debug, release] kind: [shared, static] runs-on: ${{ matrix.os }} diff --git a/Akel/Runtime/Includes/Drivers/Vulkan/PreCompiled.h b/Akel/Runtime/Includes/Drivers/Vulkan/PreCompiled.h index 286bbcba..a26ec4b1 100644 --- a/Akel/Runtime/Includes/Drivers/Vulkan/PreCompiled.h +++ b/Akel/Runtime/Includes/Drivers/Vulkan/PreCompiled.h @@ -8,10 +8,45 @@ #include #include -#include +#include -#define KVF_IMPL_VK_NO_PROTOTYPES -#include +#ifdef VK_USE_PLATFORM_ANDROID_KHR + #include +#endif + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + #include +#endif + +#ifdef VK_USE_PLATFORM_WIN32_KHR + typedef struct HINSTANCE__* HINSTANCE; + typedef struct HWND__* HWND; + typedef struct HMONITOR__* HMONITOR; + typedef void* HANDLE; + typedef /*_Null_terminated_*/ const wchar_t* LPCWSTR; + typedef unsigned long DWORD; + typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES; + #include +#endif + +#ifdef VK_USE_PLATFORM_XCB_KHR + struct xcb_connection_t; + typedef uint32_t xcb_window_t; + typedef uint32_t xcb_visualid_t; + #include +#endif + +#ifdef VK_USE_PLATFORM_METAL_EXT + #include +#endif + +#ifdef VK_USE_PLATFORM_XLIB_KHR + typedef struct _XDisplay Display; + typedef unsigned long XID; + typedef XID Window; + typedef unsigned long VisualID; + #include +#endif #include diff --git a/Akel/Runtime/Includes/Drivers/Vulkan/VulkanDevice.h b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanDevice.h index 1f354df6..62cc54e6 100644 --- a/Akel/Runtime/Includes/Drivers/Vulkan/VulkanDevice.h +++ b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanDevice.h @@ -22,6 +22,10 @@ namespace Ak void WaitForIdle() override; + #define AK_VULKAN_DEVICE_FUNCTION(fn) PFN_##fn fn; + #include + #undef AK_VULKAN_DEVICE_FUNCTION + ~VulkanDevice() override; private: diff --git a/Akel/Runtime/Includes/Drivers/Vulkan/VulkanDevicePrototypes.h b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanDevicePrototypes.h new file mode 100644 index 00000000..06fb74f5 --- /dev/null +++ b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanDevicePrototypes.h @@ -0,0 +1,134 @@ +// Copyright (C) 2024 kbz_8 ( contact@kbz8.me ) +// This file is a part of Akel +// For conditions of distribution and use, see copyright notice in LICENSE + +// No header guards + +#ifndef AK_VULKAN_DEVICE_FUNCTION + #error "AK_VULKAN_DEVICE_FUNCTION not defined" +#endif + +#ifdef VK_VERSION_1_0 + AK_VULKAN_DEVICE_FUNCTION(vkAllocateCommandBuffers) + AK_VULKAN_DEVICE_FUNCTION(vkAllocateDescriptorSets) + AK_VULKAN_DEVICE_FUNCTION(vkAllocateMemory) + AK_VULKAN_DEVICE_FUNCTION(vkBeginCommandBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkBindBufferMemory) + AK_VULKAN_DEVICE_FUNCTION(vkBindImageMemory) + AK_VULKAN_DEVICE_FUNCTION(vkCmdBeginQuery) + AK_VULKAN_DEVICE_FUNCTION(vkCmdBeginRenderPass) + AK_VULKAN_DEVICE_FUNCTION(vkCmdBindDescriptorSets) + AK_VULKAN_DEVICE_FUNCTION(vkCmdBindIndexBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkCmdBindPipeline) + AK_VULKAN_DEVICE_FUNCTION(vkCmdBindVertexBuffers) + AK_VULKAN_DEVICE_FUNCTION(vkCmdBlitImage) + AK_VULKAN_DEVICE_FUNCTION(vkCmdClearAttachments) + AK_VULKAN_DEVICE_FUNCTION(vkCmdClearColorImage) + AK_VULKAN_DEVICE_FUNCTION(vkCmdClearDepthStencilImage) + AK_VULKAN_DEVICE_FUNCTION(vkCmdCopyBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkCmdCopyBufferToImage) + AK_VULKAN_DEVICE_FUNCTION(vkCmdCopyImage) + AK_VULKAN_DEVICE_FUNCTION(vkCmdCopyImageToBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkCmdCopyQueryPoolResults) + AK_VULKAN_DEVICE_FUNCTION(vkCmdDispatch) + AK_VULKAN_DEVICE_FUNCTION(vkCmdDispatchIndirect) + AK_VULKAN_DEVICE_FUNCTION(vkCmdDraw) + AK_VULKAN_DEVICE_FUNCTION(vkCmdDrawIndexed) + AK_VULKAN_DEVICE_FUNCTION(vkCmdDrawIndexedIndirect) + AK_VULKAN_DEVICE_FUNCTION(vkCmdDrawIndirect) + AK_VULKAN_DEVICE_FUNCTION(vkCmdEndQuery) + AK_VULKAN_DEVICE_FUNCTION(vkCmdEndRenderPass) + AK_VULKAN_DEVICE_FUNCTION(vkCmdExecuteCommands) + AK_VULKAN_DEVICE_FUNCTION(vkCmdFillBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkCmdNextSubpass) + AK_VULKAN_DEVICE_FUNCTION(vkCmdPipelineBarrier) + AK_VULKAN_DEVICE_FUNCTION(vkCmdPushConstants) + AK_VULKAN_DEVICE_FUNCTION(vkCmdResetEvent) + AK_VULKAN_DEVICE_FUNCTION(vkCmdResetQueryPool) + AK_VULKAN_DEVICE_FUNCTION(vkCmdResolveImage) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetBlendConstants) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetDepthBias) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetDepthBounds) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetEvent) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetLineWidth) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetScissor) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetStencilCompareMask) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetStencilReference) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetStencilWriteMask) + AK_VULKAN_DEVICE_FUNCTION(vkCmdSetViewport) + AK_VULKAN_DEVICE_FUNCTION(vkCmdUpdateBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkCmdWaitEvents) + AK_VULKAN_DEVICE_FUNCTION(vkCmdWriteTimestamp) + AK_VULKAN_DEVICE_FUNCTION(vkCreateBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkCreateBufferView) + AK_VULKAN_DEVICE_FUNCTION(vkCreateCommandPool) + AK_VULKAN_DEVICE_FUNCTION(vkCreateComputePipelines) + AK_VULKAN_DEVICE_FUNCTION(vkCreateDescriptorPool) + AK_VULKAN_DEVICE_FUNCTION(vkCreateDescriptorSetLayout) + AK_VULKAN_DEVICE_FUNCTION(vkCreateEvent) + AK_VULKAN_DEVICE_FUNCTION(vkCreateFence) + AK_VULKAN_DEVICE_FUNCTION(vkCreateFramebuffer) + AK_VULKAN_DEVICE_FUNCTION(vkCreateGraphicsPipelines) + AK_VULKAN_DEVICE_FUNCTION(vkCreateImage) + AK_VULKAN_DEVICE_FUNCTION(vkCreateImageView) + AK_VULKAN_DEVICE_FUNCTION(vkCreatePipelineCache) + AK_VULKAN_DEVICE_FUNCTION(vkCreatePipelineLayout) + AK_VULKAN_DEVICE_FUNCTION(vkCreateRenderPass) + AK_VULKAN_DEVICE_FUNCTION(vkCreateSampler) + AK_VULKAN_DEVICE_FUNCTION(vkCreateSemaphore) + AK_VULKAN_DEVICE_FUNCTION(vkCreateShaderModule) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyBufferView) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyCommandPool) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyDescriptorPool) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyDescriptorSetLayout) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyDevice) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyEvent) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyFence) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyFramebuffer) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyImage) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyImageView) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyPipeline) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyPipelineCache) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyPipelineLayout) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyRenderPass) + AK_VULKAN_DEVICE_FUNCTION(vkDestroySampler) + AK_VULKAN_DEVICE_FUNCTION(vkDestroySemaphore) + AK_VULKAN_DEVICE_FUNCTION(vkDestroyShaderModule) + AK_VULKAN_DEVICE_FUNCTION(vkDeviceWaitIdle) + AK_VULKAN_DEVICE_FUNCTION(vkEndCommandBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkFlushMappedMemoryRanges) + AK_VULKAN_DEVICE_FUNCTION(vkFreeCommandBuffers) + AK_VULKAN_DEVICE_FUNCTION(vkFreeDescriptorSets) + AK_VULKAN_DEVICE_FUNCTION(vkFreeMemory) + AK_VULKAN_DEVICE_FUNCTION(vkGetBufferMemoryRequirements) + AK_VULKAN_DEVICE_FUNCTION(vkGetDeviceMemoryCommitment) + AK_VULKAN_DEVICE_FUNCTION(vkGetDeviceQueue) + AK_VULKAN_DEVICE_FUNCTION(vkGetEventStatus) + AK_VULKAN_DEVICE_FUNCTION(vkGetFenceStatus) + AK_VULKAN_DEVICE_FUNCTION(vkGetImageMemoryRequirements) + AK_VULKAN_DEVICE_FUNCTION(vkGetImageSparseMemoryRequirements) + AK_VULKAN_DEVICE_FUNCTION(vkGetImageSubresourceLayout) + AK_VULKAN_DEVICE_FUNCTION(vkGetRenderAreaGranularity) + AK_VULKAN_DEVICE_FUNCTION(vkInvalidateMappedMemoryRanges) + AK_VULKAN_DEVICE_FUNCTION(vkMapMemory) + AK_VULKAN_DEVICE_FUNCTION(vkMergePipelineCaches) + AK_VULKAN_DEVICE_FUNCTION(vkQueueSubmit) + AK_VULKAN_DEVICE_FUNCTION(vkQueueWaitIdle) + AK_VULKAN_DEVICE_FUNCTION(vkResetCommandBuffer) + AK_VULKAN_DEVICE_FUNCTION(vkResetCommandPool) + AK_VULKAN_DEVICE_FUNCTION(vkResetDescriptorPool) + AK_VULKAN_DEVICE_FUNCTION(vkResetEvent) + AK_VULKAN_DEVICE_FUNCTION(vkResetFences) + AK_VULKAN_DEVICE_FUNCTION(vkSetEvent) + AK_VULKAN_DEVICE_FUNCTION(vkUnmapMemory) + AK_VULKAN_DEVICE_FUNCTION(vkUpdateDescriptorSets) + AK_VULKAN_DEVICE_FUNCTION(vkWaitForFences) +#endif +#ifdef VK_KHR_swapchain + AK_VULKAN_DEVICE_FUNCTION(vkAcquireNextImageKHR) + AK_VULKAN_DEVICE_FUNCTION(vkCreateSwapchainKHR) + AK_VULKAN_DEVICE_FUNCTION(vkDestroySwapchainKHR) + AK_VULKAN_DEVICE_FUNCTION(vkGetSwapchainImagesKHR) + AK_VULKAN_DEVICE_FUNCTION(vkQueuePresentKHR) +#endif diff --git a/Akel/Runtime/Includes/Drivers/Vulkan/VulkanGlobalPrototypes.h b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanGlobalPrototypes.h new file mode 100644 index 00000000..91faaa61 --- /dev/null +++ b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanGlobalPrototypes.h @@ -0,0 +1,87 @@ +// Copyright (C) 2024 kbz_8 ( contact@kbz8.me ) +// This file is a part of Akel +// For conditions of distribution and use, see copyright notice in LICENSE + +// No header guards + +#ifndef AK_VULKAN_GLOBAL_FUNCTION + #error "AK_VULKAN_GLOBAL_FUNCTION not defined" +#endif + +#ifdef VK_VERSION_1_0 + AK_VULKAN_GLOBAL_FUNCTION(vkCreateDevice) + AK_VULKAN_GLOBAL_FUNCTION(vkDestroyInstance) + AK_VULKAN_GLOBAL_FUNCTION(vkEnumerateDeviceExtensionProperties) + AK_VULKAN_GLOBAL_FUNCTION(vkEnumeratePhysicalDevices) + AK_VULKAN_GLOBAL_FUNCTION(vkGetDeviceProcAddr) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceFeatures) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceFormatProperties) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceImageFormatProperties) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceMemoryProperties) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceProperties) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceQueueFamilyProperties) +#endif + +#ifdef VK_KHR_surface + AK_VULKAN_GLOBAL_FUNCTION(vkDestroySurfaceKHR) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceSurfaceCapabilitiesKHR) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceSurfaceFormatsKHR) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceSurfacePresentModesKHR) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceSurfaceSupportKHR) +#endif + +#ifdef AK_VULKAN_DEBUG + #ifdef VK_EXT_debug_report + AK_VULKAN_GLOBAL_FUNCTION(vkCreateDebugReportCallbackEXT) + AK_VULKAN_GLOBAL_FUNCTION(vkDestroyDebugReportCallbackEXT) + AK_VULKAN_GLOBAL_FUNCTION(vkDebugReportMessageEXT) + #endif + + #ifdef VK_EXT_debug_utils + AK_VULKAN_GLOBAL_FUNCTION(vkCreateDebugUtilsMessengerEXT) + AK_VULKAN_GLOBAL_FUNCTION(vkDestroyDebugUtilsMessengerEXT) + AK_VULKAN_GLOBAL_FUNCTION(vkSetDebugUtilsObjectNameEXT) + AK_VULKAN_GLOBAL_FUNCTION(vkSetDebugUtilsObjectTagEXT) + AK_VULKAN_GLOBAL_FUNCTION(vkSubmitDebugUtilsMessageEXT) + #endif +#endif + +#ifdef VK_USE_PLATFORM_ANDROID_KHR + #ifdef VK_KHR_android_surface + AK_VULKAN_GLOBAL_FUNCTION(vkCreateAndroidSurfaceKHR) + #endif +#endif + +#ifdef VK_USE_PLATFORM_XCB_KHR + #ifdef VK_KHR_xcb_surface + AK_VULKAN_GLOBAL_FUNCTION(vkCreateXcbSurfaceKHR) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceXcbPresentationSupportKHR) + #endif +#endif + +#ifdef VK_USE_PLATFORM_XLIB_KHR + #ifdef VK_KHR_xlib_surface + AK_VULKAN_GLOBAL_FUNCTION(vkCreateXlibSurfaceKHR) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceXlibPresentationSupportKHR) + #endif +#endif + +#ifdef VK_USE_PLATFORM_WAYLAND_KHR + #ifdef VK_KHR_wayland_surface + AK_VULKAN_GLOBAL_FUNCTION(vkCreateWaylandSurfaceKHR) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceWaylandPresentationSupportKHR) + #endif +#endif + +#ifdef VK_USE_PLATFORM_WIN32_KHR + #ifdef VK_KHR_win32_surface + AK_VULKAN_GLOBAL_FUNCTION(vkCreateWin32SurfaceKHR) + AK_VULKAN_GLOBAL_FUNCTION(vkGetPhysicalDeviceWin32PresentationSupportKHR) + #endif +#endif + +#ifdef VK_USE_PLATFORM_METAL_EXT + #ifdef VK_EXT_metal_surface + AK_VULKAN_GLOBAL_FUNCTION(vkCreateMetalSurfaceEXT) + #endif +#endif diff --git a/Akel/Runtime/Includes/Drivers/Vulkan/VulkanRenderer.h b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanRenderer.h index 0e955e86..6da299ad 100644 --- a/Akel/Runtime/Includes/Drivers/Vulkan/VulkanRenderer.h +++ b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanRenderer.h @@ -13,6 +13,10 @@ namespace Ak { + #define AK_VULKAN_GLOBAL_FUNCTION(fn) PFN_##fn fn; + #include + #undef AK_VULKAN_GLOBAL_FUNCTION + [[nodiscard]] const char* VerbaliseVkResult(VkResult result) noexcept; @@ -22,12 +26,17 @@ namespace Ak VulkanRenderer(); inline VulkanDevice& GetDevice() override; - //inline static VulkanInstance& GetInstance(); + inline VulkanInstance& GetInstance(); + + inline static bool IsInit() noexcept; + inline static VulkanRenderer& Get() noexcept; ~VulkanRenderer() override; private: - //static UniquePtr p_instance; + static VulkanRenderer* s_instance; + + UniquePtr p_instance; UniquePtr p_device; }; diff --git a/Akel/Runtime/Includes/Drivers/Vulkan/VulkanRenderer.inl b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanRenderer.inl index e47be70f..32222854 100644 --- a/Akel/Runtime/Includes/Drivers/Vulkan/VulkanRenderer.inl +++ b/Akel/Runtime/Includes/Drivers/Vulkan/VulkanRenderer.inl @@ -14,26 +14,26 @@ namespace Ak { return *p_device; } -/* + VulkanInstance& VulkanRenderer::GetInstance() { - Verify((bool)p_instance, "Vulkan Renderer : cannot get Vulkan instance as the renderer is not init"); return *p_instance; } -*/ - bool IsVulkanSupported() noexcept + + bool VulkanRenderer::IsInit() noexcept { - if(volkInitialize() != VK_SUCCESS) - return false; + return s_instance != nullptr; + } - CallOnExit uninit_volk(volkFinalize); + VulkanRenderer& VulkanRenderer::Get() noexcept + { + Assert(IsInit(), "VulkanRenderer is not initialized"); + return *s_instance; + } - VkInstance instance; - VkInstanceCreateInfo create_info{}; - create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; - VkResult res; - if(vkCreateInstance(&create_info, nullptr, &instance) != VK_SUCCESS) - return false; + bool IsVulkanSupported() noexcept + { + // TODO return true; } } diff --git a/Akel/Runtime/Sources/Graphics/GraphicsModule.cpp b/Akel/Runtime/Sources/Graphics/GraphicsModule.cpp index 51818985..3d114b5f 100644 --- a/Akel/Runtime/Sources/Graphics/GraphicsModule.cpp +++ b/Akel/Runtime/Sources/Graphics/GraphicsModule.cpp @@ -106,7 +106,7 @@ namespace Ak { "none", RendererDrivers::None }, }; - static std::optional driver_option = CommandLineInterface::Get().GetOption("rdr-driver"); + static std::optional driver_option = CommandLineInterface::Get().GetOption("renderer-backend"); if(driver_option.has_value()) { if(!cli_options.Has(*driver_option)) diff --git a/README.md b/README.md index 0fe46270..df932f48 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ An editor is in development, facilitating the creation of games. However, it wil Akel is designed to be easy to use. Not being the most powerful, it goes the way of simplicity both on the editor side and on the engine side. # Getting started -Developed mainly on Linux, Akel is, however, cross-platform and can be used on Windows and MacOS. It is compiled using [xmake](https://xmake.io/#/). A compiler that supports C++17 is required. Dependencies (SDL2, ImGui, ...) are provided by xmake (you may install Vulkan SDK yourself for debuging). +Developed mainly on Linux, Akel is, however, cross-platform and can be used on Windows and MacOS. It is compiled using [xmake](https://xmake.io/#/). A compiler that supports C++20 is required. Dependencies (SDL2, ImGui, ...) are provided by xmake (you may install Vulkan SDK yourself for debuging). * Start by clonning the repo `git clone https://github.com/SpinWaves/Akel` * [Install xmake](https://xmake.io/#/guide/installation)