@@ -1589,7 +1589,13 @@ struct EnqueueAuxKernelTests : public EnqueueKernelTest {
1589
1589
dispatchAuxTranslationInputs.emplace_back (lastKernel, multiDispatchInfo.size (), buffersForAuxTranslation, auxTranslationDirection);
1590
1590
}
1591
1591
1592
+ void waitUntilComplete (uint32_t taskCountToWait, FlushStamp flushStampToWait, bool useQuickKmdSleep) override {
1593
+ waitCalled++;
1594
+ CommandQueueHw<FamilyType>::waitUntilComplete (taskCountToWait, flushStampToWait, useQuickKmdSleep);
1595
+ }
1596
+
1592
1597
std::vector<std::tuple<Kernel *, size_t , BuffersForAuxTranslation, AuxTranslationDirection>> dispatchAuxTranslationInputs;
1598
+ uint32_t waitCalled = 0 ;
1593
1599
};
1594
1600
};
1595
1601
@@ -1737,3 +1743,25 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueAuxKernelTests, givenParentKernelWhenAuxTrans
1737
1743
EXPECT_EQ (GraphicsAllocation::AllocationType::BUFFER, buffer2.getGraphicsAllocation ()->getAllocationType ());
1738
1744
}
1739
1745
}
1746
+
1747
+ HWCMDTEST_F (IGFX_GEN8_CORE, EnqueueAuxKernelTests, givenParentKernelWhenAuxTranslationIsRequiredThenMakeEnqueueBlocking) {
1748
+ if (pDevice->getSupportedClVersion () >= 20 ) {
1749
+ MyCmdQ<FamilyType> cmdQ (context, pDevice);
1750
+ size_t gws[3 ] = {1 , 0 , 0 };
1751
+
1752
+ cl_queue_properties queueProperties = {};
1753
+ auto mockDevQueue = std::make_unique<MockDeviceQueueHw<FamilyType>>(context, pDevice, queueProperties);
1754
+ context->setDefaultDeviceQueue (mockDevQueue.get ());
1755
+ std::unique_ptr<MockParentKernel> parentKernel (MockParentKernel::create (*context, false , false , false , false , false ));
1756
+ parentKernel->initialize ();
1757
+
1758
+ parentKernel->auxTranslationRequired = false ;
1759
+ cmdQ.enqueueKernel (parentKernel.get (), 1 , nullptr , gws, nullptr , 0 , nullptr , nullptr );
1760
+ EXPECT_EQ (0u , cmdQ.waitCalled );
1761
+ mockDevQueue->getIgilQueue ()->m_controls .m_CriticalSection = 0 ;
1762
+
1763
+ parentKernel->auxTranslationRequired = true ;
1764
+ cmdQ.enqueueKernel (parentKernel.get (), 1 , nullptr , gws, nullptr , 0 , nullptr , nullptr );
1765
+ EXPECT_EQ (1u , cmdQ.waitCalled );
1766
+ }
1767
+ }
0 commit comments