mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
Do not require cpu copy for incompatible buffers.
Change-Id: Ida337e7bb7b4bdae1b30d51a22e0c1bf75e6bcea Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
820f5ac17b
commit
f2e24797ae
@@ -553,10 +553,6 @@ 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) {
|
||||
@@ -582,6 +578,10 @@ bool CommandQueue::bufferCpuCopyAllowed(Buffer *buffer, cl_command_type commandT
|
||||
return false;
|
||||
}
|
||||
|
||||
if (buffer->getMemoryManager() && buffer->getMemoryManager()->isCpuCopyRequired(ptr)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (debugVariableSet) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user