Move memory for slm window to memory manager

remove redundant methods from MockDevice

Related-To: NEO-3007

Change-Id: I9cc819b9c9118dbb667f5bf87d1bf15787f9b67f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-08-27 15:26:30 +02:00
committed by sys_ocldev
parent 89824aa848
commit 18982bd016
15 changed files with 94 additions and 126 deletions

View File

@@ -147,17 +147,17 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, cpuCopyCriteriaMet) {
buffer.reset(Buffer::create(mockContext.get(), CL_MEM_USE_HOST_PTR, 1 * MB, smallBufferPtr, retVal));
// platform LP == true && size <= 10 MB
mockDevice->getDeviceInfoToModify()->platformLP = true;
mockDevice->deviceInfo.platformLP = true;
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(CL_TRUE, 0, smallBufferPtr, 1 * MB));
// platform LP == false && size <= 10 MB
mockDevice->getDeviceInfoToModify()->platformLP = false;
mockDevice->deviceInfo.platformLP = false;
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(CL_TRUE, 0, smallBufferPtr, 1 * MB));
buffer.reset(Buffer::create(mockContext.get(), CL_MEM_ALLOC_HOST_PTR, largeBufferSize, nullptr, retVal));
// platform LP == false && size > 10 MB
mockDevice->getDeviceInfoToModify()->platformLP = false;
mockDevice->deviceInfo.platformLP = false;
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(CL_TRUE, 0, buffer->getCpuAddress(), largeBufferSize));
alignedFree(smallBufferPtr);
@@ -198,7 +198,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, cpuCopyCriteriaNotMet) {
buffer.reset(Buffer::create(mockContext.get(), CL_MEM_ALLOC_HOST_PTR, largeBufferSize, nullptr, retVal));
// platform LP == true && size > 10 MB
mockDevice->getDeviceInfoToModify()->platformLP = true;
mockDevice->deviceInfo.platformLP = true;
EXPECT_FALSE(buffer->isReadWriteOnCpuAllowed(CL_TRUE, 0, buffer->getCpuAddress(), largeBufferSize));
alignedFree(alignedHostPtr);