You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, each USAGE_DYNAMIC buffer internally keeps dynamic allocations for each device context. This is inefficient from multiple points of view:
Allocations may never be needed if the buffer is not mapped
Allocations are only temporary and only needed for the time while buffer is mapped, yet they are allocated permanently
Allocations are aligned up to the cache line size, which further increases memory consumption
The last point also creates UB sanitizer errors such as this one:
git/DiligentEngine/DiligentCore/Common/interface/STDAllocator.hpp:148:19: runtime error: constructor call on misaligned address 0x000173672da0 for type 'Diligent::BufferVkImpl::CtxDynamicData', which requires 64 byte alignment
0x000173672da0: note: pointer points here
00 00 00 00 be be be be be be be be be be be be be be be be be be be be be be be be be be be be
The solution is to keep dynamic allocations in the context directly.
This requires using fast hash map as with std::unordered_map, the performance is unacceptable
The text was updated successfully, but these errors were encountered:
At the moment, each USAGE_DYNAMIC buffer internally keeps dynamic allocations for each device context. This is inefficient from multiple points of view:
The last point also creates UB sanitizer errors such as this one:
The solution is to keep dynamic allocations in the context directly.
This requires using fast hash map as with
std::unordered_map
, the performance is unacceptableThe text was updated successfully, but these errors were encountered: