Add method to set compression flag

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2021-06-08 16:37:54 +00:00
committed by Compute-Runtime-Automation
parent 8af9ca71d3
commit 3ed0f074af
40 changed files with 109 additions and 127 deletions

View File

@ -24,7 +24,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, givenRenderCompressedGmmWhenAskingForCpuOpe
auto rootDeviceIndex = context->getDevice(0)->getRootDeviceIndex();
std::unique_ptr<Buffer> buffer(Buffer::create(context, CL_MEM_READ_WRITE, 1, nullptr, retVal));
auto gmm = new Gmm(pDevice->getGmmClientContext(), nullptr, 1, 0, false);
gmm->isRenderCompressed = false;
gmm->isCompressionEnabled = false;
auto allocation = buffer->getGraphicsAllocation(rootDeviceIndex);
allocation->setDefaultGmm(gmm);
@ -34,7 +34,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, givenRenderCompressedGmmWhenAskingForCpuOpe
EXPECT_TRUE(buffer->isReadWriteOnCpuAllowed(*pDevice));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(unalignedPtr, 1, *pDevice));
gmm->isRenderCompressed = true;
gmm->isCompressionEnabled = true;
EXPECT_FALSE(buffer->isReadWriteOnCpuAllowed(*pDevice));
EXPECT_TRUE(buffer->isReadWriteOnCpuPreferred(unalignedPtr, 1, *pDevice));