SWDEV-528860 - reserve some memory in visible frame buffer (#251)

[ROCm/clr commit: faac50c77a]
This commit is contained in:
Xie, AlexBin
2025-05-09 20:08:23 -04:00
committed by GitHub
parent 3decd4f975
commit 142e347aac
3 changed files with 21 additions and 4 deletions
+1 -2
View File
@@ -116,9 +116,8 @@ bool Memory::create(Resource::MemoryType memType, Resource::CreateParams* params
}
if (amd::IS_HIP && dev().settings().apuSystem_) {
const Pal::GpuMemoryHeapProperties& invisibleHeap = dev().GetGpuHeapInvisible();
Pal::gpusize totalAlloc = dev().TotalAlloc();
if (memType == Local && (totalAlloc > invisibleHeap.logicalSize)) {
if (memType == Local && totalAlloc > dev().GetMaxFrameBuffer()) {
memType = RemoteUSWC;
}
}