@@ -398,6 +398,11 @@ HWTEST_F(CommandStreamReceiverTest, whenClearColorAllocationIsCreatedThenItIsDes
398
398
EXPECT_EQ (nullptr , csr.clearColorAllocation );
399
399
}
400
400
401
+ HWTEST_F (CommandStreamReceiverTest, givenNoDirectSubmissionWhenCheckTaskCountFromWaitEnabledThenReturnsFalse) {
402
+ auto &csr = pDevice->getUltCommandStreamReceiver <FamilyType>();
403
+ EXPECT_FALSE (csr.isUpdateTagFromWaitEnabled ());
404
+ }
405
+
401
406
struct InitDirectSubmissionFixture {
402
407
void SetUp () {
403
408
DebugManager.flags .EnableDirectSubmission .set (1 );
@@ -491,6 +496,44 @@ HWTEST_F(InitDirectSubmissionTest, whenDirectSubmissionEnabledOnRcsThenExpectFea
491
496
csr.reset ();
492
497
}
493
498
499
+ HWTEST_F (InitDirectSubmissionTest, givenDirectSubmissionWhenCheckTaskCountFromWaitEnabledThenReturnsTrue) {
500
+ auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment , device->getRootDeviceIndex (), device->getDeviceBitfield ());
501
+ std::unique_ptr<OsContext> osContext (OsContext::create (device->getExecutionEnvironment ()->rootDeviceEnvironments [0 ]->osInterface .get (), 0 ,
502
+ EngineDescriptorHelper::getDefaultDescriptor ({aub_stream::ENGINE_RCS, EngineUsage::Regular},
503
+ PreemptionMode::ThreadGroup, device->getDeviceBitfield ())));
504
+ osContext->ensureContextInitialized ();
505
+ osContext->setDefaultContext (true );
506
+ auto hwInfo = device->getRootDeviceEnvironment ().getMutableHardwareInfo ();
507
+ hwInfo->capabilityTable .directSubmissionEngines .data [aub_stream::ENGINE_RCS].engineSupported = true ;
508
+ hwInfo->capabilityTable .directSubmissionEngines .data [aub_stream::ENGINE_RCS].submitOnInit = false ;
509
+
510
+ bool ret = csr->initDirectSubmission (*device, *osContext.get ());
511
+ EXPECT_TRUE (ret);
512
+
513
+ EXPECT_TRUE (csr->isUpdateTagFromWaitEnabled ());
514
+
515
+ csr.reset ();
516
+ }
517
+
518
+ HWTEST_F (InitDirectSubmissionTest, givenBlitterDirectSubmissionWhenCheckTaskCountFromWaitEnabledThenReturnsTrue) {
519
+ auto csr = std::make_unique<CommandStreamReceiverHw<FamilyType>>(*device->executionEnvironment , device->getRootDeviceIndex (), device->getDeviceBitfield ());
520
+ std::unique_ptr<OsContext> osContext (OsContext::create (device->getExecutionEnvironment ()->rootDeviceEnvironments [0 ]->osInterface .get (), 0 ,
521
+ EngineDescriptorHelper::getDefaultDescriptor ({aub_stream::ENGINE_BCS, EngineUsage::Regular},
522
+ PreemptionMode::ThreadGroup, device->getDeviceBitfield ())));
523
+ osContext->ensureContextInitialized ();
524
+ osContext->setDefaultContext (true );
525
+ auto hwInfo = device->getRootDeviceEnvironment ().getMutableHardwareInfo ();
526
+ hwInfo->capabilityTable .directSubmissionEngines .data [aub_stream::ENGINE_BCS].engineSupported = true ;
527
+ hwInfo->capabilityTable .directSubmissionEngines .data [aub_stream::ENGINE_BCS].submitOnInit = false ;
528
+
529
+ bool ret = csr->initDirectSubmission (*device, *osContext.get ());
530
+ EXPECT_TRUE (ret);
531
+
532
+ EXPECT_TRUE (csr->isUpdateTagFromWaitEnabled ());
533
+
534
+ csr.reset ();
535
+ }
536
+
494
537
template <class Type >
495
538
class CommandStreamReceiverHwDirectSubmissionMock : public CommandStreamReceiverHw <Type> {
496
539
public:
0 commit comments