Revert "SWDEV-492049 - Remove the handle of Phy Mem from Memobj" (#72)
This reverts commit 231b2410a0.
Tá an tiomantas seo le fáil i:
tiomanta ag
GitHub
tuismitheoir
28967982b2
tiomantas
2259a8c01c
@@ -2328,10 +2328,6 @@ class GraphMemAllocNode final : public GraphNode {
|
||||
memory_ = getMemoryObject(dptr, offset);
|
||||
// Retain memory object because command release will release it
|
||||
memory_->retain();
|
||||
|
||||
// Remove because the entry is not needed in MemObjMap after the memory_ has been saved.
|
||||
// The Phy mem obj will be saved in virtual memory object during VirtualMapCommand::submit.
|
||||
amd::MemObjMap::RemoveMemObj(dptr);
|
||||
size_ = aligned_size;
|
||||
// Execute the original mapping command
|
||||
VirtualMapCommand::submit(device);
|
||||
|
||||
@@ -226,8 +226,6 @@ void* MemoryPool::AllocateMemory(size_t size, Stream* stream, void* dptr) {
|
||||
}
|
||||
} else {
|
||||
dev_ptr = memory->getSvmPtr();
|
||||
if (!amd::MemObjMap::FindMemObj(dev_ptr))
|
||||
amd::MemObjMap::AddMemObj(dev_ptr, memory);
|
||||
}
|
||||
// Place the allocated memory into the busy heap
|
||||
ts.AddSafeStream(stream);
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir