SWDEV-245531 - GLInterop: Add Buffer Interop support
Change-Id: I38326173475e84f8eca2605522542ef89a3cf524
Dieser Commit ist enthalten in:
@@ -301,6 +301,11 @@ bool Memory::create(void* initFrom, bool sysMemAlloc, bool skipAlloc, bool force
|
||||
LogPrintfError("Can't allocate memory size - 0x%08X bytes!", getSize());
|
||||
return false;
|
||||
}
|
||||
if (isInterop()) {
|
||||
// Interop resources dont' have svm allocations, we use device address for mapping.
|
||||
amd::MemObjMap::AddMemObj(
|
||||
reinterpret_cast<void*>(static_cast<uintptr_t>(mem->virtualAddress())), this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,6 +415,10 @@ Memory::~Memory() {
|
||||
if (NULL != deviceMemories_) {
|
||||
// Destroy all device memory objects
|
||||
for (uint i = 0; i < numDevices_; ++i) {
|
||||
if (isInterop() && deviceMemories_[i].value_ != nullptr) {
|
||||
amd::MemObjMap::RemoveMemObj(reinterpret_cast<void*>(
|
||||
static_cast<uintptr_t>(deviceMemories_[i].value_->virtualAddress())));
|
||||
}
|
||||
delete deviceMemories_[i].value_;
|
||||
}
|
||||
}
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren