Methane Kit v0.3
egorodet
released this
03 Mar 20:41
·
2120 commits
to master
since this release
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
toPtr<Class>
with template usings also applied toPtrs, WeakPtr, WeakPtrs, UniquePtr, UniquePtrs, Ref, Refs
defined in Memory.hpp. - Program Binding improvements and performance optimizations:
- Moved
ProgramBindings
interface fromProgram::ResourceBindings
andProgramBindings::ArgumentBinding
fromShader::ResourceBinding
. Corresponding API-specific implementations were also split fromProgram
andShader
implementations. ProgramBindings::ArgumentBinding::Settings
structure with correspondingGetSettings()
method were added, replacing a bunch of virtual getters.- Moved
ProgramBindings::ArgumentBinding::Modifiers
toProgram::Argument::Modifiers
and addedProgram::ArgumentDesc
structure representing argument with modifiers describing constant and addressable program arguments. - Moved
CL::SetProramBindings(...)
fromRenderCommandList
to baseCommandList
interface for future use in compute pipelines. - Optimized performance of
CommandList::SetProramBindings(...)
in DirectX implementation on Windows.
- Moved
- 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 withinProgram::Settings
.
- Command List improvements:
BlitCommandList
interface was added to provide BLIT operations on GPU memory and is used forUploadCommandList
inContext
. 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
toRenderContext::Present
in Metal API implementation on MacOS.
- Render Context improvements:
Context
base interface was split fromRenderContext
interface along with splitting implementation classes. This is a preparation step for addingComputeContext
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 (replacesdispatch_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>
andCommandListDX<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.
- Replaced smart pointers syntax from
- Platform, Data and Common module updates:
- Graphics::App updates:
- Added
Graphics::AppController
andGraphics::IApp
abstract interface withSettings
, which allows to modify individual settings of graphics app from controller. - Restructured
Graphics::App::AllSettings
to incapsulateGraphics::IApp::Settings
,Platform::App::Settings
andRenderContext::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.
- Added
Mesh.h
was split into separate headers with template implementations of specific mesh generators:QuadMesh
,CubeMesh
,SphereMesh
,IcosahedronMesh
andUberMesh
.- 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
CLI11
to simplify command line parsing code and remove dirty workarounds required by previously usedCxxOpts
library. - Intel ITT instrumentation library is now used from new official repository
IttApi
instead of oldSEAPI
repository fork. - Updated
DirectXTex
,DirectXLibraries
,STB
,CMRC
andCatch2
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
.
- 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 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'sFindWindowsSDK.cmake
. - MacOS builder switched from 10.13 to 10.14 due to deprecation notice from Azure Pipelines.