mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-01 12:33:12 +08:00
AUB capture with a capability to get engine instance
Change-Id: I52c47505476053d6e692fc9d89cca25a6e122a63
This commit is contained in:
committed by
sys_ocldev
parent
7bd92190d9
commit
9be4850213
@@ -85,6 +85,35 @@ TEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenTypeIsChe
|
||||
EXPECT_EQ(CommandStreamReceiverType::CSR_AUB, aubCsr->getType());
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGetInstanceIsCalledForAGivenEngineTypeThenEngineInstanceForThatTypeIsReturned) {
|
||||
auto aubCsr = std::make_unique<AUBCommandStreamReceiverHw<FamilyType>>(**platformDevices, "", true, executionEnvironment);
|
||||
EXPECT_NE(nullptr, aubCsr);
|
||||
|
||||
auto engineId = aubCsr->getEngineInstance(EngineType::ENGINE_RCS);
|
||||
EXPECT_EQ(EngineType::ENGINE_RCS, allEngineInstances[engineId].type);
|
||||
|
||||
engineId = aubCsr->getEngineInstance(EngineType::ENGINE_BCS);
|
||||
EXPECT_EQ(EngineType::ENGINE_BCS, allEngineInstances[engineId].type);
|
||||
|
||||
engineId = aubCsr->getEngineInstance(EngineType::ENGINE_VCS);
|
||||
EXPECT_EQ(EngineType::ENGINE_VCS, allEngineInstances[engineId].type);
|
||||
|
||||
engineId = aubCsr->getEngineInstance(EngineType::ENGINE_VECS);
|
||||
EXPECT_EQ(EngineType::ENGINE_VECS, allEngineInstances[engineId].type);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenSetCsTraitsIsCalledThenLRCAIsSetForAGivenEngine) {
|
||||
const auto &csTraits = AUBCommandStreamReceiverHw<FamilyType>::getCsTraits(EngineType::ENGINE_RCS);
|
||||
|
||||
auto mmioBase = 0x12345679u;
|
||||
const AubMemDump::LrcaHelper lrca(mmioBase);
|
||||
AUBCommandStreamReceiverHw<FamilyType>::setCsTraits(EngineType::ENGINE_RCS, &lrca);
|
||||
const auto &traits = AUBCommandStreamReceiverHw<FamilyType>::getCsTraits(EngineType::ENGINE_RCS);
|
||||
EXPECT_EQ(mmioBase, traits.mmioBase);
|
||||
|
||||
AUBCommandStreamReceiverHw<FamilyType>::setCsTraits(EngineType::ENGINE_RCS, &csTraits);
|
||||
}
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenItIsCreatedWithDefaultSettingsThenItHasBatchedDispatchModeEnabled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
DebugManager.flags.CsrDispatchMode.set(0);
|
||||
|
||||
Reference in New Issue
Block a user