P4 to Git Change 1302288 by cpaquot@hog-ocl on 2016/08/11 19:32:24

SWDEV-100298 - oclPerfImageMapUnmap test fails in Fiji
	Reverted back CL #1295719 and instead copy back the whole host mem data onto the device memory since that's what is done at map time.

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/11076/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#7 edit


[ROCm/clr commit: 4bc132bc87]
Cette révision appartient à :
foreman
2016-08-11 20:19:39 -04:00
Parent 65217be249
révision 229a8862dc
+9 -5
Voir le fichier
@@ -1208,16 +1208,20 @@ void VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand &cmd)
}
if (mapInfo->isUnmapWrite()) {
// Commit the changes made by the user.
if (devMemory->owner()->getHostMem() == nullptr) {
if (!devMemory->isHostMemDirectAccess()) {
bool result = false;
if (cmd.memory().asImage() && !imageBuffer) {
amd::Image *image = cmd.memory().asImage();
amd::Memory* mapMemory = devMemory->mapMemory();
void *hostPtr = mapMemory == NULL ?
devMemory->owner()->getHostMem() :
mapMemory->getHostMem();
result = blitMgr().writeImage(
cmd.mapPtr(), *devMemory,
mapInfo->origin_,
mapInfo->region_,
image->getRowPitch(), image->getSlicePitch());
hostPtr, *devMemory,
amd::Coord3D(0), image->getRegion(),
image->getRowPitch(), image->getSlicePitch(), true);
}
else {
amd::Coord3D origin(mapInfo->origin_[0]);