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_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 (underUNIFORMS_BUFFER_ENABLED
define) 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.
TextureLabeler
helper class was added to libraryMethaneAppsCommon
with 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
Asteroids
sample can be changed now with new single-key shortcuts:0 .. 9
- Data libraries:
- Add initial thread-safety to
Events
library inEmitter
andReceiver
classes. - 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::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
andInput::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 withoutVulkan 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.
- Vulkan API is used via
RenderPattern
class was added to represent render pass attachments configuration without binding to particular resources (wrapper ofvk::Renderpass
).RenderPass
was updated accordingly to get configuration fromRenderPattern
and bind attachment resources.RenderPattern
instance was added toRenderState
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 itsDevices
to enable correct Vulkan destruction order.ResourceState
enumeration was simplified: stateVertexAndConstantBuffer
was split toVertexBuffer
andConstantBuffer
states; statesNonPixelShaderResource
andPixelShaderResource
were 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. ResourceLocation
interface 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
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
andTimestampQuery
objects inCommandListBase
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 viaTracyD3D12.hpp
header under macro definitionMETHANE_GPU_INSTRUMENTATION_ENABLED == 2
inCommandListDX.hpp
(value1
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 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
CommandQueueTrackingBase
with 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::Resize
method arguments were changed to useFrameSize
andFloatSize
structures, which simplify its calls from theApp::Resize
method.Graphics/Mesh
module was split fromGraphics/Primitives
.SkyBox
extension is now usingCubeMesh
instead ofSphereMesh
for sky rendering.
- Graphics Core library changes:
- 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
andRectSize
values was added inDataTypes
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 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.
- All externally dependent repositories are downloaded to CPM cache directory during CMake configuration stage, to
- New
README.md
description of the external dependencies was added inExternals
directory. - Library updates:
Vulkan-Headers
was updated to v1.3.219SPIRV-Cross
was added v1.3.216.0DirectXCompiler
was updated to v1.6.2104 to support SPIRV generation on Windows and new binaries for LinuxDirectXTex
was updated to v1.9.6Catch2
updated to v3.1.0CLI11
updated to v2.2.0CMRC
updated to 2021-08-27FMT
updated to v8.1.1FreeType2
updated to v2.12.1HLSLpp
updated to v3.2+ with integer division fixesIttApi
updated to v3.23.0MagicEnum
was updated to v0.8.0TaskFlow
was updated to v3.4.0STB
updated to 2021-09-10Tracy
updated to v0.8.2.1CMakeModules
updated with support for auto-detecting new Windows SDK versions, including Win11 2110 SDK (closed #87)
- External dependencies management via Git submodules was replaced with CPM.cmake package manager. No submodules anymore - it greatly simplifies external library updates!
- 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 toCMake/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 functionsget_native_graphics_apis
andget_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 targetMethaneKit
. - 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 andadd_methane_shaders_library
to add compiled shaders to application resources (seeCMake/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.
- Root
- 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
andBuild/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
toBuild/README.md
.