Add dynamic allocation alignment to be able to load T6 MemoryBlock asset which isnt used at all so why am i doing this again

This commit is contained in:
Jan
2021-03-05 09:23:37 +01:00
parent 286eaadd1c
commit 88c48e8107
12 changed files with 91 additions and 11 deletions

View File

@ -554,7 +554,14 @@ class ZoneLoadTemplate::Internal final : BaseTemplate
// (Alignment specified via `__declspec(align())` showing as correct via intellisense but is incorrect when compiled for types that have a larger alignment than the specified value)
// this was changed to make ZoneCodeGenerator calculate what is supposed to be used as alignment when allocating.
// This is more reliable when being used with different compilers and the value used can be seen in the source code directly
LINE(MakeMemberAccess(info, member, modifier)<<" = m_stream->Alloc<"<<typeDecl<<followingReferences<<">("<<modifier.GetAlignment()<<");")
if (member->m_alloc_alignment)
{
LINE(MakeMemberAccess(info, member, modifier)<<" = m_stream->Alloc<"<<typeDecl<<followingReferences<<">("<<MakeEvaluation(member->m_alloc_alignment.get())<<");")
}
else
{
LINE(MakeMemberAccess(info, member, modifier)<<" = m_stream->Alloc<"<<typeDecl<<followingReferences<<">("<<modifier.GetAlignment()<<");")
}
if (computations.IsInTempBlock())
{