AUBDumpAllocsOnEnqueueReadOnly to not activate in path with map buffer

Related-To: NEO-2717

Change-Id: I7999928e23f8d9cb4a88978ec44e4615eebb97b6
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2019-04-15 15:48:48 +02:00
committed by sys_ocldev
parent 5c747a113e
commit 1b7014e10c
2 changed files with 21 additions and 1 deletions

View File

@@ -465,6 +465,24 @@ HWTEST_F(EnqueueReadBufferTypeTest, givenCommandQueueWhenEnqueueReadBufferIsCall
EXPECT_TRUE(mockCmdQ->notifyEnqueueReadBufferCalled);
}
HWTEST_F(EnqueueReadBufferTypeTest, givenCommandQueueWhenEnqueueReadBufferWithMapAllocationIsCalledThenItDoesntCallNotifyFunction) {
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context, pDevice, nullptr);
void *ptr = nonZeroCopyBuffer->getCpuAddressForMemoryTransfer();
GraphicsAllocation mapAllocation{GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 0, 0, 0, MemoryPool::MemoryNull, false};
auto retVal = mockCmdQ->enqueueReadBuffer(srcBuffer.get(),
CL_TRUE,
0,
MemoryConstants::cacheLineSize,
ptr,
&mapAllocation,
0,
nullptr,
nullptr);
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_FALSE(mockCmdQ->notifyEnqueueReadBufferCalled);
}
HWTEST_F(EnqueueReadBufferTypeTest, givenEnqueueReadBufferCalledWhenLockedPtrInTransferPropertisIsAvailableThenItIsNotUnlocked) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.DoCpuCopyOnReadBuffer.set(true);