Fix dumping allocations when BCS copy is allowed

Change-Id: I0d56e0d2e8007e7dc1686fab0e40502b658c254e
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-07-10 16:04:01 +02:00
parent ff0add74e3
commit 1544453f24
12 changed files with 178 additions and 34 deletions

View File

@ -1081,6 +1081,37 @@ HWTEST_TEMPLATED_F(BlitEnqueueTaskCountTests, givenEventWhenWaitingForCompletion
clReleaseEvent(outEvent2);
}
HWTEST_TEMPLATED_F(BlitEnqueueTaskCountTests, givenBufferDumpingEnabledWhenEnqueueingThenSetCorrectDumpOption) {
auto buffer = createBuffer(1, false);
buffer->forceDisallowCPUCopy = true;
int hostPtr = 0;
DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.set(true);
DebugManager.flags.AUBDumpBufferFormat.set("BIN");
auto mockCommandQueue = static_cast<MockCommandQueueHw<FamilyType> *>(commandQueue.get());
{
// BCS enqueue
commandQueue->enqueueReadBuffer(buffer.get(), true, 0, 1, &hostPtr, nullptr, 0, nullptr, nullptr);
EXPECT_TRUE(mockCommandQueue->notifyEnqueueReadBufferCalled);
EXPECT_TRUE(mockCommandQueue->useBcsCsrOnNotifyEnabled);
mockCommandQueue->notifyEnqueueReadBufferCalled = false;
}
{
// Non-BCS enqueue
DebugManager.flags.EnableBlitterOperationsForReadWriteBuffers.set(0);
commandQueue->enqueueReadBuffer(buffer.get(), true, 0, 1, &hostPtr, nullptr, 0, nullptr, nullptr);
EXPECT_TRUE(mockCommandQueue->notifyEnqueueReadBufferCalled);
EXPECT_FALSE(mockCommandQueue->useBcsCsrOnNotifyEnabled);
}
}
HWTEST_TEMPLATED_F(BlitEnqueueTaskCountTests, givenBlockedEventWhenWaitingForCompletionThenWaitForCurrentBcsTaskCount) {
auto buffer = createBuffer(1, false);
buffer->forceDisallowCPUCopy = true;