Ensure that device has valid command stream receiver in tests.

Change-Id: I1226a4b43b48fff6fa001b72791926fe21ba1fc0
This commit is contained in:
Mrozek, Michal 2018-07-12 10:04:07 +02:00 committed by sys_ocldev
parent ebc16baa00
commit f7316c0053
2 changed files with 4 additions and 0 deletions

View File

@ -32,6 +32,8 @@ using namespace OCLRT;
MockDevice::MockDevice(const HardwareInfo &hwInfo)
: MockDevice(hwInfo, new ExecutionEnvironment) {
CommandStreamReceiver *commandStreamReceiver = createCommandStream(&hwInfo);
executionEnvironment->commandStreamReceiver.reset(commandStreamReceiver);
}
OCLRT::MockDevice::MockDevice(const HardwareInfo &hwInfo, ExecutionEnvironment *executionEnvironment)

View File

@ -34,6 +34,8 @@ class OSTime;
class MemoryManager;
class MockMemoryManager;
extern CommandStreamReceiver *createCommandStream(const HardwareInfo *pHwInfo);
class MockDevice : public Device {
public:
using Device::createDeviceImpl;