Add entry points for detecting whether cpu copy is required.

Change-Id: I04438da6241eedf127fd7e51ab257d22186d904e
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2020-02-28 09:59:18 +01:00
committed by sys_ocldev
parent 4c781c1b98
commit 4803e82eda
4 changed files with 29 additions and 0 deletions

View File

@@ -556,6 +556,10 @@ size_t CommandQueue::estimateTimestampPacketNodesCount(const MultiDispatchInfo &
bool CommandQueue::bufferCpuCopyAllowed(Buffer *buffer, cl_command_type commandType, cl_bool blocking, size_t size, void *ptr,
cl_uint numEventsInWaitList, const cl_event *eventWaitList) {
if (buffer->getMemoryManager() && buffer->getMemoryManager()->isCpuCopyRequired(ptr)) {
return true;
}
auto debugVariableSet = false;
// Requested by debug variable or allowed by Buffer
if (CL_COMMAND_READ_BUFFER == commandType && DebugManager.flags.DoCpuCopyOnReadBuffer.get() != -1) {