SWDEV-294514 - Limit HIP-GL interop logic to HIP
Below logic is causing a crash in the CL-GL interop. As a workaround, limit it only to HIP. Change-Id: I12e81d035ebd80a4a9a09eb6eea2fae7040d90c9
This commit is contained in:
committed by
Maneesh Gupta
parent
c144383971
commit
74ccf71d53
@@ -301,7 +301,7 @@ 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()) {
|
||||
if (amd::IS_HIP && 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);
|
||||
@@ -415,7 +415,7 @@ Memory::~Memory() {
|
||||
if (NULL != deviceMemories_) {
|
||||
// Destroy all device memory objects
|
||||
for (uint i = 0; i < numDevices_; ++i) {
|
||||
if (isInterop() && deviceMemories_[i].value_ != nullptr) {
|
||||
if (amd::IS_HIP && isInterop() && deviceMemories_[i].value_ != nullptr) {
|
||||
amd::MemObjMap::RemoveMemObj(reinterpret_cast<void*>(
|
||||
static_cast<uintptr_t>(deviceMemories_[i].value_->virtualAddress())));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user