From d027173ee5b48a1ca3bbd3958ed6e6edbe809229 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 13 Dec 2016 17:25:20 -0500 Subject: [PATCH] P4 to Git Change 1352747 by cpaquot@hog-ocl on 2016/12/13 16:17:41 SWDEV-108384 - Send down row pitch and slice pitch This fixes test case #8 and 9. ReviewBoardURL = http://ocltc.amd.com/reviews/r/12009/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#24 edit --- rocclr/runtime/device/rocm/rocvirtual.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/rocclr/runtime/device/rocm/rocvirtual.cpp b/rocclr/runtime/device/rocm/rocvirtual.cpp index 88431a36d1..f55d2305d6 100644 --- a/rocclr/runtime/device/rocm/rocvirtual.cpp +++ b/rocclr/runtime/device/rocm/rocvirtual.cpp @@ -1182,13 +1182,14 @@ void VirtualGPU::submitMapMemory(amd::MapMemoryCommand &cmd) devMemory->mapMemory()->getDeviceMemory(dev(), false)); result = blitMgr().copyImageToBuffer( *hsaMemory, *mapMemory, cmd.origin(), - cmd.origin(), cmd.size(), true); + cmd.origin(), cmd.size(), cmd.isEntireMemory(), + image->getRowPitch(), image->getSlicePitch()); } else { result = blitMgr().readImage( - *hsaMemory, hostPtr, amd::Coord3D(0), - image->getRegion(), image->getRowPitch(), - image->getSlicePitch(), true); + *hsaMemory, const_cast(cmd.mapPtr()), cmd.origin(), + cmd.size(), image->getRowPitch(), + image->getSlicePitch(), cmd.isEntireMemory()); } } else { @@ -1239,17 +1240,14 @@ void VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand &cmd) devMemory->mapMemory()->getDeviceMemory(dev(), false)); result = blitMgr().copyBufferToImage( *mapMemory, *devMemory, mapInfo->origin_, - mapInfo->origin_, mapInfo->region_, true); + mapInfo->origin_, mapInfo->region_, mapInfo->isEntire(), + image->getRowPitch(), image->getSlicePitch()); } else { - void *hostPtr = mapMemory == NULL ? - devMemory->owner()->getHostMem() : - mapMemory->getHostMem(); - result = blitMgr().writeImage( - hostPtr, *devMemory, - amd::Coord3D(0), image->getRegion(), - image->getRowPitch(), image->getSlicePitch(), true); + cmd.mapPtr(), *devMemory, + mapInfo->origin_, mapInfo->region_, + image->getRowPitch(), image->getSlicePitch(), mapInfo->isEntire()); } } else {