mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 20:39:56 +08:00
fix: logic flow for checking ULLS availability
Related-To: NEO-15322 Signed-off-by: Arek G <arkadiusz.grubba@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
d9624a270c
commit
1993bc32d4
@@ -81,18 +81,11 @@ bool OsContext::isDirectSubmissionAvailable(const HardwareInfo &hwInfo, bool &su
|
||||
hwInfo.capabilityTable.directSubmissionEngines.data[contextEngineType];
|
||||
|
||||
bool startDirect = true;
|
||||
if (!this->isDefaultContext()) {
|
||||
if (this->isLowPriority() || this->isInternalEngine()) {
|
||||
startDirect &= false;
|
||||
} else if (!this->isDefaultContext()) {
|
||||
startDirect = directSubmissionProperty.useNonDefault;
|
||||
}
|
||||
if (this->isLowPriority()) {
|
||||
startDirect = false;
|
||||
}
|
||||
if (this->isInternalEngine()) {
|
||||
startDirect = false;
|
||||
}
|
||||
if (this->isRootDevice()) {
|
||||
startDirect = directSubmissionProperty.useRootDevice;
|
||||
}
|
||||
|
||||
submitOnInit = directSubmissionProperty.submitOnInit;
|
||||
bool engineSupported = checkDirectSubmissionSupportsEngine(directSubmissionProperty,
|
||||
|
||||
@@ -1336,27 +1336,6 @@ HWTEST_F(InitDirectSubmissionTest, givenRootDeviceContextWhenDirectSubmissionDis
|
||||
csr.reset();
|
||||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenRootDeviceContextWhenDirectSubmissionEnabledOnRootDeviceThenExpectFeatureAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(), device->getRootDeviceIndex(), 0,
|
||||
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_RCS, EngineUsage::internal}, PreemptionMode::ThreadGroup,
|
||||
device->getDeviceBitfield(), true)));
|
||||
osContext->ensureContextInitialized(false);
|
||||
|
||||
auto hwInfo = device->getRootDeviceEnvironment().getMutableHardwareInfo();
|
||||
hwInfo->capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_RCS].engineSupported = true;
|
||||
hwInfo->capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_RCS].useRootDevice = true;
|
||||
hwInfo->capabilityTable.directSubmissionEngines.data[aub_stream::ENGINE_RCS].submitOnInit = false;
|
||||
|
||||
csr->setupContext(*osContext);
|
||||
csr->initializeTagAllocation();
|
||||
bool ret = csr->initDirectSubmission();
|
||||
EXPECT_TRUE(ret);
|
||||
EXPECT_TRUE(csr->isDirectSubmissionEnabled());
|
||||
|
||||
csr.reset();
|
||||
}
|
||||
|
||||
HWTEST_F(InitDirectSubmissionTest, givenNonDefaultContextWhenDirectSubmissionDisabledOnNonDefaultThenExpectFeatureNotAvailable) {
|
||||
auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment, device->getRootDeviceIndex(), device->getDeviceBitfield());
|
||||
std::unique_ptr<OsContext> osContext(OsContext::create(device->getExecutionEnvironment()->rootDeviceEnvironments[0]->osInterface.get(), device->getRootDeviceIndex(), 0,
|
||||
|
||||
Reference in New Issue
Block a user