Skip to content

Methane Kit v0.3

Compare
Choose a tag to compare
@egorodet egorodet released this 03 Mar 20:41
· 2120 commits to master since this release
a680524

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::Ptr to Ptr<Class> with template usings also applied to Ptrs, WeakPtr, WeakPtrs, UniquePtr, UniquePtrs, Ref, Refs defined in Memory.hpp.
    • Program Binding improvements and performance optimizations:
      • Moved ProgramBindings interface from Program::ResourceBindings and ProgramBindings::ArgumentBinding from Shader::ResourceBinding. Corresponding API-specific implementations were also split from Program and Shader implementations.
      • ProgramBindings::ArgumentBinding::Settings structure with corresponding GetSettings() method were added, replacing a bunch of virtual getters.
      • Moved ProgramBindings::ArgumentBinding::Modifiers to Program::Argument::Modifiers and added Program::ArgumentDesc structure representing argument with modifiers describing constant and addressable program arguments.
      • Moved CL::SetProramBindings(...) from RenderCommandList to base CommandList interface for future use in compute pipelines.
      • Optimized performance of CommandList::SetProramBindings(...) in DirectX implementation on Windows.
    • Program improvements:
      • Program::InputBufferLayout configuration is simplified by removing of argument names and using semantic names only.
      • Self-descriptive Program initialization with explicit argument modifiers specification implemented within Program::Settings.
    • Command List improvements:
      • BlitCommandList interface was added to provide BLIT operations on GPU memory and is used for UploadCommandList in Context. 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::Reset by 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::Commit to RenderContext::Present in Metal API implementation on MacOS.
    • Render Context improvements:
      • Context base interface was split from RenderContext interface along with splitting implementation classes. This is a preparation step for adding ComputeContext in future.
      • Fence public interface was added with implementations for DirectX and Metal.
      • RenderContextBase implementation now uses fences as common frames synchronization mechanism between CPU & GPU on all platforms and APIs in platform independent way (replaces dispatch_context_mutex approach on MacOS).
    • Virtual inheritance of API-specific implementation classes from base-implementation classes was eliminated by using template classes like ContextDX<ContextBaseT> and CommandListDX<CommandListBaseT>.
    • Code cleanup: all member fields of base implementation classes are made private with access through class methods only; many typos and naming convention issues were fixed.
  • Platform, Data and Common module updates:
    • Graphics::App updates:
      • Added Graphics::AppController and Graphics::IApp abstract interface with Settings, which allows to modify individual settings of graphics app from controller.
      • Restructured Graphics::App::AllSettings to incapsulate Graphics::IApp::Settings, Platform::App::Settings and RenderContext::Settings.
      • Added CLI option and CTRL+Z shortcut to disable all animations in application. Implemented smooth pause of animations.
      • Added CTRL+H shortcut to show/hide HUD in window title.
      • Added F2 shortcut to show command-line help.
    • Mesh.h was split into separate headers with template implementations of specific mesh generators: QuadMesh, CubeMesh, SphereMesh, IcosahedronMesh and UberMesh.
    • 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.
  • External libraries:
    • Command line parsing library is replaced with CLI11 to simplify command line parsing code and remove dirty workarounds required by previously used CxxOpts library.
    • Intel ITT instrumentation library is now used from new official repository IttApi instead of old SEAPI repository fork.
    • Updated DirectXTex, DirectXLibraries, STB, CMRC and Catch2 external libraries to their latest versions.
    • Added DirectXCompiler with pre-built binaries of command line tools and libraries for Windows and MacOS.
    • Added RPavlik's CMakeModules.
  • 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 Prompt on Windows anymore (removed dependency on VS environment). Removed it from Azure yaml build scripts and from ReadMe. WindowsSDK is found automatically using RPavlik's FindWindowsSDK.cmake.
    • MacOS builder switched from 10.13 to 10.14 due to deprecation notice from Azure Pipelines.