Move tag allocation destruction to command stream receiver.

Change-Id: I657df755c6cdd695103769a45a8dce749f7bd545
This commit is contained in:
Mrozek, Michal
2018-07-13 14:11:04 +02:00
committed by sys_ocldev
parent d9757a93a1
commit 0abacce160
12 changed files with 132 additions and 119 deletions

View File

@@ -22,11 +22,11 @@
#include "unit_tests/mocks/mock_device.h"
#include "runtime/command_stream/command_stream_receiver.h"
#include "runtime/device/driver_info.h"
#include "runtime/memory_manager/os_agnostic_memory_manager.h"
#include "runtime/os_interface/os_time.h"
#include "runtime/device/driver_info.h"
#include "unit_tests/mocks/mock_ostime.h"
#include "unit_tests/mocks/mock_memory_manager.h"
#include "unit_tests/mocks/mock_ostime.h"
using namespace OCLRT;
@@ -67,6 +67,7 @@ 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);