SWDEV-508632 - Align address to 2 MBs for hidden heap allocation. (#29)

This commit is contained in:
Patel, Jaydeepkumar
2025-04-02 04:03:29 -07:00
committed by GitHub
parent 98f1db181c
commit b5c9cbc236
10 changed files with 33 additions and 24 deletions
+3 -1
View File
@@ -1323,7 +1323,9 @@ bool Resource::create(MemoryType memType, CreateParams* params, bool forceLinear
Pal::GpuMemoryCreateInfo createInfo = {};
createInfo.size = desc().width_ * elementSize_;
createInfo.size = amd::alignUp(createInfo.size, MaxGpuAlignment);
createInfo.alignment = desc().scratch_ ? 64 * Ki : MaxGpuAlignment;
createInfo.alignment = (params && params->alignment_ != 0)
? params->alignment_
: (desc().scratch_ ? 64 * Ki : MaxGpuAlignment);
createInfo.vaRange = Pal::VaRange::Default;
createInfo.priority = Pal::GpuMemPriority::Normal;