Change Log - USAFrenzy/Vulkan_Learning_Projects GitHub Wiki

Change Log

2021-08-05

##################

Overall Changes

  • Added physical device and logical device setup and selection/cleanup
  • Added some more dbPrint() type messages throughout

Additions

  • Added #include header optional for QueueFamilyIndices struct
  • Added QueueFamilyIndices struct
    • contains std::optional<uint32_t> graphicsFamily variable and a bool isComplete() function
    • used for QueryForQueueFamilies()
  • Added QueueFamilyIndices QueryForQueueFamilies(VkPhysicalDevice device);
  • Added void CreateLogicalDevice()
  • Added VkDevice logicalDevice as a device handle -Added VkQueue graphicsQueue as a queue handle

2021-08-04

##################

Overall Changes

  • Removed what was GetGLFWVersionStr() and GetVulkanVersionStr()
    • Since these were only being used to return a string to be printed, changed the functions to PrintGLFWVersion() and PrintVulkanVersion() respectively which now print the version directly to the console
    • Return types for these two changed to void and keyword const removed as they no longer return a type

2021-08-03

##################

Overall Changes

  • Changed Generic std::cout calls used for debugging purposes to dbPrint(std::string message)
    • toggled on/off by switching the macro PRINT_INTERNAL_DB_MESSAGES x where x is 1 for 'on' and 0 for 'off'

General Fixes

  • Explicitly default initialized VkDebugUtilsMessengerCreateInfoEXT debugCreateInfo struct in DebugMessengerCreateInfo() function
    • Solved read access violations from an unitialized pointer

Removed

  • Removed needless calls to std::cout in base.cpp in favor of formatting provided by native printf()

Additions

  • 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()
  • 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);
  • Added function QueryPhysicalDevices() to the VulkanInit() function
  • Added void dbPrint(std::string message) as a static function in base.h, outside of the BaseApplication class
    • function is compiled based on the value of

2021-08-01

##################

Overall Changes

  • 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 to VK_NULL_HANDLE (nullptr)
  • Changed location of macros from base.cpp to base.h

General Fixes

  • Fixed missing initialization brackets for VkDebugUtilsMessengerCreateInfoEXT debugCreateInfo in DebugMessengerInit()
  • Fixed missing flags field for the VkDebugUtilsMessengerCreateInfoEXT create info struct

Additions

  • Added a basic internal macro toggle INTERNAL_DEBUG to toggle enableValidationLayers 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 the VulkanFree() function
  • Added the DebugMessengerInit() function in VulkanInit()
  • Added std::vector<const char*> validationLayers and VkDebugUtilsMessengerEXT 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

Removed

  • Removed VK_API_VERSION_1_2 in the app's create info struct and replaced it with the VULKAN_API_USED macro for easy future changes
  • Removed explicit glfw extension checks in CreateInstance() in favor of the QueryRequiredExtensions() function being used
    • Removed explicit code in CreateInstance() for printing the required glfw extensions in favor of PrintRequiredGLFWExtensions()

2021-07-29

#################

General Fixes

  • Fixed incorrect order of cmake commands in top level CMakeLists.txt file by moving find_package(Vulkan REQUIRED) command under the include(cmakeSettings/MetaData.cmake) command as the target project and compiled languages were not defined before the find_package() command that resulted in the Vulkan_LIBRARY variable being undefined

Removed

  • 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 of target_include_directories() command

Additions

  • Added target_include_directories() command to BaseProject CMakeLists.txt
    • Added Vulkan_INCLUDE_DIRS, GLFW_INCLUDE_DIRS, and the root level src/BaseProject directory paths to the include paths
  • Added target_link_libraries() command for Vulkan Libraries (Vulkan::Vulkan)

2021-07-28

#################

Overall Changes

  • 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

Additions

  • 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 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 and implemented vulkanInit() and createInstance() functions to base.h/base.cpp
    • Added VkInstance variable to base.h

Removed

  • Removed Manually Added Vulkan Headers And Library Directories

2021-07-26

#################

Overall Changes

  • Changed Overall Vendor Folder Structure
    • Changed Vulkan Folder From Vendor/include/vulkan to Vendor/Vulkan/include/vulkan
    • Changed GLFW Folder From Vendor/include/GLFW to Vendor/GLFW
    • Changed GLM Folder From Vendor/include/glm to Vendor/GLM

General Fixes

  • Fixed missing parenthesis on glfwInit() function in window.cpp

Additions

  • 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> to window.h

  • Added the include header #include "Window/window.h" to base.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 and window_pos_callback functions to

      PollEvents() which is currently called in Close() in window.cpp/window.h

Removed

  • 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
⚠️ **GitHub.com Fallback** ⚠️