P4 to Git Change 1352835 by cpaquot@hog-ocl on 2016/12/13 19:59:07
SWDEV-108384 - Force map memory offset to 0 Copy what we do in ORCA and PAL backend: When mapping an image, default the offset to 0 instead of the map offset for the staging buffer. ReviewBoardURL = http://ocltc.amd.com/reviews/r/12010/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocmemory.cpp#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#25 edit
This commit is contained in:
@@ -1182,8 +1182,7 @@ void VirtualGPU::submitMapMemory(amd::MapMemoryCommand &cmd)
|
||||
devMemory->mapMemory()->getDeviceMemory(dev(), false));
|
||||
result = blitMgr().copyImageToBuffer(
|
||||
*hsaMemory, *mapMemory, cmd.origin(),
|
||||
cmd.origin(), cmd.size(), cmd.isEntireMemory(),
|
||||
image->getRowPitch(), image->getSlicePitch());
|
||||
amd::Coord3D(0,0,0), cmd.size(), cmd.isEntireMemory());
|
||||
}
|
||||
else {
|
||||
result = blitMgr().readImage(
|
||||
@@ -1239,9 +1238,8 @@ void VirtualGPU::submitUnmapMemory(amd::UnmapMemoryCommand &cmd)
|
||||
roc::Memory *mapMemory = static_cast<roc::Memory *>(
|
||||
devMemory->mapMemory()->getDeviceMemory(dev(), false));
|
||||
result = blitMgr().copyBufferToImage(
|
||||
*mapMemory, *devMemory, mapInfo->origin_,
|
||||
mapInfo->origin_, mapInfo->region_, mapInfo->isEntire(),
|
||||
image->getRowPitch(), image->getSlicePitch());
|
||||
*mapMemory, *devMemory, amd::Coord3D(0,0,0),
|
||||
mapInfo->origin_, mapInfo->region_, mapInfo->isEntire());
|
||||
}
|
||||
else {
|
||||
result = blitMgr().writeImage(
|
||||
|
||||
Reference in New Issue
Block a user