Use GraphicsAllocation for blit operation instead of Buffer object

Change-Id: I7e59a25db97082a6396d441a8fa603df27d6424d
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
Related-To: NEO-3020
This commit is contained in:
Dunajski, Bartosz
2019-06-27 16:08:20 +02:00
committed by sys_ocldev
parent 83ee99ad3d
commit 41cca6d790
15 changed files with 70 additions and 81 deletions

View File

@@ -422,20 +422,4 @@ cl_int CommandStreamReceiver::expectMemory(const void *gfxAddress, const void *s
return (isMemoryEqual == isEqualMemoryExpected) ? CL_SUCCESS : CL_INVALID_VALUE;
}
void CommandStreamReceiver::blitWithHostPtr(BlitProperties &blitProperites) {
HostPtrSurface hostPtrSurface(blitProperites.hostPtr, static_cast<size_t>(blitProperites.copySize), true);
bool success = createAllocationForHostSurface(hostPtrSurface, false);
UNRECOVERABLE_IF(!success);
auto hostPtrAllocation = hostPtrSurface.getAllocation();
auto device = platform()->getDevice(0);
auto hostPtrBuffer = std::unique_ptr<Buffer>(Buffer::createBufferHwFromDevice(device, CL_MEM_READ_WRITE,
static_cast<size_t>(blitProperites.copySize),
blitProperites.hostPtr, blitProperites.hostPtr, hostPtrAllocation,
true, false, true));
blitProperites.setHostPtrBuffer(hostPtrBuffer.get());
blitBuffer(blitProperites);
}
} // namespace NEO