Fix root device direct submission initialization

Related-To: NEO-5007

Change-Id: I4bac1a0a5e92982535f197c17d375050b484f8a2
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2020-09-15 10:11:12 +02:00
committed by sys_ocldev
parent dcc5316d88
commit bf0ee40b69
3 changed files with 9 additions and 2 deletions

View File

@@ -261,4 +261,12 @@ TEST(SubDevicesTest, givenRootDeviceWithSubDevicesWhenGettingGlobalMemorySizeThe
for (const auto &subDevice : deviceFactory.subDevices) {
EXPECT_EQ(expectedGlobalMemorySize, static_cast<MockSubDevice *>(subDevice)->getGlobalMemorySize());
}
}
TEST(SubDevicesTest, whenInitializeRootCsrThenDirectSubmissionIsNotInitialized) {
auto device = std::make_unique<MockDevice>();
device->initializeRootCommandStreamReceiver();
auto csr = device->getEngine(1u).commandStreamReceiver;
EXPECT_FALSE(csr->isDirectSubmissionEnabled());
}

View File

@@ -106,8 +106,6 @@ void RootDevice::initializeRootCommandStreamReceiver() {
rootCommandStreamReceiver->setupContext(*osContext);
rootCommandStreamReceiver->initializeTagAllocation();
rootCommandStreamReceiver->createGlobalFenceAllocation();
bool ret = rootCommandStreamReceiver->initDirectSubmission(*this, *osContext);
UNRECOVERABLE_IF(!ret);
commandStreamReceivers.push_back(std::move(rootCommandStreamReceiver));
engines.emplace_back(commandStreamReceivers.back().get(), osContext);
}

View File

@@ -48,6 +48,7 @@ class MockDevice : public RootDevice {
using RootDevice::createEngines;
using RootDevice::defaultEngineIndex;
using RootDevice::getDeviceBitfield;
using RootDevice::initializeRootCommandStreamReceiver;
using RootDevice::subdevices;
void setOSTime(OSTime *osTime);