P4 to Git Change 1399165 by cpaquot@cpaquot-rcf-lnx on 2017/04/17 17:11:18
SWDEV-118110 - Need to propagate host mem value in createView
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#16 edit
[ROCm/clr commit: 892a217093]
This commit is contained in:
@@ -972,6 +972,15 @@ bool Image::createView(const Memory& parent) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Explicitly set the host memory location,
|
||||
// because the parent location could change after reallocation
|
||||
if (nullptr != parent.owner()->getHostMem()) {
|
||||
owner()->setHostMem(reinterpret_cast<char*>(parent.owner()->getHostMem()) + owner()->getOrigin());
|
||||
}
|
||||
else {
|
||||
owner()->setHostMem(nullptr);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user