Version 0.5: HLSL++ Math, Graphics API Optimizations, Automated Static Code Analysis, Tests Code Coverage, Code Improvements and Refactoring #85
egorodet
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Methane/Exceptions.hpp
was added with common exception type defintionsMethane/Checks.hpp
was added with error checking macro definitions akaMETA_CHECK*
META_LOG
macros has been updated to make string formatting using FMT library inside of the macro using variadic argumentsRawVector
template class was added as a replacement ofcml::vector
for dense-packed components storage used in vertex attributes.Point
template class now use underlying HLSL++ vector and unifies 2D and 3D implementations.Rect
andRectSize
,Volume
andVolumeSize
classes were refactored. Made class fields private, available through accessors.Constants
template class was added with math constants.AppBase
class, moved from platform specific classesProgram::Argument
andProgram::ArgumentAccessor
(previouslyProgram::ArgumentDesc
) were refactored from struct to class style with field accesor functions.Program::Argument::Modifiers
bit-mask was replaced withProgram::ArgumentAccessor::Type
enum.Program::ArgumentAccessor::Type::FrameConstant
to reduce number of excessive argument binding setup calls. Frame-constant bindings are properly supported by DX descriptor table layout.ProgramBindings::Create
function as an optional argument to support frame-constant bindings.ProgramBindingsDX
.COPY
comamnd queue is now used by default forBlitCommandList
execution in DirectX (instead ofDIRECT
command queue used before). So the resources upload is also done with a COPY queue in DX now. It can be switched back to usingDIRECT
queue withRenderContext::Settings::options_mask
bit-mask flagContext::Options::BlitWithDirectQueueOnWindows
.Resource::SetData
method 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::SetData
method implementations to theSetProgramBindings
,SetVertexBuffer
andSetIndexBuffer
calls, while setup resource barriers are still cached insideResource
object.Resource::State
andResource::Barriers
types were moved to the public header files and split fromResource
interface definition.CommandKit
interface was added to Graphics Core to provide unified access fromContext::GetDefaultCommandKit
to 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::GetUploadCommandListSet
andRenderContext::GetRenderCommandQueue
withContext::GetDefaultCommandKit
.CommandList
changes:CommandList::SetResourceBarriers(...)
call was added to the public interface (was private before).RenderCommandList
changes:RenderCommandList::ResetWithStateOnce
method was added additionally toResetWithState
to skip command list reset when it is already inEncoding
state with the sameRenderState
already applied.RenderCommandList::SetIndexBuffers
method was adedd, index buffer is now set separately fromDrawIndexed
call.RenderCommandList::Set[Index|Vertex]Buffers
methods were exnteded with an optional argument which allows to disable setting resource barriers automatically.ParallelRenderCommandList
changes:ImageLoader
now initializes texture names insideLoad
functions.ResourceBase
derived classes hierarchy based on template implementation ofResource[DX|MT|VK]<ResourceBaseType>
which is replacingResourceNT
alias classNative
platform alias headersDevice
andContext
references passed to core interface factory functionsGraphics::App
template class implementation was split toGraphics::AppBase
to reduce template code and speedup compilationColor
template class was rewritten from scratch and now can use both integer and floating point components via underlying HLSL++ vector storageArcBallCamera
unit-tests were improved and uncovered some issues in tested class implementation. Issues were fixedSphereMesh
generation was simplified with matrix-free implementationUnitType
derived classes implementation within one template classText
rendering is now callingResetWithStateOnce
instead ofResetWithState
to minimize rendering state resets in sequence of several text blocksRawVector
,Point
new template classes were covered with unit-tests.Rect
andRectSize
,Volume
andVolumeSize
existing template classes were covered with unit-tests.Color
template class was covered with unit-tests.UnitType
template class was covered with unit tests.UserInterface::Context
class unit convertors were covered with unit tests.FakeRenderContext
class was added to UI unit-testing infrastructure.ParseAndAddCatchTests
CMake function withcatch_discover_tests
to fix Catch warnings.enum
code bloat and improve type safety withenum class
types:enum class
types for bit-masks instead of rawenum
types to improve type safety.META_CHECK*
macroses throwing specific exception types, which simplified error checking code and fixed many issues related to non-specific exception throws across Methane code basedefault
branches of allswitch
blocks to fix repeated analysis issuestd::function
usage with template arguments wherever possible to improve performancefmt::format(...)
for string formatting wherever possible project widemagic_enum
library to replace rawenum
types of bit-masks toenum class
types, use enum names and counts generated in compile time.std::map::try_emplace
instead ofstd::map::emplace
std::byte
instead ofuint8_t
andchar
for byte-access to memory buffersfor
loops over elements ofstd::map
[[nodiscard]]
attribute for constant methods like gettersstd::string_view
in some cases for input string argumentsif
andswitch
statementsscoped_lock
instead oflock_guard
OpenCppCoverage
tool, on MacOS withllvm-profdata
and on Linux withGcov
(closed Setup code coverage results collection with Azure Pipelines and Sonar Cloud #72)This discussion was created from the release Version 0.5: HLSL++ Math, Graphics API Optimizations, Automated Static Code Analysis, Tests Code Coverage, Code Improvements and Refactoring.
Beta Was this translation helpful? Give feedback.
All reactions