Skip to content

Methane Kit v0.7.3

Latest
Compare
Choose a tag to compare
@egorodet egorodet released this 07 Aug 18:33
· 18 commits to master since this release

This release adds support of Vulkan RHI on MacOS via MoltenVK framework and fixes some portability and stability issues. Vulkan RHI now supports monolithic pipeline state objects (PSO) and drops VK_EXT_EXTENDED_DYNAMIC_STATE extension requirement, which is made optional, but still used upon availability. VK_KHR_SYNCHRONIZATION_2 extension requirement was also dropped to improve portability. Some newly discovered issues reported by Vulkan validation layer were fixed as well as many stability issues.

Tutorials

  • All tutorials can build with Vulkan RHI on MacOS and are tested to run normally on MacOS.
  • All tutorials were cleaned up from memory errors and can run successfully with Memory Address Sanitizer enabled in build options for all APIs and platforms.
  • Replaced IndexedName function with explicit fmt::format.

Graphics libraries

  • Vulkan extension VK_EXT_EXTENDED_DYNAMIC_STATE was made optional by supporting monolithic vk::Pipeline state object in Vulkan::RenderState RHI implementation. Both monolithic and dynamic pipeline state APIs are supported now, depending on extension availability.
  • Removed VK_KHR_SYNCHRONIZATION_2 extension requirement, as it was used to fix some minor validation layer warnings appearing only on Linux platform. Warning were muted, as not important.
  • Added Vulkan RHI support on MacOS via MoltenVK with a workaround of MoltenVK bug by disabling timeline semaphore values attached to vk::SubmitInfo in vk::Queue::submit call (see FIXME comment in Vulkan::CommandListSet::Execute()). All tutorials can now run on MacOS using Vulkan RHI.
  • Fixed memory corruption and occasional crash on Linux on attemp to set debug name for surface using vkSetDebugUtilsObjectNameEXT in Vulkan::RenderContext. It is not possible to set debug name for surface because it is not created with devide object, unfortunately Vulkan validation layer does not report this error but simply corrupts memory, which is resulting in undefined behaviour.
  • Improved Vulkan::RenderContext frame synchronization reliability by adding vk::Fence wait of the previously acquired images before aquiring next frame image.
  • Added support of ErrorSurfaceLostKHR on acquireNextImageKHR by recreating surface and swap-chain in Vulkan::RenderContext.
  • Fixed Vulkan::CommandList and Vulkan::ParallelRenderCommandList command buffers invalidation on render pass updates, for example during swap chain resize.
  • Fixed Vulkan::ParallelRenderCommandList debug groups encoding validation error.
  • Fixed Vulkan::CommandListSet execution wait for frame image availability semaphore, when it submits ParallelRenderCommandList.
  • Fixed Vulkan thread-safety issues found in "Parallel Rendering" tutorial on vk::DescriptorSet setup.
  • Fixed race in multi-threaded access to CommandListSet shared pointers in Base::CommandQueueTracking.
  • Fixed invalid Vulkan buffer size alignment resulting in heap memory overrun.
  • Fixed DirectX applications crash on startup from Profiling build in case when COPY command queue does not support timestamp queries (on AMD Radeon integrated graphics).
  • Removed explicit BufferSettings::size alignment by 256 bytes in RHI/IBuffer.h/cpp, but do it implicitly inside DirectX RHI implementation.

External libraries

  • VulkanHeaders library was updated to v1.3.251
  • Catch2 was updated v3.1.0 -> v3.4.0,
  • CLI11 was updated v2.2.0 -> v2.3.2,
  • CMRC was updated v2.0.1 -> v2.0.2,
  • CPM was updated v0.38.0 -> v0.38.2,
  • FMT was updated v8.1.1 -> v10.0.0,
  • FTXUI was updated v4.0.0 -> v4.1.1
  • ITT Api was updated v3.23.0 -> v3.24.2
  • MagicEnum was updated v0.8.0 -> v0.9.3
  • TaskFlow was updated v3.4.0 -> v3.6.0
  • STB was updated 2021-09-10 -> 2023-01-29

Build

  • Added new CMake option METHANE_MEMORY_SANITIZER_ENABLED to enable build with memory address sanitizer.
  • Added MacOS_VK_Release job to CI Build workflow, which builds Methane Kit with Vulkan RHI on MacOS using static linking with MoltenVK framework from Vulkan SDK.
  • Added optional step to CI Build jobs "Install Vulkan SDK", which is currently required for MacOS_VK_Release job only to link with MoltenVK framework.
  • Disabled some CI Build steps and workflows in Forked GitHub repositories to let CI pass successfully for pushes.
  • Updated GitHub Action sonarcloud-github-c-cpp to v2 in "CI Scan" workflow. Sonar Scanner was upgraded from v4.8 to v5.0 as well.
  • Allow CI Build workflow to run in forks by removing cron schedule (GitHub automatically disables all workflows with CRON schedule in Forked repositories).
  • Prevent CI Sonar Scan and CI CodeQL workflows to run in forked repositories.

Note

For MacOS users: In case of error "App Is Damaged and Can't Be Opened" on attempt to run bundled application, try removing application from quarantine using the following command:

sudo xattr -d com.apple.quarantine MethaneHelloTriangle.app
open MethaneHelloTriangle.app