mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
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:
committed by
sys_ocldev
parent
dcc5316d88
commit
bf0ee40b69
@@ -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());
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user