diff --git a/opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp b/opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp index 985f3eb4f7..3a129f4bd3 100644 --- a/opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp +++ b/opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp @@ -435,6 +435,23 @@ HWTEST_TEMPLATED_F(BlitAuxTranslationTests, whenFlushTagUpdateThenMiFlushDwIsFlu EXPECT_NE(cmdFound, cmdListBcs.end()); } +HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenNonDefaultBcsWhenFlushNonKernelTaskThenMiFlushDwIsFlushed) { + using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW; + + std::unique_ptr bcs3Context(OsContext::create(nullptr, 1, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS3, EngineUsage::Regular}, device->getDeviceBitfield()))); + bcsCsr->setupContext(*bcs3Context); + + NEO::PipeControlArgs args; + bcsCsr->flushNonKernelTask(nullptr, 0, 0, args, false, false, false); + + auto cmdListBcs = getCmdList(bcsCsr->getCS(0), 0); + + auto cmdFound = expectCommand(cmdListBcs.begin(), cmdListBcs.end()); + EXPECT_NE(cmdFound, cmdListBcs.end()); + + bcsCsr->setupContext(*bcsOsContext); +} + HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenBlitTranslationWhenConstructingCommandBufferThenSynchronizeBcsOutput) { using XY_COPY_BLT = typename FamilyType::XY_COPY_BLT; using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW; diff --git a/shared/source/command_stream/command_stream_receiver_hw_base.inl b/shared/source/command_stream/command_stream_receiver_hw_base.inl index 7c46f6ff1c..ba9eecb7da 100644 --- a/shared/source/command_stream/command_stream_receiver_hw_base.inl +++ b/shared/source/command_stream/command_stream_receiver_hw_base.inl @@ -1139,7 +1139,7 @@ void CommandStreamReceiverHw::flushNonKernelTask(GraphicsAllocation * if (isWaitOnEvent) { this->flushSemaphoreWait(eventAlloc, immediateGpuAddress, immediateData, args, isStartOfDispatch, isEndOfDispatch); } else { - if (this->osContext->getEngineType() == aub_stream::ENGINE_BCS) { + if (EngineHelpers::isBcs(this->osContext->getEngineType())) { this->flushMiFlushDW(eventAlloc, immediateGpuAddress, immediateData); } else { this->flushPipeControl(eventAlloc, immediateGpuAddress, immediateData, args);