Skip to content

Methane Kit v0.6.5

Compare
Choose a tag to compare
@egorodet egorodet released this 14 Aug 17:04
· 673 commits to master since this release

Vulkan API and Linux platform support was added in this release: Methane Hello Cube Vulkan

  • Tutorials applications:
    • HelloTriangle tutorial was simplified with removal of vertex buffer and using only vertex_id for triangle rendering.
    • HelloCube tutorial was added for demonstration of rotating colored cube rendering using only vertex and index buffers. Uniform buffers and program bindings are not used for the purpose of simplicity and vertices transformation is done fully on CPU. HelloCubeUniforms tutorial version (under UNIFORMS_BUFFER_ENABLED define) implements vertices transformation on GPU using MVP matrix stored in uniforms buffer and program bindings object. Methane Cube Map Array Vulkan
    • CubeMapArray tutorial was added to demonstrate cube-map array texturing, rendering to texture sub-resource views and Sky-box rendering with Methane graphics extension.
    • ParallelRendering tutorial was added to demonstrate multi-threaded render commands encoding to a single render pass.
    • TextureLabeler helper class was added to library MethaneAppsCommon with shared implementation of text labels rendering to texture cube/array faces.
  • Samples applications:
    • Asteroids sample was moved to MethaneAsteroids repository for demonstration of Methane Kit external usage. Methane Parallel Rendering Vulkan
    • Scene complexity in Asteroids sample can be changed now with new single-key shortcuts: 0 .. 9
  • Data libraries:
    • Add initial thread-safety to Events library in Emitter and Receiver classes.
    • Fixed ITT instrumentation issue related to access to uninitialised domain global variable at application initialisation from other global variable initialisers.
  • Platform libraries:
    • Platform::AppLin implementation based on X11/XCB libraries for Linux was added (close #11), which allows to create GUI Window for rendering on Linux desktop with support of:
      • Window resizing and full-screen mode.
      • Keyboard and Mouse events translation.
      • Message box with text message and buttons drawing via X11/XCB.
      • Window icon loaded from PNG resources.
    • Command line help and parsing errors are now printed to the console output, instead of showing in message box.
    • Input::Keyboard::State and Input::Mouse::State conversion to string was fixed, more functionality of these classes was covered with unit tests.
    • Fixed Linux application window placement in multi-monitor configuration.
    • Fixed MacOS window settings setup from command line.
  • Graphics libraries:
    • Graphics Core library changes:
      • Vulkan-based Graphics Core implementation was added (closed #10): SystemVK, DeviceVK, RenderContextVK, FrameBufferTextureVK, RenderPassVK, RenderPatternVK, ShaderVK, ProgramVK, RenderStateVK, ViewStateVK, CommandListVK, RenderCommandListVK, FenceVK, BufferVK, FrameBufferTextureVK, DepthStencilTextureVK, RenderTargetTextureVK, ImageTextureVK, SamplerVK, ProgramBindingsVK, ResourceBarriersVK, ParallelRenderCommandListVK, TimestampQueryBufferVK, TimestampQueryVK. classes.
        • Vulkan API is used via vulkan.hpp C++ wrappers with support of dynamic dispatch table, which allows to build without Vulkan SDK libraries. vk::Unique* wrappers are used to automatically release Vulkan objects in RAII style.
        • Vulkan debug utils messenger instance is used to track validation layer message and fixed a lot of them. A few minor validation warnings were ignored in callback function in DeviceVK class.
        • Vulkan object names and debug labels are used extensively for all Vulkan objects.
        • RenderCommandListVK setup all Vulkan pipeline barriers before render pass begin by using secondary command buffer for recording all synchronisation commands separately from render pass commands in primary buffer.
        • ImageTextureVK has mip-maps generation implemented on GPU.
      • RenderPattern class was added to represent render pass attachments configuration without binding to particular resources (wrapper of vk::Renderpass). RenderPass was updated accordingly to get configuration from RenderPattern and bind attachment resources. RenderPattern instance was added to RenderState settings.
      • Device::Capabilities struct was added with the required command queues count and other configuration flags, required due to Vulkan specifics.
      • CommandQueueTrackingBase class was added to share command queue execution tracking logic between DirectX and Vulkan implementations.
      • RenderContextDX implementation is now using waitable object to reduce DXGI swap-chain latency.
      • System singleton is now destroyed strictly after all its Devices to enable correct Vulkan destruction order.
      • ResourceState enumeration was simplified: state VertexAndConstantBuffer was split to VertexBuffer and ConstantBuffer states; states NonPixelShaderResourceand PixelShaderResource were merged into one state ShaderResource.
      • Added support for resource ownership transition between command queue families in Resource::SetOwnerQueueFamily(..) and ResourceBarriers::[Add|Remove]OwnerTransition(...) interfaces and implemented ownership transition for Vulkan resources.
      • ResourceLocation interface was renamed to ResourceView, extended with settings of sub-resource index, count, size, offset and reworked internally for DirectX and Vulkan to support multiple views handling for a single resource.
      • Added initial support of the HLSS StructuredBuffer in DirectX.
      • Resource factory functions were simplified with removal of optional DescriptorByUsage argument, which was previously used to restore DirectX descriptors after resource recreation on previous location in heaps to let bindings work.
      • Add support of debugger break and message filtering with DirectX debug layer in DeviceDX class.
      • Shared command list timestamp queries between DirectX and Vulkan using TimestampQueryBuffer and TimestampQuery objects in CommandListBase class.
      • Bug fixes:
        • Fixed Methane Tracy GPU instrumentation via Methane/TracyGpu.hpp with Tracy v0.8 (was broken after update). Added reference Tracy GPU instrumentation via TracyD3D12.hpp header under macro definition METHANE_GPU_INSTRUMENTATION_ENABLED == 2 in CommandListDX.hpp(value 1 is reserved for Methane GPU instrumentation).
        • Fixed runtime errors in GPU profiling builds with METHANE_GPU_PROFILING_ENABLED=ON:
        • Fixed DirectX GPU timestamps re-calibration issue leading to GPU ranges shifting.
        • Fixed command list execution waiting threads synchronisation in Profiling builds in Typography tutorial.
        • Fixed resources retaining in command lists. Retained resources were incorrectly cleared on CommandList::Reset(), while they should be cleared on CommandList::Commit().
        • Fixed DirectX descriptor heaps allocations after Context::Reset() by always using deferred heap allocation in all cases. Deferred heap initialisation flag was removed, since it became unconditionally deferred.
        • Fixed sporadic hang in CommandQueueTrackingBase::WaitForExecution()
        • Fixed sporadic crash on destruction of CommandQueueTrackingBase with proper shutdown procedure called from destructor of derived class.
    • Camera::Resize method arguments were changed to use FrameSize and FloatSize structures, which simplify its calls from the App::Resize method.
    • Graphics/Mesh module was split from Graphics/Primitives.
    • SkyBox extension is now using CubeMesh instead of SphereMesh for sky rendering.
  • User Interface library changes:
    • Text::HorizontalAlignment::Justify mode was added to support horizontal text justification.
    • HeadsUpDisplay: Graphics API name is now displayed in HUD .
    • Fixed Text repeated buffer updates in deferred mode.
  • Tests:
    • All unit tests were updated to support breaking changes in Catch v3.
    • Logging of Point, Rect and RectSize values was added in DataTypes unit tests.
  • Common changes:
    • Shader uniform structures were shared between HLSL and C++ code via header files using HLSL++ library.
    • Chained parameter setters were added to some major Settings structures for initialization convenience.
  • External libraries:
    • External dependencies management via Git submodules was replaced with CPM.cmake package manager. No submodules anymore - it greatly simplifies external library updates!
      • All externally dependent repositories are downloaded to CPM cache directory during CMake configuration stage, to Build/Output/ExternalsCache by default (it can be changed with CMake option CPM_SOURCE_CACHE).
      • When CMake project is configured under CLion, external repositories are downloaded to individual build directories of each configuration to workaround parallel cache update collision issue of the CPM.cmake.
    • New README.md description of the external dependencies was added in Externals directory.
    • Library updates:
      • Vulkan-Headers was updated to v1.3.219
      • SPIRV-Cross was added v1.3.216.0
      • DirectXCompiler was updated to v1.6.2104 to support SPIRV generation on Windows and new binaries for Linux
      • DirectXTex was updated to v1.9.6
      • Catch2 updated to v3.1.0
      • CLI11 updated to v2.2.0
      • CMRC updated to 2021-08-27
      • FMT updated to v8.1.1
      • FreeType2 updated to v2.12.1
      • HLSLpp updated to v3.2+ with integer division fixes
      • IttApi updated to v3.23.0
      • MagicEnum was updated to v0.8.0
      • TaskFlow was updated to v3.4.0
      • STB updated to 2021-09-10
      • Tracy updated to v0.8.2.1
      • CMakeModules updated with support for auto-detecting new Windows SDK versions, including Win11 2110 SDK (closed #87)
  • Build Infrastructure:
    • Project repository, Azure Dev Ops and SonarCloud projects were moved from personal GitHub account @egorodet to the organization @MethanePowered
    • CMake changes:
      • Root CMakeLists.txt was simplified by moving all compiler configuration options to CMake/MethaneBuildOptions.cmake.
      • CMake function add_methane_application was changed to use flexible named parameters.
      • Graphics API variables definition and default API identification were moved from root CMakeList to the CMake/MethaneModules.cmake in functions get_native_graphics_apis and get_default_graphics_api for reusing in external projects.
      • Externally used variables GRAPHICS_API, DXC_BINARY_DIR, SPIRV_BINARY_DIR were added as properties to CMake target MethaneKit.
      • CMake build option METHANE_GFX_VULKAN_ENABLED was added to enable Vulkan build on Windows.
      • CMakePresets.json file was added with predefined configure and build presets for "Ninja Multi-Config" and platform native generators "Visual Studio 16 2019", "Xcode" and "Unix Makefiles".
      • Shader config files were replaced with shaders compilation functions in CMake: add_methane_shaders_source to compiler shaders file and add_methane_shaders_library to add compiled shaders to application resources (see CMake/MethaneShaders.cmake)
      • Removed Visual Studio CMake configuration file CMakeSettings.json. CMakePresets.json should be used instead.
      • CMake module MethaneShaders enable compilation of HLSL shaders to SPIRV for Vulkan graphics API using new DirectX Compiler (DXC) version.
      • Fixed tests running during build, which was broken due to missing CMake command dependency.
      • Minimum CMake version is now 3.18.
    • Azure Pipelines CI changes:
      • Azure builds are now using CMake Presets as a single source of build configurations for Release, Profile and SonarScan builds for all platforms.
      • Azure build jobs and CMake build profiles were updated for multiple graphics API support and extended with Vulkan builds for Windows.
      • Ubuntu_VK_Profiling build was added to Azure Pipelines.
      • Azure builds for Linux and MacOS are now publishing build artifacts as TAR archives to keep executable file permissions unchanged.
      • Use caching of Externals CPM package sources in Azure Pipelines and GitHub Workflows to speedup builds.
      • MacOS builders were switched from v10.15 to v11.
    • Build scripts Build/Windows/Build.bat and Build/Posix/Build.sh were extended with convenience command line options, including --vulkan, --debug, --graphviz, --analyze and others.
    • GitPod should now auto-install required Linux packages and support preview of the UI window on remote machine.
    • Removed ReSharper configuration files Folder.DotSettings and .editorconfig from repository.
    • Initial Vulkan build support on MacOS was added via MoltenVK library, unfortunately it does not work due to some unsupported Vulkan extensions which are required by Methane Kit.
    • CodeQL workflows now use Profile CMake presets same as in SonarCloud analysis builds in Azure Pipelines.
    • CodeQL analysis on Windows has started failing in GitHub actions since May 25 with IOException "There is not enough space on the disk", so analysis steps were disabled for Windows to let build pass without analysis until the issue is fixed by GitHub support.
    • Fixed GCC 11.2 build errors on Ubuntu 22.04.
    • Moved build instructions from root README.md to Build/README.md.