-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Methane Kit v0.7.1: refactor Graphics RHI and add RHI PIMPL classes with final implementation inlining #114
Conversation
…for rendering synchronization with resize events
Use X11 STRUCTURE_NOTIFY instead of RESIZE_REDIRECT event to get it on window resizing COMPLETED and skip rendering until next Resize event after vk::OutOfDateKHRError error on Present.
Codecov ReportBase: 33.34% // Head: 29.97% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #114 +/- ##
==========================================
- Coverage 33.34% 29.97% -3.37%
==========================================
Files 269 391 +122
Lines 18490 23298 +4808
Branches 1373 1972 +599
==========================================
+ Hits 6164 6981 +817
- Misses 12188 16176 +3988
- Partials 138 141 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
Graphics libraries
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_ENABLED
enables 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 Core
module was renamed toGraphics RHI
(RHI is a common acronym for Rendering Hardware Interface) and split into several CMake modulesInterface
,Base
,DirectX
,Vulkan
,Metal
andImpl
- this makes architecture even more modular and extensible.I
prefix in file and struct names and put underMethane::Graphics::Rhi
namespace, for exampleGraphics::Device
->Graphics::Rhi::IDevice
.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.Create
static factory functions ofITexture
andIBuffer
interfaces using custom setting initialisers.CreateX
virtual methods in RHI interfaces and use them in implementation ofX::Create
static factory functions.BLITCommandList
was renamed toTransferCommandList
.QueryBuffer
was renamed toQueryPool
.std::string
withstd::string_view
inIObject::SetName
andGetName
methods.Buffer
andTexture
classes for Vulkan and DirectX APIs by replacing template class variants with common class implementation.ImageLoader
,ScreenQuad
andSkyBox
to use RHI PIMPL classes instead abstract interfaces and implemented themself in PIMPL style.Primitives
modules were moved insideRHI
submodules:Windows/DirectXErrorHandling.h
toRHI/DirectX
module and renamed toErrorHandling.h
.FpsCounter.h
and split to interface and implementation toRHI/Interfaces
andRHI/Base
modules.User Interface
Font
,Text
andBadge
classes to RHI PIMPL classes instead of abstract interfaces and implemented themself in PIMPL style.Platform libraries
ErrorOutOfDateKHR
after resizing swap-chain on Linux with NVidia proprietary drivers (close Vulkan Present fails with ErrorOutOfDateKHR after resizing swapchain on Linux with NVidia proprietary drivers #105)Platform/Input
module was split into to submodules:Keyboard
,Mouse
,Controllers
andActionControllers
. All classes from this modules were moved underPlatform::Input
namespace.Data libraries
Data::EnumMask<EnumType>
template class implementing bit-mask operations on enum values used as bits.EnumMask
type is used in Methane Kit public interfaces instead ofmagic_enum::bitwise_operators
.Data::Transmitter<ICallbackType>
class which implementsData::IEmitter
by transmitting callback connections to some other emitter instance.External libraries
d3dx12.h
in DirectX RHI.Tutorials applications
Tests
Data/EnumMask.hpp
.Data/EnumMaskUtils.hpp
.Data/Transmitter.hpp
Builds
sonarcloud-github-c-cpp
to install scanner binaries.build-wrapper
tool is not used anymore, it was replaced with Ninja compilation data base generated by CMake.Documentation