P4 to Git Change 1559383 by gandryey@gera-w8 on 2018/05/24 18:38:36
SWDEV-79445 - OCL generic changes and code clean-up - Remove memory reallocation interfaces. It was used for AMDIL path with HW constant buffers support. It seems AMDIL with SI+ doesn't enable HW const buffers. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#303 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#589 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#166 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#324 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#129 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#132 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.hpp#52 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#90 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#29 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#51 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#16 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.cpp#21 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.hpp#8 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#29 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#105 edit
This commit is contained in:
@@ -918,52 +918,6 @@ void* Memory::cpuMap(device::VirtualDevice& vDev, uint flags, uint startLayer, u
|
||||
|
||||
void Memory::cpuUnmap(device::VirtualDevice& vDev) { unmap(&static_cast<VirtualGPU&>(vDev)); }
|
||||
|
||||
//! \note moveTo() must be called only from outside of
|
||||
//! VirtualGPU submit command methods.
|
||||
//! Otherwise a deadlock in lockVgpus() is possible.
|
||||
//! Also the logic in this function is very specific to
|
||||
//! the zero-copy functionality.
|
||||
|
||||
bool Memory::moveTo(Memory& dst) {
|
||||
bool result = false;
|
||||
|
||||
// Make sure that all virtual devices don't process any commands
|
||||
Device::ScopedLockVgpus lock(dev());
|
||||
|
||||
// Wait for idle on all virtual GPUs
|
||||
//!@note It's enough to wait on the active queue only
|
||||
for (uint idx = 0; idx < dev().vgpus().size(); ++idx) {
|
||||
wait(*(dev().vgpus()[idx]));
|
||||
}
|
||||
|
||||
static const bool Entire = true;
|
||||
amd::Coord3D origin(0, 0, 0);
|
||||
amd::Coord3D region(size());
|
||||
|
||||
// Transfer the data from old location to a new one
|
||||
if (dev().xferMgr().copyBuffer(*this, dst, origin, origin, region, Entire)) {
|
||||
// Move all properties to the new object
|
||||
dst.mapMemory_ = mapMemory_;
|
||||
mapMemory_ = NULL;
|
||||
|
||||
dst.flags_ |= flags_ & ~HostMemoryDirectAccess;
|
||||
flags_ &= HostMemoryDirectAccess;
|
||||
|
||||
dst.indirectMapCount_ = indirectMapCount_;
|
||||
indirectMapCount_ = 0;
|
||||
|
||||
dst.pinnedMemory_ = pinnedMemory_;
|
||||
pinnedMemory_ = NULL;
|
||||
|
||||
// Replace the device memory object
|
||||
//! @note: current object will be destroyed
|
||||
owner()->replaceDeviceMemory(&dev(), &dst);
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Memory* Memory::mapMemory() const {
|
||||
Memory* map = NULL;
|
||||
if (NULL != mapMemory_) {
|
||||
|
||||
مرجع در شماره جدید
Block a user