SWDEV-471863 - APU: device allocation greater than invisible memory

Change-Id: I37f1769873ac7dcbb3cfa51fd815ee1e2123aeae
This commit is contained in:
Ajay
2024-07-31 14:22:31 -07:00
committed by Ajay GunaShekar
parent 39bbc0341d
commit ec0971dd08
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -120,6 +120,11 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params
// if requested memory is greater than available then exit the loop
dev().globalFreeMemory(freeMemory);
const Pal::GpuMemoryHeapProperties invisibleHeap = dev().GetGpuHeapInvisible();
if (dev().settings().apuSystem_ && (size() > (invisibleHeap.logicalSize * 2))) {
memType = RemoteUSWC;
break;
}
// Local to Persistent
if (memoryType() == Local) {
// For dgpu freeMemory[0] reports a sum of visible+invisible fb