Releases: MethanePowered/MethaneKit
Methane Kit v0.8.1
Summary
Methane Kit v0.8.1 update modernizes the project with a switch to the C++20 standard, introducing features like designated initializers, concepts, span, ranges and simplified implementation of comparison operators. Comprehensive unit tests were added for all "Graphics RHI" classes, increasing code coverage of the core modules. Build with Visual Studio 2019 is no longer supported, CMake build configurations were removed for VS2019.
Common changes
- Upgraded project code and switch to the C++20 standard (close #141 ):
- Use designated initializers for RHI settings;
- Use concepts instead of SFINAE in templates;
- Use
std::spanin RHI interfaces extensively, instead of references tostd::vector; - Get rid of stdext::checked_array_iterator in favor of
std::span; - Reduce enums verbosity across all code with help of
using enum; - Use
std::numbersinstead ofMethane::Data::Constants; - Use default implementations of the three-way comparison or equality operators wherever possible and remove manually defined comparison operators, which can be auto-generated now;
- Use range-based algorithms.
- Used hidden friend pattern for binary operators.
- Increased minimum CMake version up to 3.24.
Graphics libraries
- Added
ObjectRegistryPIMPL wrapper to simplify registry use. - Fixed multithreaded access violation in
Base::RenderPass. - Removed excessive parameter id from
IResourceBarriers::Addmethod. - Added
GetRenderPass()method to classParallelRenderCommandList. - Added
GetComputeCommandKit()method to classRenderContext. - Refactored method
ITexture::GetTextureViewto returnTextureViewinstead ofResourceView.
Data libraries
- Used lambdas instead std::function in Animation classes
Tests
- Added unit-tests to cover all classes of the "Graphics RHI" layer (close #122):
Systemtests were added.Devicetests were added.RenderContexttests were added.RenderStatetests were added.RenderPatterntests were added.RenderPasstests were added.RenderCommandListtests were added.ParallelRenderCommandListtests were added.CommandListSettests were added.ResourceBarrierstests were added.
- Added unit-tests for all template classes of the "Graphics Mesh" library.
External libraries
- CPM.cmake was updated to
v0.40.8 - DirectXHeaders was updated to
v1.615.0 - DirectXTex was updated to
v2.0.7(mar 2025) - FMT was updated to
v11.1.4 - CLI11 was updated to
v2.5.0 - Catch2 was updated to
v3.8.1 - HLSL++ was updated to
v3.5.3 - TaskFlow was updated to
v3.9.0.1
Build
- Dropped support of Visual Studio 2019 build on Windows.
- Supported build with XCode 16.3 on Apple platforms.
- Supported code coverage with LCov 2.0 on Ubuntu 24.04.
Continuous Integration
- Fixed ReportGenerator setup on Linux in Sonar Scan action.
- Updated CodeQL actions to v3 (v2 is deprecated).
Documentation
- Updated all tutorials documentation according to latest code changes.
- Added unit tests coverage description in markdown documents of test modules.
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.appMethane Kit v0.8.0
Summary
In Methane Kit v0.8.0, several significant enhancements have been introduced:
- Improved Program Bindings Configuration: The configuration of program bindings has been enhanced by defining argument access frequency directly within HLSL argument space modifiers. Previously, this was configured in the C++ program settings.
- Enhanced Performance for Metal RHI: Performance of program bindings for Metal RHI has been improved by supporting the Argument Buffers API. This allows for more efficient writing of binding commands in command encoders.
- Simplified Shader Argument Buffers Initialization: A simplified interface for initializing shader argument buffers using root constants has been added. This enables direct data assignment to program argument bindings and handles all buffer management within Methane RHI. For small constants "Push Constants" native API is also supported via RHI of program bindings.
Tutorials
- Root-constants were applied across all tutorials instead of uniform buffers to simplify code.
- Console Compute tutorial was extended with game rule selection using root constant value interface of program bindings.
- ParallelRendering app can be built in two versions: first one is using addressable buffer views like before and second one is using root constants but with lower performance.
Graphics libraries
- Shader argument access types were added in HLSL shaders as register space definitions (
META_ARG_CONSTANT,META_ARG_FRAME_CONSTANT,META_ARG_MUTABLE), to replace shader arguments configurationRhi::ProgramArgumentAccessorsinProgramSettings. RHI shader arguments reflection uses these register space definitions to add default argument accessors configuration, so that it is not necessary to be defined in user code ofProgramSettings. Rhi::RootConstantclass was added as a storage of constant data (derived fromData::Chunk), which can be set to buffer argument bindings, defined withProgramArgumentValueType::RootConstantBufferinRhi::ProgramArgumentAccessors.Rhi::IProgramBindings::SetRootConstantallows to set root constant data for such argument bindings. Internally managedRhi::RootConstantBufferobjects significantly simplify user code by eliminating the need in creating separate uniform buffers. Support ofRoot32BitConstantsin DirectX andPushConstantsin Vulkan andSetBytesin Metal was added viaRhi::ProgramArgumentValueType::RootConstantValue(close #140).Metal::ProgramBindingsin Metal RHI were extended with Metal Argument Buffers API support for more efficient shader argument bindings, similar to descriptor tables in DirectX 12 and descriptor sets in Vulkan. CMake optionMETHANE_METAL_ARGUMENT_BUFFERS_ENABLEDwas added to allow switching between direct resource binding and argument buffers (enabled by default). Metal argument buffers are created independently for groups of shader arguments with different argument access types. (close #138)Metal::ProgramBindingswere refactored to reduce code duplication with help of templates.ProgramArgumentandProgramArgumentAccessortypes were moved fromIProgram.hheader toProgramArgument.h/cpp.ProgramArgumentAccessModifierenum was renamed toProgramArgumentValueType.- Shader argument declaration macros were added in
ProgramArgument.hto simplify program argument accessors setup:META_PROGRAM_ARG_*(ROOT_CONSTANT,ROOT_FRAME_CONSTANT,ROOT_MUTABLE,RESOURCE_CONSTANT,RESOURCE_FRAME_CONSTANT,RESOURCE_MUTABLE, etc.). CommandListDebugGroupsub-group names now usestd::string_viewScreenQuadwas migrated to root constants instead of uniform buffer.- Fixes:
- Fixed Vulkan validation issues revealed by Vulkan SDK 1.3.290.0.
- Fixed DirectX 12 GPU timestamp queries for DirectX, fixed invalid initial state of the read-back buffer.
- Fixed Metal crash due to executing state of the current frame command lists and sporadic frame synchronization issue. VSync was disabled by default for Metal.
- Fixed Vulkan RHI build with newer Vulkan SDK versions > 300.
Data libraries
- Added support of prioritizing receivers in emitter list with
priorityargument of methodEmitter<ICallback>::Connect(Receiver<ICallback>& receiver, uint32_t priority).
Common changes
- Renamed all macroses
META_CHECK_ARG_*by removal of ARG suffix toMETA_CHECK_*. - Apply hidden friend function pattern to binary operators by recommendation from SonarCloud.
User Interface libraries
- Text program bindings now use root constants instead of manually created uniform buffers.
Tests
- Added unit-tests to cover more classes of the "Graphics RHI" layer (continue #122):
ViewStatetest was addedFencetest was extendedBufferSettest was addedCommandKittest was addedCommandListDebugGrouptest was addedProgramBindingstest was extended with root constant bindings.
Data::EventsTestwas extended to check prioritizing of connected receivers.
External libraries
- DirectXShaderCompilerBinary was updated to
v1.7.2308 - SPIRVCross was updated to
v1.3.296.0 - MetalShaderConverterBinary binaries were added
v1.1 - CPM.cmake was updated to
v0.40.5 - Tracy was updated to
v0.11.2.1 - VulkanHeaders were updated to
v1.3.296 - DirectXHeaders was updated to
v1.3.296.0 - DirectXTex was updated to
v2.0.6(oct 2024) - FreeType2 was updated to
v2.13.3 - FMT was updated to
v11.0.2 - CLI11 was updated latest mainline from
10.12.2024 - IttApi was updated to
v3.25.3 - Catch2 was updated to
v3.7.1 - MagicEnum was updated to
v0.9.7 - FTXUI was updated to
v5.0.0 - BoostNowide was updated to
v1.87.0 - HLSL++ was updated to
v3.5.3 - TaskFlow was updated to
v3.8.0
Build
- Fixed memory leak of command encoders in Metal applications when RHI PIMPL inlining was disabled. Issue was root caused to
-fobjc-arccompiler flag (ARC: automatic reference counting) was not set inMethaneBuildOptionstarget, as the result ARC was not enabled for the whole application, which led to leaking of some recurrently created Metal objects. - Experimental support of Apple's Metal Shader Converter was added to be used instead of SPIRV-Cross. Unfortunately, it does not work correctly in all cases and is disabled by default under CMake option
METHANE_METAL_SHADER_CONVERTER_ENABLED. - Updated
CMakeModules/FindWindowsSDK.cmakewith fix for ARM64 architecture detection with VS2022 and Ninja and detection of the latest Windows SDK version 10.0.22621. - Added support of XCode 16 for MacOS Sequoia 15. Also fixed MacOS build compatibility with older Xcode versions.
- Apple application RPATH
/usr/local/libwas added to findlibvulkan.1.lib - Added CMake option
METHANE_METAL_FRAMES_SYNC_WITH_DISPATCH_SEMAPHORE Build\Windows\Build.batwas extended with more build options.
Continuous Integration
- Allow manual dispatch of CI Build, CodeQL and Sonar Scan workflows in GitHub Actions.
- Switched Sonar-Scan action back to
macos-13hosted runners to use Intel h/w, instead of M1/ARM, which is not supported yet. - Update all GitHub actions to use latest version of Node.js.
- Fixed CodeCov coverage results upload.
- CodeQL scan was re-enabled on Windows.
- Vulkan SDK was updated to v1.3.290.0 in macOS CI.
Documentation
- Updated all tutorials documentation according to latest code changes and with help of Copilot enhancements.
- Added documentation to
CubeMapArrayandParallelRenderingtutorials.
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🎄 🎄 🎄 ⛄ 🎅 Happy New Year! 🎅 ⛄ 🎄 🎄 🎄
Methane Kit v0.7.3
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
IndexedNamefunction with explicitfmt::format.
Graphics libraries
- Vulkan extension
VK_EXT_EXTENDED_DYNAMIC_STATEwas made optional by supporting monolithicvk::Pipelinestate object inVulkan::RenderStateRHI implementation. Both monolithic and dynamic pipeline state APIs are supported now, depending on extension availability. - Removed
VK_KHR_SYNCHRONIZATION_2extension 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::SubmitInfoinvk::Queue::submitcall (see FIXME comment inVulkan::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
vkSetDebugUtilsObjectNameEXTinVulkan::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::RenderContextframe synchronization reliability by addingvk::Fencewait of the previously acquired images before aquiring next frame image. - Added support of
ErrorSurfaceLostKHRonacquireNextImageKHRby recreating surface and swap-chain inVulkan::RenderContext. - Fixed
Vulkan::CommandListandVulkan::ParallelRenderCommandListcommand buffers invalidation on render pass updates, for example during swap chain resize. - Fixed
Vulkan::ParallelRenderCommandListdebug groups encoding validation error. - Fixed
Vulkan::CommandListSetexecution wait for frame image availability semaphore, when it submitsParallelRenderCommandList. - Fixed Vulkan thread-safety issues found in "Parallel Rendering" tutorial on
vk::DescriptorSetsetup. - Fixed race in multi-threaded access to
CommandListSetshared pointers inBase::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::sizealignment by 256 bytes inRHI/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_ENABLEDto enable build with memory address sanitizer. - Added
MacOS_VK_Releasejob toCI Buildworkflow, which builds Methane Kit with Vulkan RHI on MacOS using static linking with MoltenVK framework from Vulkan SDK. - Added optional step to
CI Buildjobs "Install Vulkan SDK", which is currently required forMacOS_VK_Releasejob only to link with MoltenVK framework. - Disabled some
CI Buildsteps and workflows in Forked GitHub repositories to let CI pass successfully for pushes. - Updated GitHub Action
sonarcloud-github-c-cppto v2 in "CI Scan" workflow. Sonar Scanner was upgraded from v4.8 to v5.0 as well. - Allow
CI Buildworkflow to run in forks by removing cron schedule (GitHub automatically disables all workflows with CRON schedule in Forked repositories). - Prevent
CI Sonar ScanandCI CodeQLworkflows 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.appMethane Kit v0.7.2
This release adds initial support of compute pipeline in Methane Kit for app Graphics RHI backends (DirectX 12, Vulkan and Metal). "Console Compute" tutorial was added to demonstrate it on example of Conway's Game of Life implemented in compute shader used from pure-console application. Graphics RHI was partially covered with initial set of unit-tests implemented using "Null RHI" backend for testing of the Base RHI logic.
Tutorial applications
- Console Compute tutorial was added to demonstrate GPU compute pipeline on Conway's Game of Life example implemented in pure-console application with FTXUI library.
Graphics libraries
- New Graphics RHI classes were added to support compute pipeline (close #8):
ComputeContextComputeCommandListComputeState
- Added
ShaderType::Computeshader type support. - Added
CommandListType::Computesupport inCommandQueue. - Added
DeviceCaps::compute_queues_count. - Added Unordered Access View support in ProgramBindings for reading and writing texture data from compute shader.
- Added
TextureandBufferread-back support viaGetDatamethods. - Removed common
GetDataandSetDatamethods from base interfaceIResourcein favour of separate methods added in the derivedIBufferandITextureinterfaces to differentiate argument types and get rid of unwanted methods inISamplerinterface. IResourcemethodsGetSubresourceCountandGetSubresourceDataSizemethods were moved toITextureinterface.- Fixed some DirectX and Vulkan validation warnings.
User Interface
- Fix rare crash on text mesh update.
Data libraries
FpsCounterinterface and implementation was moved fromGraphics/RHItoData/Primitivesto allow using it independently from RHIRenderContext.- Enable
Chunkcopy and move constructors and operators.
Tests
- Initial unit-tests were added for "Graphics RHI" layer, implemented using "Null RHI" backend (continue #122):
ShaderTestSamplerTestFenceTestCommandQueueTestComputeStateTestTextureTestProgramBindingsTestTransferCommandListTestProgramTestComputeContextTestBufferTestComputeCommandListTest
- Overall code coverage has reached 30% for
Modulesdirectory.
External libraries
- FTXUI library v4.0.0 was added
- HLSL++ was updated to v3.3.1
- CPM.cmake was update to v0.38.0
- Tracy was updated to v0.9.1
Build
- Cleaned up root
CMakeLists.txt - Build with new Xcode 14.3 was supported by cleaning up the code from removed deprecated functions.
- Apple deployment target versions were bumped to use new shader reflections API:
- MacOS 10.15 -> 13.0
- iOS 15.0 -> 16.0
Continuous Integration
- Fixed reporting of failed unit tests: previously builds were terminating on any test failure, now builds are still failing by unit-tests but they perform all reporting operations.
- Sonar-scan build is now automatically finding all test result xml files.
- Added CodeCove components and excluded
TestsandAppsdirectories from code coverage results.
Documentation
- ReadMe documentation was added for "Console Compute" tutorial.
- Update code in other tutorials documentation to reflect changes in
Resource,BufferandTexturemethods.
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.appMethane Kit v0.7.1
This is a refactoring release which replaces monolithic "Graphics Core" module with modular RHI (Rendering Hardware Interface) consisting of interfaces, base implementation, DirectX, Vulkan, Metal and Null backend modules and new "Impl" module with PIMPL classes providing convenient way to use RHI with an extra performance boost from inlining API calls directly to final implementation, instead of virtual calls made through abstract interfaces. See performance comparison of FPS in Methane Asteroids benchmark with 3 implementations (all compiled with the same updated compiler optimization flags): v0.7.0 RHI virtual interfaces, v0.7.1 RHI PIMPL classes without inlining and with inline calls to final implementation. All tutorials, graphics primitives and user interface classes were rewritten to use RHI PIMPL classes, which allow to reduce code complexity and improve readability.
Graphics libraries
- RHI PIMPL classes were added as an alternative to using RHI abstract interfaces in your application (see
Modules/Graphics/RHI/Impl). PIMPL classes are more convenient to use since they allow to write code without smart pointers and allow to get more performance with final implementation inlining. CMake optionMETHANE_RHI_PIMPL_INLINE_ENABLEDenables RHI final implementation inlining for PIMPL classes and allows to make direct calls to final RHI implementation without virtual call overhead. PIMPL inlining can gives up to 5% of extra performance in highly loaded rendering scenario. Graphics Coremodule was renamed toGraphics RHI(RHI is a common acronym for Rendering Hardware Interface) and split into several CMake modulesInterface,Base,DirectX,Vulkan,MetalandImpl- this makes architecture even more modular and extensible.- All RHI abstract interfaces were renamed to start with
Iprefix in file and struct names and put underMethane::Graphics::Rhinamespace, for exampleGraphics::Device->Graphics::Rhi::IDevice. - All RHI implementation classes were symmetrically renamed by removing impl. suffix and moving it under impl. namespace, for example
Graphics::DeviceBase->Graphics::Base::Device,Graphics::DeviceDX->Graphics::DirectX::Device. Source files were renamed accordingly:Graphics/DeviceBase.h->Graphics/Base/Device.h,Graphics/DeviceDX.h->Graphics/DirectX/Device.h. This allows to mirror RHI implementations for different APIs with completely symmetrical classes and files naming inside different namespaces. - Removed excessive
Createstatic factory functions ofITextureandIBufferinterfaces using custom setting initialisers. - Add sequential
CreateXvirtual methods in RHI interfaces and use them in implementation ofX::Createstatic factory functions. - Added RHI Null implementation which is going to be used in unit tests.
BLITCommandListwas renamed toTransferCommandList.QueryBufferwas renamed toQueryPool.- Replaced
std::stringwithstd::string_viewinIObject::SetNameandGetNamemethods. - Simplified implementation of
BufferandTextureclasses for Vulkan and DirectX APIs by replacing template class variants with common class implementation. - Migrated
ImageLoader,ScreenQuadandSkyBoxto use RHI PIMPL classes instead abstract interfaces and implemented themself in PIMPL style. - Split MeshBuffers template class implementation to MeshBuffersBase class and derived template class.
- Some headers from
Primitivesmodules were moved insideRHIsubmodules:- Moved
Windows/DirectXErrorHandling.htoRHI/DirectXmodule and renamed toErrorHandling.h. - Moved
FpsCounter.hand split to interface and implementation toRHI/InterfacesandRHI/Basemodules.
- Moved
User Interface
- Migrated
Font,TextandBadgeclasses to RHI PIMPL classes instead of abstract interfaces and implemented themself in PIMPL style.
Platform libraries
- Fixed X11 window resizing on Linux with Nvidia drivers:
ErrorOutOfDateKHRafter resizing swap-chain on Linux with NVidia proprietary drivers (close #105) Platform/Inputmodule was split into to submodules:Keyboard,Mouse,ControllersandActionControllers. All classes from this modules were moved underPlatform::Inputnamespace.
Data libraries
- Added
Data::EnumMask<EnumType>template class implementing bit-mask operations on enum values used as bits.EnumMasktype is used in Methane Kit public interfaces instead ofmagic_enum::bitwise_operators. - Added
Data::Transmitter<ICallbackType>class which implementsData::IEmitterby transmitting callback connections to some other emitter instance.
External libraries
- CPM.cmake was updated to v0.37. This release fix parallel cmake generation for multiple configuration used in CLion.
- Tracy was updated to v0.9.
- DirectX-Headers was updated to v1.608.2b to use modular headers instead of monolithic
d3dx12.hin DirectX RHI.
Tutorials applications
- All tutorial implementations were rewritten to use RHI PIMPL classes instead of smart pointers to abstract interfaces. It allows to reduce code complexity and make it looks clean and simple.
Tests
- Added unit tests for class from
Data/EnumMask.hpp. - Added unit tests for functions from
Data/EnumMaskUtils.hpp. - Added unit tests for class from
Data/Transmitter.hpp
Builds
- Tracy executable file is automatically added in "Profile" build artifacts (pre-platform executables are taken from Methane Powered Tracy releases).
- Enabled aggressive optimisations in Release builds, including whole program optimisations with link-time code generation, inline functions expansion, disable security checks and others.
- ITT instrumentation is disabled by default in Release builds, but still enabled in Profile builds.
- Add explicit CMake options printing during configuration.
- Windows builds in GitHub Actions are upgraded to use Visual Studio 2022.
- Dependent GitHub actions were updated in yaml scripts to use NodeJS 16.
- CI Sonar Scan builds now use new GitHub action
sonarcloud-github-c-cppto install scanner binaries.build-wrappertool is not used anymore, it was replaced with Ninja compilation data base generated by CMake.
Documentation
- Tutorials README documentation was updated to reflect PIMPL RHI classes usage instead of pointers to abstract interfaces.
- Added Data, Platform, Graphics and UserInterface modules dependency diagrams in folder README.md files using Mermaid markdown.
- Updated High-Level Architecture diagram, RHI classes diagram and GraphViz module relations diagram.
Release CI Runs
Methane Kit v0.7.0
iOS and tvOS platforms support was added in this release. 
- Tutorials applications:
- Customised default UI options to make HUD visible by default on iOS.
- Added iOS screenshots for tutorials.
- Added keyboards shortcuts for tutorials in README files.
- Known issue: #101
- Platform libraries:
Methane::Platform::AppIOSimplementation was added to support iOS and tvOS mobile platforms (closed #12).- iOS Alert window implementation was added.
- Limited input support was added for iOS to translate touches to mouse events (keyboard input is not supported).
- Moved
RenderContext::GetContentScalingFactorandRenderContext::GetFontResolutionDpimethods toPlatform::IAppinterface with platform dependent implementations. Linux implementation for X11 was added.
- Graphics libraries:
- Manual memory management was removed from Objective-C Metal graphics implementation due to switching to ARC (automatic reference counting).
RenderCommandList::DrawandDrawIndexedcalls implementation for Metal was changed to exclude using ofstart_vertexandstart_instanceparameters for GPU Family <MTLGPUFamilyApple3orMTLGPUFamilyMac2, which is essential for working on iOS Simulators.- Unsupported
Samplerparameters were put under#ifdef APPLE_MACOSto enable tvOS support. - Fixed flipping camera projection up-side-down in portrait orientation.
- Tests infrastructure:
- Add missing test targets to GCov coverage on Ubuntu.
- Build infrastructure:
- Added CI Build & Test system based on GitHub Actions, which is partially duplicating CI in Azure Pipelines, but enables CI in forked repositories.
- Fixed shaders code signing by DXC in GitHub agents environment by adding hardcoded path to DXIL.dll in DXC environment.
- Added
Externals/iOS-Toolchain.cmakefile from iOS-CMake project to enable iOS & tvOS build configuration. - Apple Clang is now used with ARC enabled (automatic reference counting) via
-fobjc-arcoption. - Split MacOS and iOS application
.plistconfigs generation viaCMake/MethaneApplication.cmake - Split
CMake/MethaneGlobalOptions.cmakefromCMake/MethaneBuildOptions.cmaketo allow including it in the root CMakeLists of external projects to properly set global CMake options. - Add support for Apple code signing via
APPLE_DEVELOPMENT_TEAMcmake option. - Extended
Build/Unix/Build.shscript to support iOS / tvOS builds via new command-line arguments--apple-platform,--apple-dev-teamand--apple-deploy-target. - Added iOS and tvOS configurations to
CMakePresets.json. - Added iOS and tvOS Simulator builds in Azure Pipelines.
- Added CLion cmake configurations for iOS.
- Added iOS and tvOS build instructions to
Build/README.md. - Fixed iOS app running natively on Mac with Apple Silicon, thanks to @andrejnau for solution of issue #101
- Added CI Build & Test system based on GitHub Actions, which is partially duplicating CI in Azure Pipelines, but enables CI in forked repositories.
Methane Kit v0.6.5
Vulkan API and Linux platform support was added in this release: 
- Tutorials applications:
- HelloTriangle tutorial was simplified with removal of vertex buffer and using only
vertex_idfor 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.
HelloCubeUniformstutorial version (underUNIFORMS_BUFFER_ENABLEDdefine) implements vertices transformation on GPU using MVP matrix stored in uniforms buffer and program bindings object.
- 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.
TextureLabelerhelper class was added to libraryMethaneAppsCommonwith shared implementation of text labels rendering to texture cube/array faces.
- HelloTriangle tutorial was simplified with removal of vertex buffer and using only
- Samples applications:
- Asteroids sample was moved to MethaneAsteroids repository for demonstration of Methane Kit external usage.

- Scene complexity in
Asteroidssample can be changed now with new single-key shortcuts:0 .. 9
- Asteroids sample was moved to MethaneAsteroids repository for demonstration of Methane Kit external usage.
- Data libraries:
- Add initial thread-safety to
Eventslibrary inEmitterandReceiverclasses. - Fixed ITT instrumentation issue related to access to uninitialised domain global variable at application initialisation from other global variable initialisers.
- Add initial thread-safety to
- Platform libraries:
Platform::AppLinimplementation 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::StateandInput::Mouse::Stateconversion 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.hppC++ wrappers with support of dynamic dispatch table, which allows to build withoutVulkan SDKlibraries.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
DeviceVKclass. - Vulkan object names and debug labels are used extensively for all Vulkan objects.
RenderCommandListVKsetup 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.ImageTextureVKhas mip-maps generation implemented on GPU.
- Vulkan API is used via
RenderPatternclass was added to represent render pass attachments configuration without binding to particular resources (wrapper ofvk::Renderpass).RenderPasswas updated accordingly to get configuration fromRenderPatternand bind attachment resources.RenderPatterninstance was added toRenderStatesettings.Device::Capabilitiesstruct was added with the required command queues count and other configuration flags, required due to Vulkan specifics.CommandQueueTrackingBaseclass was added to share command queue execution tracking logic between DirectX and Vulkan implementations.RenderContextDXimplementation is now using waitable object to reduce DXGI swap-chain latency.Systemsingleton is now destroyed strictly after all itsDevicesto enable correct Vulkan destruction order.ResourceStateenumeration was simplified: stateVertexAndConstantBufferwas split toVertexBufferandConstantBufferstates; statesNonPixelShaderResourceandPixelShaderResourcewere merged into one stateShaderResource.- Added support for resource ownership transition between command queue families in
Resource::SetOwnerQueueFamily(..)andResourceBarriers::[Add|Remove]OwnerTransition(...)interfaces and implemented ownership transition for Vulkan resources. ResourceLocationinterface was renamed toResourceView, 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
StructuredBufferin DirectX. - Resource factory functions were simplified with removal of optional
DescriptorByUsageargument, 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
DeviceDXclass. - Shared command list timestamp queries between DirectX and Vulkan using
TimestampQueryBufferandTimestampQueryobjects inCommandListBaseclass. - Bug fixes:
- Fixed Methane Tracy GPU instrumentation via
Methane/TracyGpu.hppwith Tracy v0.8 (was broken after update). Added reference Tracy GPU instrumentation viaTracyD3D12.hppheader under macro definitionMETHANE_GPU_INSTRUMENTATION_ENABLED == 2inCommandListDX.hpp(value1is 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 onCommandList::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
CommandQueueTrackingBasewith proper shutdown procedure called from destructor of derived class.
- Fixed Methane Tracy GPU instrumentation via
- Vulkan-based Graphics Core implementation was added (closed #10):
Camera::Resizemethod arguments were changed to useFrameSizeandFloatSizestructures, which simplify its calls from theApp::Resizemethod.Graphics/Meshmodule was split fromGraphics/Primitives.SkyBoxextension is now usingCubeMeshinstead ofSphereMeshfor sky rendering.
- Graphics Core library changes:
- User Interface library changes:
Text::HorizontalAlignment::Justifymode was added to support horizontal text justification.HeadsUpDisplay: Graphics API name is now displayed in HUD .- Fixed
Textrepeated buffer updates in deferred mode.
- Tests:
- All unit tests were updated to support breaking changes in Catch v3.
- Logging of
Point,RectandRectSizevalues was added inDataTypesunit 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
Settingsstructures 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/ExternalsCacheby default (it can be changed with CMake optionCPM_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](https://github.com/cpm-cm...
- All externally dependent repositories are downloaded to CPM cache directory during CMake configuration stage, to
- External dependencies management via Git submodules was replaced with CPM.cmake package manager. No submodules anymore - it greatly simplifies external library updates!
Methane Kit v0.5
HLSL++ math, Graphics API optimizations, automated static code analysis, unit-tests code coverage, code improvements and extensive refactoring were done in this release:
- Samples and tutorials:
- Migrated tutorials and samples from CML to HLSL++ vector math library with SIMD intrinsics acceleration for CPU. Removed explicit alignment of uniform structure fields, which is not required anymore for HLSL++ types, since they already use 16-bytes aligned data storage.
- Asteroids sample was optimized with up to 50% FPS increase:
- Uniforms buffer size was reduced by reusing scene view-projection matrix in shaders (+7% FPS)
- Uniforms buffer data transfer is made asynchronously with draw commands encoding (+20% FPS)
- Disabled repeated retaining of the bound resources in command list draw calls (+30% FPS)
- Disabled automatic resource barriers setup during parallel asteroids rendering to take advantage of automatic state propagation from Common state.
- Got rid of excessive program binding calls in DirectX as a result of using Frame-Constant argument accessors in program bindings.
- Documentation updates:
- Textured Cube tutorial documentation was added (closed #17)
- Shadow Cube tutorial documentation was added (closed #18)
- Typography tutorial documentation was added
- Platform App, Graphics App and User Interface App documentation was added
- High-level architecture diagram was added on the project page
- Graphics Core Interfaces diagram was added on the project page
- Common libraries:
- Primitives library extended with error handling (closed #74):
Methane/Exceptions.hppwas added with common exception type defintionsMethane/Checks.hppwas added with error checking macro definitions akaMETA_CHECK*META_LOGmacros has been updated to make string formatting using FMT library inside of the macro using variadic arguments
- Primitives library extended with error handling (closed #74):
- Data libraries
RawVectortemplate class was added as a replacement ofcml::vectorfor dense-packed components storage used in vertex attributes.Pointtemplate class now use underlying HLSL++ vector and unifies 2D and 3D implementations.RectandRectSize,VolumeandVolumeSizeclasses were refactored. Made class fields private, available through accessors.Constantstemplate class was added with math constants.
- Platform libraries
- Platform App library was updated with unified error handling logic in
AppBaseclass, moved from platform specific classes
- Platform App library was updated with unified error handling logic in
- Graphics libraries
- Graphics Core changes:
- Program binding improvements:
Program::ArgumentandProgram::ArgumentAccessor(previouslyProgram::ArgumentDesc) were refactored from struct to class style with field accesor functions.Program::Argument::Modifiersbit-mask was replaced withProgram::ArgumentAccessor::Typeenum.- New program argument accessor type was added for frame-constant arguments
Program::ArgumentAccessor::Type::FrameConstantto reduce number of excessive argument binding setup calls. Frame-constant bindings are properly supported by DX descriptor table layout. - Frame-buffer index was added to
ProgramBindings::Createfunction as an optional argument to support frame-constant bindings. - Applying of DirectX resource states and root parameter bindings was reworked in
ProgramBindingsDX.
- Resource upload and state synchronization improvements:
COPYcomamnd queue is now used by default forBlitCommandListexecution in DirectX (instead ofDIRECTcommand queue used before). So the resources upload is also done with a COPY queue in DX now. It can be switched back to usingDIRECTqueue withRenderContext::Settings::options_maskbit-mask flagContext::Options::BlitWithDirectQueueOnWindows.Resource::SetDatamethod is extended with an optional argument of command queue for resource state synchronization. Command queue where resource is actually used should be passed whenever possible.- Resource barriers setup was moved from the
Resource::SetDatamethod implementations to theSetProgramBindings,SetVertexBufferandSetIndexBuffercalls, while setup resource barriers are still cached insideResourceobject. Resource::StateandResource::Barrierstypes were moved to the public header files and split fromResourceinterface definition.
CommandKitinterface was added to Graphics Core to provide unified access fromContext::GetDefaultCommandKitto the command queue, command lists, command list set and synchronization fences made for working together with the sameCommandList::Type. This interface allowed to replace methodsContext::GetUploadCommandQueue,Context::GetUploadCommandList,Context::GetUploadCommandListSetandRenderContext::GetRenderCommandQueuewithContext::GetDefaultCommandKit.CommandListchanges:CommandList::SetResourceBarriers(...)call was added to the public interface (was private before).
RenderCommandListchanges:RenderCommandList::ResetWithStateOncemethod was added additionally toResetWithStateto skip command list reset when it is already inEncodingstate with the sameRenderStatealready applied.RenderCommandList::SetIndexBuffersmethod was adedd, index buffer is now set separately fromDrawIndexedcall.RenderCommandList::Set[Index|Vertex]Buffersmethods were exnteded with an optional argument which allows to disable setting resource barriers automatically.
ParallelRenderCommandListchanges:- Child render command lists are now committed in parallel.
ImageLoadernow initializes texture names insideLoadfunctions.- Changed
ResourceBasederived classes hierarchy based on template implementation ofResource[DX|MT|VK]<ResourceBaseType>which is replacingResourceNTalias class - Removed almost all
Nativeplatform alias headers - Fixed some memory leaks in Metal implementation on MacOS
- Fixed const correctness for
DeviceandContextreferences passed to core interface factory functions
- Program binding improvements:
Graphics::Apptemplate class implementation was split toGraphics::AppBaseto reduce template code and speedup compilationColortemplate class was rewritten from scratch and now can use both integer and floating point components via underlying HLSL++ vector storageArcBallCameraunit-tests were improved and uncovered some issues in tested class implementation. Issues were fixedSphereMeshgeneration was simplified with matrix-free implementation- Fixed missing debug names of graphics resources (regression of previous refactoring)
- Fixed mip-levels count in depth texture descriptor for DirectX12
- Fixed limited rendering FPS with VSync turned OFF on Nvidia GPUs with latest drivers (Jan 2021)
- Enabled naming of Tracy GPU contexts
- Graphics Core changes:
- User Interface libraries
- Unified
UnitTypederived classes implementation within one template class - Fixed bug in Text mesh generation with multiple zero characters at the end of the string
Textrendering is now callingResetWithStateOnceinstead ofResetWithStateto minimize rendering state resets in sequence of several text blocks
- Unified
- Unit-tests coverage was expanded from 5.7% to 13%:
RawVector,Pointnew template classes were covered with unit-tests.RectandRectSize,VolumeandVolumeSizeexisting template classes were covered with unit-tests.Colortemplate class was covered with unit-tests.UnitTypetemplate class was covered with unit tests.UserInterface::Contextclass unit convertors were covered with unit tests.FakeRenderContextclass was added to UI unit-testing infrastructure.- Replaced deprecated
ParseAndAddCatchTestsCMake function withcatch_discover_teststo fix Catch warnings.
- Global code changes:
- Replaced CML math library with HLSL++ to improve math performance with SIMD instructions (close #78).
- Debug logging was extended for resource barriers synchronization, render and view state parameters and cleaned up: properly used magic_enum, removed manual enum to string conversion functions, fixed logs formatting.
- Properly implemented or enabled default generation of assignment operators, copy and move constructors for all applicable types
- Used MagicEnum library extensively to remove
enumcode bloat and improve type safety withenum classtypes:- Uses
enum classtypes for bit-masks instead of rawenumtypes to improve type safety. - Generating string names of enum values with a single line of code
- Iterating over enum values and getting values count
- Uses
- All modules updated with fixes of static code analysis issues from SonarCloud (closed #73):
- Replaced all explicit exception throws and asserts with
META_CHECK*macroses thro...
- Replaced all explicit exception throws and asserts with
Methane Kit v0.4
This release adds text layout & rendering widget, user Interface basis, integrate Tracy Profiler & add GPU instrumentation, many memory and performance optimizations, Graphics API improvements and bug fixes. It is really BIG!
- Samples and Tutorials:
- Typography tutorial was added to demonstrate new Methane Font rendering & Text layout widget:
- Several text blocks with pangrams in different languages are displayed and long text paragraph from "Hitchickers Guide to the Galaxy" is rendered with calligraphic font.
- Text forward typing or backspace deleting animation (changed with
Dkey) demonstrates incremental text mesh updates (can be switched off withU). Typing speed can be changed with=and-keys. - Displaying of dynamically updated font atlas badges.
- Horizontal and vertical text alignment can be changed with
HandVkeys. - Typography tutorial runtime parameters visualisation and controls for switching parameters are supported.
- Common application primitives added:
- App settings configuration is moved to
Methane/Samples/AppSettings.hppfor all samples and tutorials. MacOS apps now render with VSync ON, while Windows apps with VSync OFF by default. - SRGB gamma correction was implemented in all samples and tutorials in
Apps/Common/Shaders/Primitives.hlsl. As the result this significantly improved rendered image quality in Asteroids sample (closed #58)
- App settings configuration is moved to
- Typography tutorial was added to demonstrate new Methane Font rendering & Text layout widget:
- User Interface libraries were added (closed #5):
- Typography library implements fonts management and text blocks rendering classes (closed #4):
Font::Libraryimplements font loading with FreeType 2 libraryFontclass is managingFont::Charglyph metrics, packing to atlas and rendering toR8Unormtexture:- Font atlas supports dynamic updates with incrementally added characters in runtime.
Textclass implements rendering of text block with a given font and layout settings:- Unicode text support
- Text content size calculation in text layout pass during mesh generation
Text::Layoutsettings supported:Text::Wrapdefines wrapping to new line by characters or by woads or no wrapping.Text::HorizonAlignmentwithLeft,RidhtandCenteroptions.Text::VerticalAlignmentwithTop,BottomandCenteroptions.- Note: layout settings are applicable only when
Textis created or updated with non-zerorectinText::Settings.
- Incremental text mesh updates on appending or erasing trailing characters from string is supported.
Textis managing internal buffer resources on per-frame basis to perform effective text updates without affecting GPU performance and render without artefacts on previously encoded render commands.- All
Textitems reuse single instances ofRenderStateandSamplerobjects for allTextwidget instances viaObject::Registry.
- User Interface Types library added with common UI types:
Unitsenum,UnitPoint,UnitSizeandUnitRectclasses were added inUserInterface/Types.hto handle UI layout positions and sizes in different units (Pixels and Dots) and conversions between them.UserInterface::Contextis a wrapper aroundGraphics::RenderContextand is used for creating all UI items serving both layout and rendering functions.UserInterface::ItemandUserInterface::Containerare base UI classes for all widgets.
- Widgets library implements basic UI visualisations and controls
Panelwidget implements container visualised as semi-opaque rectangle usingGraphics::ScreenQuadBadgewidget was moved fromGraphics/Extensionsand implements item displaying a texture aligned to screen corner.HeadsUpDisplaywidget implements visualisation of common graphics application performance parameters like FPS, frame time, resolution, frame buffers count, GPU adapter name, etc. (closed #54)
- User Interface App implementation was split from Graphics App:
- Integrates
HeadsUpDisplaywidget, which can be turned ON byF4hot-key. - HUD and Logo Badge rendering was moved to
UserInterface::App - Controls and command-line help as well as application runtime parameters are now rendered in Text block panels instead of message box alerts.
- Base UI App implementation was split to
UserInterface/AppBase.h/cppfrom template classUserInterface/App.hppto reduce build overhead.
- Integrates
- Typography library implements fonts management and text blocks rendering classes (closed #4):
- Graphics libraries has changed:
- Graphics Core API changes:
Contextchanges:Context::RequestDeferredActionmethod was added to requestDeferredAction::UploadResourcesorDeferredAction::CompleteInitializationto be performed when previous frame rendering has completed but next frame rendering was not started yet.Context::GetParallelExecutorprovides Taskflow Executor for all parallel execution in the application.Context::GetObjectsRegistryreturns instance ofObject::Registrywhich allows to register named Graphics Objects created in scope of current context and request them by name. This allows to reuse single instance of graphics object (likeRenderState) for rendering of multiple widgets.
CommandQueuechanges:- Accurate execution state tracking of command lists was implemented using command queue managed thread waiting for GPU execution completion using
Fenceobject.CommandQueue::Executereceives optional argument with lambda callback function called when command list set execution is completed on GPU. CommandQueueDXincapsulatesTimestampQueryBufferinstance, which is used internally to query timestamps of command lists execution which are then exposed withTracy::GpuScopeand can be viewed in Tracy Profiler.- Different command queue types are supported but not used yet (will be used in future for DirectX copy and compute queues)
- Accurate execution state tracking of command lists was implemented using command queue managed thread waiting for GPU execution completion using
CommandListchanges:CommandList::DebugGroupinterface was added to represent named debug group data and effectively reuse its memory in runtime between frames. CMake build optionMETHANE_COMMAND_DEBUG_GROUPS_ENABLEDwas added to disable command list debug groups.CommandList::Stateenum (Pending, Encoding, Committed, Executing) was added and returned withCommandList::GetStateCommandList::WaitUntilCompletedmethod was addedCommandList::GetGpuTimeRangemethod was added which can be called on command list in Pending state. DirectX 12 method implementation has to be enabled with optionMETHANE_GPU_INSTRUMENTATION_ENABLED, butMacOSimplementation works right away.- Metal implementations of
RenderCommandListMTandBlitCommandListMTwas refactored, duplicated code was moved to the base implementation template classCommandListMT.
RenderStatechanges:ViewStatewas split fromRenderStateto manage setup of viewports and scissors rects separately from main rendering state.RenderStategroups are now compared withmemcmpwhich is slightly improving performance in some cases.
RenderCommandListchanges:RenderCommandList::SetViewStatemethod was added.RenderCommandList::SetValidationEnabledmethod was added to disable validation of command list command arguments before encoding to GPU command buffers and increase performance.ParallelRenderCommandListadds the same command to update per-thread command lists option.
Resourcechanges:Resource::SubResource::CountandResource::SubResource::Indexstructures were addedResource::SubResourceis derived fromData::Chunkand extends withIndexand optionalBytesRangeResource::GetDatamethod was added returningSubResourceat givenIndexand optionalBytesRange, it can be used only for resources withUsage::Readbackflag.Resource::GetDataSizemethod was extended with optionalData::MemoryStateargument (Initialized, Reserved values)Resource::GetSubResourceDataSizeandResource::GetSubResourceDataSizemethods added
by reusing allocated memory between frames.Resource::ReleasePoolwas removed and replaced with retaining shared pointers to resources inCommandListBase::CommandStatekept until execution is completed on GPU. This became possible with accurate execution state tracking of command lists done inCommandQueuewaiting thread.
Bufferchanges:Buffer::StorageModeenum is made a part of buffer settings:Managed- CPU-GPU buffer with automatic data synchronization managed by graphics runtime. Used for volatile buffers.Private- GPU buffer asynchronously uploaded through the intermediate shared CPU-GPU buffer. User by default for vertex, index and constant buffers.
Texturechanges:- All textures are now stored on GPU as private resources and asynchronously updated using upload command list through the CPU-GPU shared resource. All is done inside
Texture::SetDatamethod implementation and hidden from API user. - Added single-component texture types support like
R8Unormand others.
- All textures are now stored on GPU as private resources and asynchronously updated using upload command list through the CPU-GPU shared resource. All is done inside
RenderPasschanges:- Render attachment textures are hold using shared pointers, instead of weak pointers.
...
- Render attachment textures are hold using shared pointers, instead of weak pointers.
- Graphics Core API changes:
Methane Kit v0.3
This release brings Graphics Core API optimizations and refactoring, improved shaders toolchain with HLSL6 & DXC:
- Samples and Tutorials updates:
- Command line options added to Asteroids sample to modify simulation parameters.
- Tuned default mesh LODs distribution in Asteroids sample to reduce GPU overhead.
- Fixed visual shadow offset in ShadowCube tutorial.
- Rewritten render state settings initialization in a new self-descriptive way.
- Shaders are now written in HLSL 6 and compiled with new DXC compiler on all platforms (HLSL 5.1 via FXC was used before).
- Graphics Core API improvements and optimizations:
- Replaced smart pointers syntax from
Class::PtrtoPtr<Class>with template usings also applied toPtrs, WeakPtr, WeakPtrs, UniquePtr, UniquePtrs, Ref, Refsdefined in Memory.hpp. - Program Binding improvements and performance optimizations:
- Moved
ProgramBindingsinterface fromProgram::ResourceBindingsandProgramBindings::ArgumentBindingfromShader::ResourceBinding. Corresponding API-specific implementations were also split fromProgramandShaderimplementations. ProgramBindings::ArgumentBinding::Settingsstructure with correspondingGetSettings()method were added, replacing a bunch of virtual getters.- Moved
ProgramBindings::ArgumentBinding::ModifierstoProgram::Argument::Modifiersand addedProgram::ArgumentDescstructure representing argument with modifiers describing constant and addressable program arguments. - Moved
CL::SetProramBindings(...)fromRenderCommandListto baseCommandListinterface for future use in compute pipelines. - Optimized performance of
CommandList::SetProramBindings(...)in DirectX implementation on Windows.
- Moved
- Program improvements:
Program::InputBufferLayoutconfiguration is simplified by removing of argument names and using semantic names only.- Self-descriptive
Programinitialization with explicit argument modifiers specification implemented withinProgram::Settings.
- Command List improvements:
BlitCommandListinterface was added to provide BLIT operations on GPU memory and is used forUploadCommandListinContext. Public interface is currently empty, but it will be extended in near future. API-specific implementations are used internally (for texture mips generation with Metal).- Optimized
ParallelRenderCommandList::Resetby resetting per-thread command lists in parallel for DirectX 12 on Windows only. - Removed complex command list execution state tracking code from
CommandListBase, which was previously used from frames synchronization and became useless now. - Moved present command encoding from
RenderCommandList::CommittoRenderContext::Presentin Metal API implementation on MacOS.
- Render Context improvements:
Contextbase interface was split fromRenderContextinterface along with splitting implementation classes. This is a preparation step for addingComputeContextin future.Fencepublic interface was added with implementations for DirectX and Metal.RenderContextBaseimplementation now uses fences as common frames synchronization mechanism between CPU & GPU on all platforms and APIs in platform independent way (replacesdispatch_context_mutexapproach on MacOS).
- Virtual inheritance of API-specific implementation classes from base-implementation classes was eliminated by using template classes like
ContextDX<ContextBaseT>andCommandListDX<CommandListBaseT>. - Code cleanup: all member fields of base implementation classes are made
privatewith access through class methods only; many typos and naming convention issues were fixed.
- Replaced smart pointers syntax from
- Platform, Data and Common module updates:
- Graphics::App updates:
- Added
Graphics::AppControllerandGraphics::IAppabstract interface withSettings, which allows to modify individual settings of graphics app from controller. - Restructured
Graphics::App::AllSettingsto incapsulateGraphics::IApp::Settings,Platform::App::SettingsandRenderContext::Settings. - Added CLI option and
CTRL+Zshortcut to disable all animations in application. Implemented smooth pause of animations. - Added
CTRL+Hshortcut to show/hide HUD in window title. - Added
F2shortcut to show command-line help.
- Added
Mesh.hwas split into separate headers with template implementations of specific mesh generators:QuadMesh,CubeMesh,SphereMesh,IcosahedronMeshandUberMesh.- Extended ITT instrumentation with Markers for user input events, like key presses and mouse events processed through
Platform/Input/ControllersPool.cpp. - Methane build version is added to the bottom of application help.
- Graphics::App updates:
- External libraries:
- Command line parsing library is replaced with
CLI11to simplify command line parsing code and remove dirty workarounds required by previously usedCxxOptslibrary. - Intel ITT instrumentation library is now used from new official repository
IttApiinstead of oldSEAPIrepository fork. - Updated
DirectXTex,DirectXLibraries,STB,CMRCandCatch2external libraries to their latest versions. - Added
DirectXCompilerwith pre-built binaries of command line tools and libraries for Windows and MacOS. - Added RPavlik's
CMakeModules.
- Command line parsing library is replaced with
- Build Infrastructure:
- Improved shader toolchain by using DirectXShaderCompiler (DXC), replacing FXC compiler on Windows and GLSLang on MacOS, which allows to use HLSL 6 (closed #6).
- It is not required to start CMake generation from
Visual Studio Tools Command Prompton Windows anymore (removed dependency on VS environment). Removed it from Azure yaml build scripts and from ReadMe. WindowsSDK is found automatically using RPavlik'sFindWindowsSDK.cmake. - MacOS builder switched from 10.13 to 10.14 due to deprecation notice from Azure Pipelines.
