Check BCS engine type correctly in flush non kernel

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk 2021-12-27 11:54:52 +00:00 committed by Compute-Runtime-Automation
parent f663c509fe
commit 9be5efe4f7
2 changed files with 18 additions and 1 deletions

View File

@ -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<OsContext> 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<FamilyType>(bcsCsr->getCS(0), 0);
auto cmdFound = expectCommand<MI_FLUSH_DW>(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;

View File

@ -1139,7 +1139,7 @@ void CommandStreamReceiverHw<GfxFamily>::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);