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
orang tua 39bbc0341d
melakukan ec0971dd08
2 mengubah file dengan 9 tambahan dan 0 penghapusan
+4
Melihat File
@@ -670,6 +670,10 @@ class Device : public NullDevice {
//! Allocates hidden heap for device memory allocations
void HiddenHeapAlloc(const VirtualGPU& gpu);
const Pal::GpuMemoryHeapProperties& GetGpuHeapInvisible() const {
return heaps_[Pal::GpuHeapInvisible];
}
private:
static void PAL_STDCALL PalDeveloperCallback(void* pPrivateData, const Pal::uint32 deviceIndex,
Pal::Developer::CallbackType type, void* pCbData);
+5
Melihat 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