Add specializedDevice pointer to Device

Related-To: NEO-3938

Change-Id: Ic3386580a22c41f34c67949ccb7f7c6957c8f60d
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2020-01-31 15:00:25 +01:00
committed by sys_ocldev
parent 5c4abe1261
commit 5495a4b458
26 changed files with 46 additions and 42 deletions

View File

@@ -291,7 +291,7 @@ HWTEST_F(CommandQueueHwTest, GivenNonEmptyQueueOnBlockingMapBufferWillWaitForPre
bool finishWasCalled;
};
MockCmdQ cmdQ(context, platform()->clDeviceMap[&pCmdQ->getDevice()]);
MockCmdQ cmdQ(context, pCmdQ->getDevice().getSpecializedDevice<ClDevice>());
auto b1 = clCreateBuffer(context, CL_MEM_READ_WRITE, 20, nullptr, nullptr);
auto b2 = clCreateBuffer(context, CL_MEM_READ_WRITE, 20, nullptr, nullptr);

View File

@@ -26,7 +26,7 @@ struct EnqueueReadBufferRectTest : public CommandEnqueueFixture,
void SetUp() override {
CommandEnqueueFixture::SetUp();
context.reset(new MockContext(platform()->clDeviceMap[&pCmdQ->getDevice()]));
context.reset(new MockContext(pCmdQ->getDevice().getSpecializedDevice<ClDevice>()));
BufferDefaults::context = context.get();
//For 3D

View File

@@ -33,7 +33,7 @@ class CommandStreamReceiverMock : public UltCommandStreamReceiver<FamilyType> {
size_t expectedToFreeCount = (size_t)-1;
CommandStreamReceiverMock(Device *pDevice) : UltCommandStreamReceiver<FamilyType>(*pDevice->getExecutionEnvironment(), pDevice->getRootDeviceIndex()) {
this->pDevice = pDevice;
this->pClDevice = platform()->clDeviceMap[pDevice];
this->pClDevice = pDevice->getSpecializedDevice<ClDevice>();
}
bool flush(BatchBuffer &batchBuffer, ResidencyContainer &allocationsForResidency) override {