Pass execution environment to command stream receiver.

Change-Id: I598f67f8b005b5ce8249b638e080657eb6dc3547
This commit is contained in:
Mrozek, Michal
2018-08-08 13:49:09 +02:00
committed by sys_ocldev
parent 287d33d87e
commit 1599ea800e
76 changed files with 362 additions and 334 deletions

View File

@ -893,7 +893,7 @@ HWTEST_F(InternalsEventTest, GivenBufferWithoutZeroCopyOnCommandMapOrUnmapFlushe
const cl_queue_properties props[3] = {CL_QUEUE_PROPERTIES, 0, 0};
CommandQueue *pCmdQ = new CommandQueue(mockContext, pDevice, props);
MockNonZeroCopyBuff buffer(executionStamp);
MockCsr<FamilyType> csr(executionStamp);
MockCsr<FamilyType> csr(executionStamp, *pDevice->executionEnvironment);
csr.setMemoryManager(pDevice->getMemoryManager());
csr.setTagAllocation(pDevice->getTagAllocation());
@ -1363,7 +1363,7 @@ TEST_F(EventTest, addChildForEventCompleted) {
HWTEST_F(EventTest, givenQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWaitingFunction) {
struct MyCsr : public UltCommandStreamReceiver<FamilyType> {
MyCsr(const HardwareInfo &hwInfo) : UltCommandStreamReceiver<FamilyType>(hwInfo) {}
MyCsr(const HardwareInfo &hwInfo, const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(hwInfo, const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
};
HardwareInfo localHwInfo = pDevice->getHardwareInfo();
@ -1372,7 +1372,7 @@ HWTEST_F(EventTest, givenQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWa
localHwInfo.capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 1;
localHwInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds = 2;
auto csr = new ::testing::NiceMock<MyCsr>(localHwInfo);
auto csr = new ::testing::NiceMock<MyCsr>(localHwInfo, *pDevice->executionEnvironment);
pDevice->resetCommandStreamReceiver(csr);
Event event(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, 0, 0);
@ -1387,7 +1387,7 @@ HWTEST_F(EventTest, givenQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWa
HWTEST_F(EventTest, givenNonQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestToWaitingFunction) {
struct MyCsr : public UltCommandStreamReceiver<FamilyType> {
MyCsr(const HardwareInfo &hwInfo) : UltCommandStreamReceiver<FamilyType>(hwInfo) {}
MyCsr(const HardwareInfo &hwInfo, const ExecutionEnvironment &executionEnvironment) : UltCommandStreamReceiver<FamilyType>(hwInfo, const_cast<ExecutionEnvironment &>(executionEnvironment)) {}
MOCK_METHOD3(waitForCompletionWithTimeout, bool(bool enableTimeout, int64_t timeoutMs, uint32_t taskCountToWait));
};
HardwareInfo localHwInfo = pDevice->getHardwareInfo();
@ -1396,7 +1396,7 @@ HWTEST_F(EventTest, givenNonQuickKmdSleepRequestWhenWaitIsCalledThenPassRequestT
localHwInfo.capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds = 1;
localHwInfo.capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds = 2;
auto csr = new ::testing::NiceMock<MyCsr>(localHwInfo);
auto csr = new ::testing::NiceMock<MyCsr>(localHwInfo, *pDevice->executionEnvironment);
pDevice->resetCommandStreamReceiver(csr);
Event event(pCmdQ, CL_COMMAND_NDRANGE_KERNEL, 0, 0);