Change alignment for forced created ptr in image

Related-To: NEO-5723
Signed-off-by: Krzysztof Gibala <krzysztof.gibala@intel.com>
This commit is contained in:
Krzysztof Gibala
2021-04-27 10:21:32 +00:00
committed by Compute-Runtime-Automation
parent 5f41e00909
commit df1162ff4d
2 changed files with 11 additions and 2 deletions

View File

@@ -1628,6 +1628,15 @@ HWTEST_F(ImageTransformTest, givenSurfaceBaseAddressAndUnifiedSurfaceWhenSetUnif
using ImageMultiRootDeviceTests = MultiRootDeviceFixture;
TEST_F(ImageMultiRootDeviceTests, WhenImageIsCreatedThenImageAllocationHostPtrForcedHasCorrectAlignment) {
std::unique_ptr<Image> image(ImageHelper<Image3dDefaults>::create(context.get()));
auto hostPtrForced = image->getAllocatedMapPtr();
ASSERT_NE(nullptr, hostPtrForced);
EXPECT_EQ(0u, (uintptr_t)hostPtrForced % MemoryConstants::pageSize);
}
TEST_F(ImageMultiRootDeviceTests, WhenImageIsCreatedThenImageAllocationHasCorrectRootDeviceIndex) {
std::unique_ptr<Image> image(ImageHelper<Image3dDefaults>::create(context.get()));