AUB capture with support for allocation dumps

Change-Id: I90a2b75043c33af92e4557be37cde4b9699582c6
This commit is contained in:
Milczarek, Slawomir
2019-01-27 17:36:42 +01:00
parent 7c390fa23b
commit b11e0825c9
19 changed files with 873 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -391,6 +391,38 @@ HWTEST_F(EnqueueReadImageTest, givenCommandQueueWhenEnqueueReadImageIsCalledThen
EXPECT_TRUE(mockCmdQ->notifyEnqueueReadImageCalled);
}
HWTEST_F(EnqueueReadImageTest, givenEnqueueReadImageBlockingWhenAUBDumpAllocsOnEnqueueReadOnlyIsOnThenImageShouldBeSetDumpable) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.set(true);
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};
ASSERT_FALSE(srcImage->getGraphicsAllocation()->isAllocDumpable());
EnqueueReadImageHelper<>::enqueueReadImage(pCmdQ, srcImage.get(), CL_TRUE, origin, region);
EXPECT_TRUE(srcImage->getGraphicsAllocation()->isAllocDumpable());
}
HWTEST_F(EnqueueReadImageTest, givenEnqueueReadImageNonBlockingWhenAUBDumpAllocsOnEnqueueReadOnlyIsOnThenImageShouldntBeSetDumpable) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.AUBDumpAllocsOnEnqueueReadOnly.set(true);
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};
ASSERT_FALSE(srcImage->getGraphicsAllocation()->isAllocDumpable());
EnqueueReadImageHelper<>::enqueueReadImage(pCmdQ, srcImage.get(), CL_FALSE, origin, region);
EXPECT_FALSE(srcImage->getGraphicsAllocation()->isAllocDumpable());
}
typedef EnqueueReadImageMipMapTest MipMapReadImageTest;
HWTEST_P(MipMapReadImageTest, GivenImageWithMipLevelNonZeroWhenReadImageIsCalledThenProperMipLevelIsSet) {