AUBDumpAllocsOnEnqueueReadOnly to not activate in path with map image

Related-To: NEO-2717

Change-Id: Ida017557a58533323a214c59febfd8794ef4cf17
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2019-04-19 10:18:12 +02:00
committed by sys_ocldev
parent faae0364d0
commit 1bf263f061
2 changed files with 18 additions and 1 deletions

View File

@@ -396,6 +396,21 @@ HWTEST_F(EnqueueReadImageTest, givenCommandQueueWhenEnqueueReadImageIsCalledThen
EXPECT_TRUE(mockCmdQ->notifyEnqueueReadImageCalled);
}
HWTEST_F(EnqueueReadImageTest, givenCommandQueueWhenEnqueueReadImageWithMapAllocationIsCalledThenItDoesntCallNotifyFunction) {
auto mockCmdQ = std::make_unique<MockCommandQueueHw<FamilyType>>(context, pDevice, nullptr);
std::unique_ptr<Image> srcImage(Image2dArrayHelper<>::create(context));
auto imageDesc = srcImage->getImageDesc();
size_t origin[] = {0, 0, 0};
size_t region[] = {imageDesc.image_width, imageDesc.image_height, imageDesc.image_array_size};
size_t rowPitch = srcImage->getHostPtrRowPitch();
size_t slicePitch = srcImage->getHostPtrSlicePitch();
GraphicsAllocation mapAllocation{GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 0, 0, 0, MemoryPool::MemoryNull, false};
EnqueueReadImageHelper<>::enqueueReadImage(mockCmdQ.get(), srcImage.get(), CL_TRUE, origin, region, rowPitch, slicePitch, dstPtr, &mapAllocation);
EXPECT_FALSE(mockCmdQ->notifyEnqueueReadImageCalled);
}
HWTEST_F(EnqueueReadImageTest, givenEnqueueReadImageBlockingWhenAUBDumpAllocsOnEnqueueReadOnlyIsOnThenImageShouldBeSetDumpable) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.set(true);