Force implicitFlush for blit aux translation

Change-Id: I8a63759d4b98126bdfbd8fdeeb3d7302d5591450
This commit is contained in:
Bartosz Dunajski
2020-05-04 10:25:08 +02:00
committed by sys_ocldev
parent 6b5a7a3e08
commit 8700b24c87
2 changed files with 15 additions and 0 deletions

View File

@@ -810,6 +810,7 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
if (enqueueProperties.blitPropertiesContainer->size() > 0) {
this->bcsTaskCount = getBcsCommandStreamReceiver()->blitBuffer(*enqueueProperties.blitPropertiesContainer, false);
dispatchFlags.implicitFlush = true;
}
printDebugString(DebugManager.flags.PrintDebugMessages.get(), stdout, "preemption = %d.\n", static_cast<int>(dispatchFlags.preemptionMode));

View File

@@ -795,3 +795,17 @@ HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenBlitTranslationWhenConstructing
EXPECT_FALSE(commandQueue->isQueueBlocked());
}
HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenBlitTranslationWhenEnqueueIsCalledThenDoImplicitFlushOnGpgpuCsr) {
auto buffer = createBuffer(1, true);
setMockKernelArgs(std::array<Buffer *, 1>{{buffer.get()}});
auto ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> *>(gpgpuCsr);
EXPECT_EQ(0u, ultCsr->taskCount);
commandQueue->enqueueKernel(mockKernel->mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
EXPECT_EQ(1u, ultCsr->taskCount);
EXPECT_TRUE(ultCsr->recordedDispatchFlags.implicitFlush);
}