From 6cc7cd6345c4ecbae68daed064f76ca6adfb79ee Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 15 Dec 2016 14:54:31 -0500 Subject: [PATCH] P4 to Git Change 1353702 by cpaquot@hog-ocl on 2016/12/15 14:43:42 SWDEV-108384 - Revert back CL 1352747 ReviewBoardURL = http://ocltc.amd.com/reviews/r/12030/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#26 edit [ROCm/clr commit: fb0e417372fb55b8761f960f7d996d90359d36b8] --- .../clr/rocclr/runtime/device/rocm/rocvirtual.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/projects/clr/rocclr/runtime/device/rocm/rocvirtual.cpp b/projects/clr/rocclr/runtime/device/rocm/rocvirtual.cpp index ca104d59f6..06735ca902 100644 --- a/projects/clr/rocclr/runtime/device/rocm/rocvirtual.cpp +++ b/projects/clr/rocclr/runtime/device/rocm/rocvirtual.cpp @@ -1186,9 +1186,9 @@ void VirtualGPU::submitMapMemory(amd::MapMemoryCommand &cmd) } else { result = blitMgr().readImage( - *hsaMemory, const_cast(cmd.mapPtr()), cmd.origin(), - cmd.size(), image->getRowPitch(), - image->getSlicePitch(), cmd.isEntireMemory()); + *hsaMemory, hostPtr, amd::Coord3D(0), + image->getRegion(), image->getRowPitch(), + image->getSlicePitch(), true); } } else { @@ -1242,10 +1242,12 @@ void VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand &cmd) mapInfo->origin_, mapInfo->region_, mapInfo->isEntire()); } else { + void *hostPtr = devMemory->owner()->getHostMem(); + result = blitMgr().writeImage( - cmd.mapPtr(), *devMemory, - mapInfo->origin_, mapInfo->region_, - image->getRowPitch(), image->getSlicePitch(), mapInfo->isEntire()); + hostPtr, *devMemory, + amd::Coord3D(0), image->getRegion(), + image->getRowPitch(), image->getSlicePitch(), true); } } else {