Improve blocked path mocs testing.

Change-Id: I9812e8d28d1c3e8e5523a0a597f417a548f7b1d7
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
This commit is contained in:
Mrozek, Michal
2019-08-23 09:58:36 +02:00
committed by sys_ocldev
parent 51d0219f65
commit fdda152ebd

View File

@@ -329,6 +329,29 @@ HWTEST_F(EnqueueReadBufferTypeTest, givenNotAlignedPointerAndAlignedSizeWhenRead
EXPECT_EQ(CacheSettings::l3CacheOn, csr.latestSentStatelessMocsConfig);
}
HWTEST_F(EnqueueReadBufferTypeTest, givenNotAlignedPointerAndSizeWhenBlockedReadBufferIsCalledThenRecordedL3IndexIsL3Off) {
auto ptr = reinterpret_cast<void *>(0x1039);
auto userEvent = clCreateUserEvent(pCmdQ->getContextPtr(), nullptr);
cl_int retVal = pCmdQ->enqueueReadBuffer(srcBuffer.get(),
CL_FALSE,
0,
MemoryConstants::cacheLineSize,
ptr,
nullptr,
1,
&userEvent,
nullptr);
clSetUserEventStatus(userEvent, 0u);
EXPECT_EQ(CL_SUCCESS, retVal);
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
EXPECT_EQ(CacheSettings::l3CacheOff, csr.latestSentStatelessMocsConfig);
clReleaseEvent(userEvent);
}
HWTEST_F(EnqueueReadBufferTypeTest, givenOOQWithEnabledSupportCpuCopiesAndDstPtrEqualSrcPtrAndZeroCopyBufferWhenReadBufferIsExecutedThenTaskLevelNotIncreased) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.DoCpuCopyOnReadBuffer.set(true);