Initialize tag value in init function.

- remove not needed method in mock device.
- remove duplication from aub tests.
- tag allocation now have desired value

Change-Id: Ib3161cce6753eae27c60fddb63054fd2e12f7dac
This commit is contained in:
Mrozek, Michal
2018-07-31 14:27:26 +02:00
committed by sys_ocldev
parent 89cf7532ea
commit 1807ea651c
11 changed files with 99 additions and 159 deletions

View File

@@ -72,12 +72,12 @@ void MockDevice::injectMemoryManager(MockMemoryManager *memoryManager) {
}
void MockDevice::resetCommandStreamReceiver(CommandStreamReceiver *newCsr) {
auto tagAllocation = this->disconnectCurrentTagAllocationAndReturnIt();
executionEnvironment->commandStreamReceiver.reset(newCsr);
executionEnvironment->commandStreamReceiver->setMemoryManager(executionEnvironment->memoryManager.get());
executionEnvironment->commandStreamReceiver->setTagAllocation(tagAllocation);
executionEnvironment->commandStreamReceiver->initializeTagAllocation();
executionEnvironment->commandStreamReceiver->setPreemptionCsrAllocation(preemptionAllocation);
executionEnvironment->memoryManager->csr = executionEnvironment->commandStreamReceiver.get();
this->tagAddress = executionEnvironment->commandStreamReceiver->getTagAddress();
}
OCLRT::FailMemoryManager::FailMemoryManager() : MockMemoryManager() {