Refactor ULTs and AUB tests around HW commands

Change-Id: Ie00822b9e0864af6ede3e967039efa911d1dbb6f
This commit is contained in:
Zdanowicz, Zbigniew
2018-05-21 16:41:58 +02:00
committed by sys_ocldev
parent 80f11d1ac2
commit 996cb52370
8 changed files with 159 additions and 111 deletions

View File

@ -975,12 +975,14 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, blockingFlushTaskWithOnlyPipeContr
HWTEST_F(CommandStreamReceiverFlushTaskTests, FlushTaskBlockingHasPipeControlWithDCFlush) {
WhitelistedRegisters forceRegs = {0};
pDevice->setForceWhitelistedRegs(true, &forceRegs);
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
CommandQueueHw<FamilyType> commandQueue(nullptr, pDevice, 0);
configureCSRtoNonDirtyState<FamilyType>();
auto &commandStreamReceiver = pDevice->getCommandStreamReceiver();
size_t pipeControlCount = static_cast<CommandStreamReceiverHw<FamilyType> &>(commandStreamReceiver).getRequiredPipeControlSize() / sizeof(PIPE_CONTROL);
auto &commandStreamTask = commandQueue.getCS();
DispatchFlags dispatchFlags;
@ -1007,14 +1009,16 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, FlushTaskBlockingHasPipeControlWit
auto pCmdWA = reinterpret_cast<PIPE_CONTROL *>(*itorPC);
EXPECT_EQ(true, pCmdWA->getDcFlushEnable());
// Search taskCS for PC to analyze
auto pipeControlTask = genCmdCast<typename FamilyType::PIPE_CONTROL *>(
ptrOffset(commandStreamTask.getCpuBase(), 24));
ASSERT_NE(nullptr, pipeControlTask);
if (pipeControlCount > 1) {
// Search taskCS for PC to analyze
auto pipeControlTask = genCmdCast<typename FamilyType::PIPE_CONTROL *>(
ptrOffset(commandStreamTask.getCpuBase(), 24));
ASSERT_NE(nullptr, pipeControlTask);
// Verify that the dcFlushEnabled bit is not set in PC
auto pCmd = reinterpret_cast<PIPE_CONTROL *>(pipeControlTask);
EXPECT_EQ(false, pCmd->getDcFlushEnable());
// Verify that the dcFlushEnabled bit is not set in PC
auto pCmd = reinterpret_cast<PIPE_CONTROL *>(pipeControlTask);
EXPECT_EQ(false, pCmd->getDcFlushEnable());
}
} else {
// Verify that the dcFlushEnabled bit is not set in PC
auto pCmd = reinterpret_cast<PIPE_CONTROL *>(*itorPC);