P4 to Git Change 1257532 by gandryey@gera-ocl on 2016/04/13 13:18:22
SWDEV-92049 - Forum [2712399]: clEnqueueMapBuffer in parallel - Handle multiple unmapInfo structures of multiple simultaneous maps of the same buffer - The change didn't affect images path, since it requires extra handling Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#79 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#16 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#194 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#271 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#126 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#399 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsamemory.cpp#25 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsamemory.hpp#10 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsavirtual.cpp#64 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#4 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#82 edit
This commit is contained in:
@@ -675,22 +675,38 @@ Kernel::openclMangledName(const std::string& name)
|
||||
|
||||
void
|
||||
Memory::saveMapInfo(
|
||||
const void* mapAddress,
|
||||
const amd::Coord3D origin,
|
||||
const amd::Coord3D region,
|
||||
uint mapFlags,
|
||||
bool entire,
|
||||
amd::Image* baseMip)
|
||||
{
|
||||
// Map/Unmap must be serialized.
|
||||
amd::ScopedLock lock(owner()->lockMemoryOps());
|
||||
|
||||
WriteMapInfo info = {};
|
||||
WriteMapInfo* pInfo = &info;
|
||||
auto it = writeMapInfo_.find(mapAddress);
|
||||
if (it != writeMapInfo_.end()) {
|
||||
LogWarning("Double map of the same region!");
|
||||
}
|
||||
else {
|
||||
writeMapInfo_.insert(std::pair<const void*, WriteMapInfo>(mapAddress, info));
|
||||
it = writeMapInfo_.find(mapAddress);
|
||||
pInfo = &it->second;
|
||||
}
|
||||
|
||||
if (mapFlags & (CL_MAP_WRITE | CL_MAP_WRITE_INVALIDATE_REGION)) {
|
||||
writeMapInfo_.origin_ = origin;
|
||||
writeMapInfo_.region_ = region;
|
||||
writeMapInfo_.entire_ = entire;
|
||||
flags_ |= UnmapWrite;
|
||||
pInfo->origin_ = origin;
|
||||
pInfo->region_ = region;
|
||||
pInfo->entire_ = entire;
|
||||
pInfo->unmapWrite_ = true;
|
||||
}
|
||||
if (mapFlags & CL_MAP_READ) {
|
||||
flags_ |= UnmapRead;
|
||||
pInfo->unmapRead_ = true;
|
||||
}
|
||||
writeMapInfo_.baseMip_ = baseMip;
|
||||
pInfo->baseMip_ = baseMip;
|
||||
}
|
||||
|
||||
Program::Program(amd::Device& device)
|
||||
|
||||
Reference in New Issue
Block a user