Change Log - USAFrenzy/Vulkan_Learning_Projects GitHub Wiki
##################
- Added physical device and logical device setup and selection/cleanup
- Added some more
dbPrint()
type messages throughout
- Added
#include
headeroptional
forQueueFamilyIndices
struct - Added
QueueFamilyIndices
struct- contains
std::optional<uint32_t> graphicsFamily
variable and abool isComplete()
function - used for
QueryForQueueFamilies()
- contains
- Added
QueueFamilyIndices QueryForQueueFamilies(VkPhysicalDevice device);
- Added
void CreateLogicalDevice()
- Added
VkDevice logicalDevice
as a device handle -AddedVkQueue graphicsQueue
as a queue handle
##################
- Removed what was
GetGLFWVersionStr()
andGetVulkanVersionStr()
- Since these were only being used to return a string to be printed, changed the functions to
PrintGLFWVersion()
andPrintVulkanVersion()
respectively which now print the version directly to the console - Return types for these two changed to
void
and keywordconst
removed as they no longer return a type
- Since these were only being used to return a string to be printed, changed the functions to
##################
- Changed Generic
std::cout
calls used for debugging purposes todbPrint(std::string message)
- toggled on/off by switching the macro
PRINT_INTERNAL_DB_MESSAGES x
wherex
is1
for'on'
and0
for'off'
- toggled on/off by switching the macro
- Explicitly default initialized
VkDebugUtilsMessengerCreateInfoEXT debugCreateInfo
struct inDebugMessengerCreateInfo()
function- Solved read access violations from an unitialized pointer
- Removed needless calls to
std::cout
in base.cpp in favor of formatting provided by nativeprintf()
- Minor additions in the form of
const
correctness in most of the debugging and getter functions as they dont change any values- Functions Now Marked
const
:CheckValidationLayerSupport()
PrintAvailableVulkanExtensions()
PrintValidationLayerCheck()
PrintRequiredGLFWExtensions
GetVulkanVersionStr()
GetGLFWVersionStr()
- Functions Now Marked
- Added
#pragma warning (disable : 26812)
to base.h/base.cpp- This is to supress the unscoped enum warning when compiling as these are being reported from Vulkan and not this code base
- Added New Functions to base.h/base.cpp
- Functions Added:
void QueryPhysicalDevices( )
int WeighDeviceSuitability(VkPhysicalDevice device);
- Functions Added:
- Added function
QueryPhysicalDevices()
to theVulkanInit()
function - Added
void dbPrint(std::string message)
as astatic
function in base.h, outside of theBaseApplication
class- function is compiled based on the value of
##################
- Added validation layer support
- Added validation layer checks
- Added debug messenger support for validation layers
- Added five temporary debug functions (two are not vulkan specific)
- Changed how the app's create info is populated and whether certain functions are compiled based on how
const bool enableValidationLayers
is set - Changed
VkInstance instance
member variable in base.h to be initialized toVK_NULL_HANDLE
(nullptr) - Changed location of macros from base.cpp to base.h
- Fixed missing initialization brackets for
VkDebugUtilsMessengerCreateInfoEXT debugCreateInfo
inDebugMessengerInit()
- Fixed missing flags field for the
VkDebugUtilsMessengerCreateInfoEXT
create info struct
- Added a basic internal macro toggle
INTERNAL_DEBUG
to toggleenableValidationLayers
on and off - Added a macro to the GLFW version used in building this for the
GetGLFWVersionStr()
function - Added the
DestroyDebugUtilsMessengerEXT(instance, debugMessenger, customAllocator)
function to theVulkanFree()
function - Added the
DebugMessengerInit()
function inVulkanInit()
- Added
std::vector<const char*> validationLayers
andVkDebugUtilsMessengerEXT debugMessenger
as member variables in base.h - Added multiple functions in base.h and their implementations in base.cpp
- Added
QueryAvailableVulkanExtensions()
- Added
QueryRequiredExtensions()
- Added
AddValidationLayer(const char* layerName)
- Added
CheckValidationLayerSupport()
- Added
DebugMessengerCreateInfo(VkDebugUtilsMessengerCreateInfoEXT &debugInfo)
- Added
DebugMessengerInit()
- Added
CreateDebugUtilsMessengerEXT(VkInstance instance, const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDebugUtilsMessengerEXT* pDebugMessenger)
- Added
DestroyDebugUtilsMessengerEXT(VkInstance instance, VkDebugUtilsMessengerEXT debugMessenger, const VkAllocationCallbacks* pAllocator)
- Added
PrintAvailableVulkanExtensions()
- Added
PrintRequiredGLFWExtensions()
- Added
PrintValidationLayerCheck()
- Added
GetVulkanVersionStr()
NOTE: There is a function in vulkan.h that does this, but returns a bit-shifted version number - Added
GetGLFWVersionStr()
NOTE: There is a function in glfw.h that does this, but it returns extra info as part of the string
- Added
- Removed
VK_API_VERSION_1_2
in the app's create info struct and replaced it with theVULKAN_API_USED
macro for easy future changes - Removed explicit glfw extension checks in
CreateInstance()
in favor of theQueryRequiredExtensions()
function being used- Removed explicit code in
CreateInstance()
for printing the required glfw extensions in favor ofPrintRequiredGLFWExtensions()
- Removed explicit code in
#################
- Fixed incorrect order of cmake commands in top level CMakeLists.txt file by moving
find_package(Vulkan REQUIRED)
command under theinclude(cmakeSettings/MetaData.cmake)
command as the target project and compiled languages were not defined before thefind_package()
command that resulted in theVulkan_LIBRARY
variable being undefined
- Removed
Vulkan_Headers
cmake project as it's no longer needed due to CMakelists command order changes - Removed the temporary sanity checks as the sdk, lib, and include paths have been verified due to CMakeLists command order changes
- Removed
include_directories(${CMAKE_SOURCE_DIR}/src/BaseProject)
in BaseProject CMakeLists.txt in favor oftarget_include_directories()
command
- Added
target_include_directories()
command to BaseProject CMakeLists.txt- Added
Vulkan_INCLUDE_DIRS
,GLFW_INCLUDE_DIRS
, and the root levelsrc/BaseProject
directory paths to the include paths
- Added
- Added
target_link_libraries()
command for Vulkan Libraries (Vulkan::Vulkan
)
#################
- Changed root CMakeLists.txt to reflect git submodule inclusion for vulkan headers under
vendor/vulkan/Vulkan_Headers
- Changed the
include_dir()
command for vulkan to point to this submodule's include directory
- Changed the
- Added .gitsubmodule for Vulkan Headers
- Added Vulkan Headers to Root Level CMakeLists.txt in order to build from the submodule source code (Currently Does Not Install - May Not Even Need This Part In The Future)
- Added
vulkan_LIBRARIES
to Base Project's CMakeLists.txt as a target linking library
- Added
- Added temporary sanity checks for the vulkan sdk path, include dir path, and lib path
- Added check for if vulkan was found
- Added
link_directories
command to include the lib and include directory paths
- Added
- Added and implemented
vulkanInit()
andcreateInstance()
functions to base.h/base.cpp- Added VkInstance variable to base.h
- Removed Manually Added Vulkan Headers And Library Directories
#################
- Changed Overall Vendor Folder Structure
- Changed Vulkan Folder From
Vendor/include/vulkan
toVendor/Vulkan/include/vulkan
- Changed GLFW Folder From
Vendor/include/GLFW
toVendor/GLFW
- Changed GLM Folder From
Vendor/include/glm
toVendor/GLM
- Changed Vulkan Folder From
- Fixed missing parenthesis on glfwInit() function in window.cpp
-
Added .gitsubmodule for GLFW and GLM libraries
-
Added GLFW to Root Level CMakeLists.txt in order to build from the submodule source code
- Added GLFW to Base Project's CMakeLists.txt as a target linking library
-
Added the include header
#include <vulkan/vulkan.h>
towindow.h
-
Added the include header
#include "Window/window.h"
tobase.h
-
Implemented the Window Class Destructor to destroy the window and terminate GLFW
-
Added window handle from the Window class to BaseApplication class in base.h
-
Added temporary event callbacks for window movement and cursor position
-
Added
cursor_position_callback
andwindow_pos_callback
functions toPollEvents()
which is currently called inClose()
in window.cpp/window.h
-
- Removed Pre-built libraries for GLFW in favor of building from source in CMake
- Removed manually added cmake folders containing config packages for both glm and glfw in favor of submodule usage
- Removed Previous code for glfw testing in main.cpp as it's now incorporated into window.cpp/base.h