CSR AUB + HW mode - flush to poll MMIO for completion

Ensures that each submit of LRCA be serialized through the simulator
like it is for AUBs captured in the standalone mode.

Change-Id: I1e3ad500012dce960d0e64b56af1cb60142772da
This commit is contained in:
Milczarek, Slawomir
2018-08-24 00:16:32 +02:00
parent a73801097f
commit 61000c0dd4
5 changed files with 20 additions and 2 deletions

View File

@@ -117,6 +117,19 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenF
EXPECT_TRUE(mockAubFileStreamPtr->lockStreamCalled);
}
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenItShouldCallPollForCompletion) {
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(false, true, false);
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
LinearStream cs(aubExecutionEnvironment->commandBuffer);
BatchBuffer batchBuffer{cs.getGraphicsAllocation(), 0, 0, nullptr, false, false, QueueThrottle::MEDIUM, cs.getUsed(), &cs};
auto engineType = OCLRT::ENGINE_RCS;
ResidencyContainer allocationsForResidency = {};
aubCsr->flush(batchBuffer, engineType, allocationsForResidency, *pDevice->getOsContext());
EXPECT_TRUE(aubCsr->pollForCompletionCalled);
}
HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWhenFlushIsCalledThenFileStreamShouldBeFlushed) {
auto aubExecutionEnvironment = getEnvironment<AUBCommandStreamReceiverHw<FamilyType>>(true, true, true);
auto aubCsr = aubExecutionEnvironment->template getCsr<AUBCommandStreamReceiverHw<FamilyType>>();