mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Initial support for enqueue blit operation
Change-Id: Iab37beeeb574243c00a5579568e15bcbd1307c43 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com> Related-To: NEO-3020
This commit is contained in:

committed by
sys_ocldev

parent
031d865b59
commit
576005f7bb
@ -583,4 +583,16 @@ bool CommandQueue::bufferCpuCopyAllowed(Buffer *buffer, cl_command_type commandT
|
||||
buffer->getGraphicsAllocation()->getAllocationType() != GraphicsAllocation::AllocationType::BUFFER_COMPRESSED) ||
|
||||
buffer->isReadWriteOnCpuAllowed(blocking, numEventsInWaitList, ptr, size);
|
||||
}
|
||||
|
||||
cl_int CommandQueue::enqueueReadWriteBufferWithBlitTransfer(cl_command_type commandType, Buffer *buffer,
|
||||
size_t offset, size_t size, void *ptr, cl_uint numEventsInWaitList,
|
||||
const cl_event *eventWaitList, cl_event *event) {
|
||||
CsrDependencies csrDependencies;
|
||||
auto blitCommandStreamReceiver = context->getCommandStreamReceiverForBlitOperation(*buffer);
|
||||
|
||||
auto copyDirection = (CL_COMMAND_WRITE_BUFFER == commandType) ? BlitterConstants::BlitWithHostPtrDirection::FromHostPtr
|
||||
: BlitterConstants::BlitWithHostPtrDirection::ToHostPtr;
|
||||
blitCommandStreamReceiver->blitWithHostPtr(*buffer, ptr, true, offset, size, copyDirection, csrDependencies);
|
||||
return CL_SUCCESS;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
Reference in New Issue
Block a user