mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 15:53:13 +08:00
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:
committed by
sys_ocldev
parent
83ee99ad3d
commit
41cca6d790
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user