Pass execution environment to memory manager

Change-Id: If43cf9d1353b4cbc02ea269fb9105c01cc4e0876
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2018-10-01 16:10:54 +02:00
committed by sys_ocldev
parent 84865512cd
commit b602cd2bb8
59 changed files with 479 additions and 399 deletions

View File

@ -40,6 +40,7 @@ class D3D9Tests : public PlatformFixture, public ::testing::Test {
class MockMM : public OsAgnosticMemoryManager {
public:
MockMM(const ExecutionEnvironment &executionEnvironment) : OsAgnosticMemoryManager(false, false, const_cast<ExecutionEnvironment &>(executionEnvironment)){};
GraphicsAllocation *createGraphicsAllocationFromSharedHandle(osHandle handle, bool requireSpecificBitness) override {
auto alloc = OsAgnosticMemoryManager::createGraphicsAllocationFromSharedHandle(handle, requireSpecificBitness);
alloc->gmm = forceGmm;
@ -71,15 +72,16 @@ class D3D9Tests : public PlatformFixture, public ::testing::Test {
gmm = MockGmm::queryImgParams(imgInfo).release();
mockGmmResInfo = reinterpret_cast<NiceMock<MockGmmResourceInfo> *>(gmm->gmmResourceInfo.get());
mockMM.forceGmm = gmm;
mockMM->forceGmm = gmm;
}
void SetUp() override {
dbgRestore = new DebugManagerStateRestore();
PlatformFixture::SetUp();
mockMM = std::make_unique<NiceMock<MockMM>>(*pPlatform->peekExecutionEnvironment());
context = new MockContext(pPlatform->getDevice(0));
context->forcePreferD3dSharedResources(true);
context->setMemoryManager(&mockMM);
context->setMemoryManager(mockMM.get());
mockSharingFcns = new NiceMock<MockD3DSharingFunctions<D3D9>>();
context->setSharingFunctions(mockSharingFcns);
@ -98,7 +100,7 @@ class D3D9Tests : public PlatformFixture, public ::testing::Test {
void TearDown() override {
delete cmdQ;
delete context;
if (!mockMM.gmmOwnershipPassed) {
if (!mockMM->gmmOwnershipPassed) {
delete gmm;
}
PlatformFixture::TearDown();
@ -115,7 +117,7 @@ class D3D9Tests : public PlatformFixture, public ::testing::Test {
Gmm *gmm = nullptr;
NiceMock<MockGmmResourceInfo> *mockGmmResInfo = nullptr;
NiceMock<MockMM> mockMM;
std::unique_ptr<NiceMock<MockMM>> mockMM;
};
TEST_F(D3D9Tests, givenD3DDeviceParamWhenContextCreationThenSetProperValues) {
@ -518,9 +520,9 @@ TEST_F(D3D9Tests, acquireReleaseOnSharedResourceSurfaceAndEnabledInteropUserSync
EXPECT_CALL(*mockSharingFcns, getTexture2dDesc(_, _)).Times(1).WillOnce(SetArgPointee<0>(mockSharingFcns->mockTexture2dDesc));
EXPECT_CALL(*mockSharingFcns, getRenderTargetData(_, _)).Times(0);
EXPECT_CALL(*mockSharingFcns, lockRect(_, _, _)).Times(0);
EXPECT_CALL(mockMM, lockResource(_)).Times(0);
EXPECT_CALL(*mockMM, lockResource(_)).Times(0);
EXPECT_CALL(*mockGmmResInfo, cpuBlt(_)).Times(0);
EXPECT_CALL(mockMM, unlockResource(_)).Times(0);
EXPECT_CALL(*mockMM, unlockResource(_)).Times(0);
EXPECT_CALL(*mockSharingFcns, unlockRect(_)).Times(0);
EXPECT_CALL(*mockSharingFcns, flushAndWait(_)).Times(0);
EXPECT_CALL(*mockSharingFcns, updateSurface(_, _)).Times(0);
@ -547,9 +549,9 @@ TEST_F(D3D9Tests, acquireReleaseOnSharedResourceSurfaceAndDisabledInteropUserSyn
EXPECT_CALL(*mockSharingFcns, getTexture2dDesc(_, _)).Times(1).WillOnce(SetArgPointee<0>(mockSharingFcns->mockTexture2dDesc));
EXPECT_CALL(*mockSharingFcns, getRenderTargetData(_, _)).Times(0);
EXPECT_CALL(*mockSharingFcns, lockRect(_, _, _)).Times(0);
EXPECT_CALL(mockMM, lockResource(_)).Times(0);
EXPECT_CALL(*mockMM, lockResource(_)).Times(0);
EXPECT_CALL(*mockGmmResInfo, cpuBlt(_)).Times(0);
EXPECT_CALL(mockMM, unlockResource(_)).Times(0);
EXPECT_CALL(*mockMM, unlockResource(_)).Times(0);
EXPECT_CALL(*mockSharingFcns, unlockRect(_)).Times(0);
EXPECT_CALL(*mockSharingFcns, flushAndWait(_)).Times(1);
EXPECT_CALL(*mockSharingFcns, updateSurface(_, _)).Times(0);
@ -575,9 +577,9 @@ TEST_F(D3D9Tests, acquireReleaseOnSharedResourceSurfaceAndDisabledInteropUserSyn
EXPECT_CALL(*mockSharingFcns, getTexture2dDesc(_, _)).Times(1).WillOnce(SetArgPointee<0>(mockSharingFcns->mockTexture2dDesc));
EXPECT_CALL(*mockSharingFcns, getRenderTargetData(_, _)).Times(0);
EXPECT_CALL(*mockSharingFcns, lockRect(_, _, _)).Times(0);
EXPECT_CALL(mockMM, lockResource(_)).Times(0);
EXPECT_CALL(*mockMM, lockResource(_)).Times(0);
EXPECT_CALL(*mockGmmResInfo, cpuBlt(_)).Times(0);
EXPECT_CALL(mockMM, unlockResource(_)).Times(0);
EXPECT_CALL(*mockMM, unlockResource(_)).Times(0);
EXPECT_CALL(*mockSharingFcns, unlockRect(_)).Times(0);
EXPECT_CALL(*mockSharingFcns, flushAndWait(_)).Times(1);
EXPECT_CALL(*mockSharingFcns, updateSurface(_, _)).Times(0);
@ -611,7 +613,7 @@ TEST_F(D3D9Tests, acquireReleaseOnNonSharedResourceSurfaceAndLockable) {
EXPECT_CALL(*mockSharingFcns, getRenderTargetData(_, _)).Times(0);
EXPECT_CALL(*mockSharingFcns, lockRect((IDirect3DSurface9 *)&dummyD3DSurface, _, D3DLOCK_READONLY)).Times(1).WillOnce(SetArgPointee<1>(lockedRect));
EXPECT_CALL(mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
EXPECT_CALL(*mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
GMM_RES_COPY_BLT requestedResCopyBlt = {};
GMM_RES_COPY_BLT expectedResCopyBlt = {};
@ -622,7 +624,7 @@ TEST_F(D3D9Tests, acquireReleaseOnNonSharedResourceSurfaceAndLockable) {
expectedResCopyBlt.Sys.BufferSize = lockedRect.Pitch * imgHeight;
EXPECT_CALL(*mockGmmResInfo, cpuBlt(_)).Times(1).WillOnce(::testing::Invoke([&](GMM_RES_COPY_BLT *arg) {requestedResCopyBlt = *arg; return 1; }));
EXPECT_CALL(mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockSharingFcns, unlockRect((IDirect3DSurface9 *)&dummyD3DSurface)).Times(1);
EXPECT_CALL(*mockSharingFcns, flushAndWait(_)).Times(1);
@ -631,13 +633,13 @@ TEST_F(D3D9Tests, acquireReleaseOnNonSharedResourceSurfaceAndLockable) {
EXPECT_TRUE(memcmp(&requestedResCopyBlt, &expectedResCopyBlt, sizeof(GMM_RES_COPY_BLT)) == 0);
EXPECT_CALL(*mockSharingFcns, lockRect((IDirect3DSurface9 *)&dummyD3DSurface, _, 0u)).Times(1).WillOnce(SetArgPointee<1>(lockedRect));
EXPECT_CALL(mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
EXPECT_CALL(*mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
requestedResCopyBlt = {};
expectedResCopyBlt.Blt.Upload = 0;
EXPECT_CALL(*mockGmmResInfo, cpuBlt(_)).Times(1).WillOnce(::testing::Invoke([&](GMM_RES_COPY_BLT *arg) {requestedResCopyBlt = *arg; return 1; }));
EXPECT_CALL(mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockSharingFcns, unlockRect((IDirect3DSurface9 *)&dummyD3DSurface)).Times(1);
EXPECT_CALL(*mockSharingFcns, updateSurface(_, _)).Times(0);
@ -663,7 +665,7 @@ TEST_F(D3D9Tests, acquireReleaseOnNonSharedResourceSurfaceAndLockableIntel) {
EXPECT_CALL(*mockSharingFcns, getRenderTargetData(_, _)).Times(0);
EXPECT_CALL(*mockSharingFcns, lockRect((IDirect3DSurface9 *)&dummyD3DSurface, _, D3DLOCK_READONLY)).Times(1).WillOnce(SetArgPointee<1>(lockedRect));
EXPECT_CALL(mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
EXPECT_CALL(*mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
GMM_RES_COPY_BLT requestedResCopyBlt = {};
GMM_RES_COPY_BLT expectedResCopyBlt = {};
@ -674,7 +676,7 @@ TEST_F(D3D9Tests, acquireReleaseOnNonSharedResourceSurfaceAndLockableIntel) {
expectedResCopyBlt.Sys.BufferSize = lockedRect.Pitch * imgHeight;
EXPECT_CALL(*mockGmmResInfo, cpuBlt(_)).Times(1).WillOnce(::testing::Invoke([&](GMM_RES_COPY_BLT *arg) {requestedResCopyBlt = *arg; return 1; }));
EXPECT_CALL(mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockSharingFcns, unlockRect((IDirect3DSurface9 *)&dummyD3DSurface)).Times(1);
EXPECT_CALL(*mockSharingFcns, flushAndWait(_)).Times(1);
@ -683,13 +685,13 @@ TEST_F(D3D9Tests, acquireReleaseOnNonSharedResourceSurfaceAndLockableIntel) {
EXPECT_TRUE(memcmp(&requestedResCopyBlt, &expectedResCopyBlt, sizeof(GMM_RES_COPY_BLT)) == 0);
EXPECT_CALL(*mockSharingFcns, lockRect((IDirect3DSurface9 *)&dummyD3DSurface, _, 0u)).Times(1).WillOnce(SetArgPointee<1>(lockedRect));
EXPECT_CALL(mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
EXPECT_CALL(*mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
requestedResCopyBlt = {};
expectedResCopyBlt.Blt.Upload = 0;
EXPECT_CALL(*mockGmmResInfo, cpuBlt(_)).Times(1).WillOnce(::testing::Invoke([&](GMM_RES_COPY_BLT *arg) {requestedResCopyBlt = *arg; return 1; }));
EXPECT_CALL(mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockSharingFcns, unlockRect((IDirect3DSurface9 *)&dummyD3DSurface)).Times(1);
EXPECT_CALL(*mockSharingFcns, updateSurface(_, _)).Times(0);
@ -717,7 +719,7 @@ TEST_F(D3D9Tests, acquireReleaseOnNonSharedResourceSurfaceAndNonLockable) {
EXPECT_CALL(*mockSharingFcns, getRenderTargetData((IDirect3DSurface9 *)&dummyD3DSurface, (IDirect3DSurface9 *)&dummyD3DSurfaceStaging)).Times(1);
EXPECT_CALL(*mockSharingFcns, lockRect((IDirect3DSurface9 *)&dummyD3DSurfaceStaging, _, D3DLOCK_READONLY)).Times(1).WillOnce(SetArgPointee<1>(lockedRect));
EXPECT_CALL(mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
EXPECT_CALL(*mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
GMM_RES_COPY_BLT requestedResCopyBlt = {};
GMM_RES_COPY_BLT expectedResCopyBlt = {};
@ -728,7 +730,7 @@ TEST_F(D3D9Tests, acquireReleaseOnNonSharedResourceSurfaceAndNonLockable) {
expectedResCopyBlt.Sys.BufferSize = lockedRect.Pitch * imgHeight;
EXPECT_CALL(*mockGmmResInfo, cpuBlt(_)).Times(1).WillOnce(::testing::Invoke([&](GMM_RES_COPY_BLT *arg) {requestedResCopyBlt = *arg; return 1; }));
EXPECT_CALL(mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockSharingFcns, unlockRect((IDirect3DSurface9 *)&dummyD3DSurfaceStaging)).Times(1);
EXPECT_CALL(*mockSharingFcns, flushAndWait(_)).Times(1);
@ -737,13 +739,13 @@ TEST_F(D3D9Tests, acquireReleaseOnNonSharedResourceSurfaceAndNonLockable) {
EXPECT_TRUE(memcmp(&requestedResCopyBlt, &expectedResCopyBlt, sizeof(GMM_RES_COPY_BLT)) == 0);
EXPECT_CALL(*mockSharingFcns, lockRect((IDirect3DSurface9 *)&dummyD3DSurfaceStaging, _, 0)).Times(1).WillOnce(SetArgPointee<1>(lockedRect));
EXPECT_CALL(mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
EXPECT_CALL(*mockMM, lockResource(sharedImg->getGraphicsAllocation())).Times(1).WillOnce(::testing::Return(returnedLockedRes));
requestedResCopyBlt = {};
expectedResCopyBlt.Blt.Upload = 0;
EXPECT_CALL(*mockGmmResInfo, cpuBlt(_)).Times(1).WillOnce(::testing::Invoke([&](GMM_RES_COPY_BLT *arg) {requestedResCopyBlt = *arg; return 1; }));
EXPECT_CALL(mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockMM, unlockResource(sharedImg->getGraphicsAllocation())).Times(1);
EXPECT_CALL(*mockSharingFcns, unlockRect((IDirect3DSurface9 *)&dummyD3DSurfaceStaging)).Times(1);
EXPECT_CALL(*mockSharingFcns, updateSurface((IDirect3DSurface9 *)&dummyD3DSurfaceStaging, (IDirect3DSurface9 *)&dummyD3DSurface)).Times(1);

View File

@ -56,6 +56,7 @@ class D3DTests : public PlatformFixture, public ::testing::Test {
class MockMM : public OsAgnosticMemoryManager {
public:
using OsAgnosticMemoryManager::OsAgnosticMemoryManager;
GraphicsAllocation *createGraphicsAllocationFromSharedHandle(osHandle handle, bool requireSpecificBitness) override {
auto alloc = OsAgnosticMemoryManager::createGraphicsAllocationFromSharedHandle(handle, requireSpecificBitness);
alloc->gmm = forceGmm;
@ -88,7 +89,7 @@ class D3DTests : public PlatformFixture, public ::testing::Test {
gmm = MockGmm::queryImgParams(imgInfo).release();
mockGmmResInfo = reinterpret_cast<NiceMock<MockGmmResourceInfo> *>(gmm->gmmResourceInfo.get());
mockMM.forceGmm = gmm;
mockMM->forceGmm = gmm;
}
void SetUp() override {
@ -96,10 +97,11 @@ class D3DTests : public PlatformFixture, public ::testing::Test {
PlatformFixture::SetUp();
context = new MockContext(pPlatform->getDevice(0));
context->forcePreferD3dSharedResources(true);
mockMM = std::make_unique<MockMM>(false, false, *context->getDevice(0)->getExecutionEnvironment());
mockSharingFcns = new NiceMock<MockD3DSharingFunctions<T>>();
context->setSharingFunctions(mockSharingFcns);
context->setMemoryManager(&mockMM);
context->setMemoryManager(mockMM.get());
cmdQ = new MockCommandQueue(context, context->getDevice(0), 0);
DebugManager.injectFcn = &mockSharingFcns->mockGetDxgiDesc;
@ -122,7 +124,7 @@ class D3DTests : public PlatformFixture, public ::testing::Test {
void TearDown() override {
delete cmdQ;
delete context;
if (!mockMM.gmmOwnershipPassed) {
if (!mockMM->gmmOwnershipPassed) {
delete gmm;
}
PlatformFixture::TearDown();
@ -198,7 +200,7 @@ class D3DTests : public PlatformFixture, public ::testing::Test {
NiceMock<MockGmmResourceInfo> *mockGmmResInfo = nullptr;
DebugManagerStateRestore *dbgRestore;
MockMM mockMM;
std::unique_ptr<MockMM> mockMM;
uint8_t d3dMode = 0;
};
@ -1328,7 +1330,7 @@ TYPED_TEST_P(D3DAuxTests, given2dSharableTextureWithUnifiedAuxFlagsWhenCreatingT
auto image = std::unique_ptr<Image>(D3DTexture<TypeParam>::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 4, nullptr));
ASSERT_NE(nullptr, image.get());
EXPECT_EQ(1u, mockMM.mapAuxGpuVACalled);
EXPECT_EQ(1u, mockMM->mapAuxGpuVACalled);
EXPECT_TRUE(gmm->isRenderCompressed);
}
@ -1340,11 +1342,11 @@ TYPED_TEST_P(D3DAuxTests, given2dSharableTextureWithUnifiedAuxFlagsWhenFailOnAux
mockGmmResInfo->setUnifiedAuxTranslationCapable();
EXPECT_CALL(*this->mockSharingFcns, getTexture2dDesc(_, _)).Times(1).WillOnce(SetArgPointee<0>(this->mockSharingFcns->mockTexture2dDesc));
mockMM.mapAuxGpuVaRetValue = false;
mockMM->mapAuxGpuVaRetValue = false;
auto image = std::unique_ptr<Image>(D3DTexture<TypeParam>::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 4, nullptr));
ASSERT_NE(nullptr, image.get());
EXPECT_EQ(1u, mockMM.mapAuxGpuVACalled);
EXPECT_EQ(1u, mockMM->mapAuxGpuVACalled);
EXPECT_FALSE(gmm->isRenderCompressed);
}
@ -1360,7 +1362,7 @@ TYPED_TEST_P(D3DAuxTests, given2dSharableTextureWithoutUnifiedAuxFlagsWhenCreati
auto image = std::unique_ptr<Image>(D3DTexture<TypeParam>::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 4, nullptr));
ASSERT_NE(nullptr, image.get());
EXPECT_EQ(0u, mockMM.mapAuxGpuVACalled);
EXPECT_EQ(0u, mockMM->mapAuxGpuVACalled);
EXPECT_FALSE(gmm->isRenderCompressed);
}
@ -1372,7 +1374,7 @@ TYPED_TEST_P(D3DAuxTests, given2dNonSharableTextureWithUnifiedAuxFlagsWhenCreati
auto image = std::unique_ptr<Image>(D3DTexture<TypeParam>::create2d(this->context, (D3DTexture2d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr));
ASSERT_NE(nullptr, image.get());
EXPECT_EQ(1u, mockMM.mapAuxGpuVACalled);
EXPECT_EQ(1u, mockMM->mapAuxGpuVACalled);
EXPECT_TRUE(gmm->isRenderCompressed);
}
@ -1385,7 +1387,7 @@ TYPED_TEST_P(D3DAuxTests, given3dSharableTextureWithUnifiedAuxFlagsWhenCreatingT
std::unique_ptr<Image> image(D3DTexture<TypeParam>::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr));
ASSERT_NE(nullptr, image.get());
EXPECT_EQ(1u, mockMM.mapAuxGpuVACalled);
EXPECT_EQ(1u, mockMM->mapAuxGpuVACalled);
EXPECT_TRUE(gmm->isRenderCompressed);
}
@ -1395,11 +1397,11 @@ TYPED_TEST_P(D3DAuxTests, given3dSharableTextureWithUnifiedAuxFlagsWhenFailOnAux
mockGmmResInfo->setUnifiedAuxTranslationCapable();
EXPECT_CALL(*this->mockSharingFcns, getTexture3dDesc(_, _)).Times(1).WillOnce(SetArgPointee<0>(this->mockSharingFcns->mockTexture3dDesc));
mockMM.mapAuxGpuVaRetValue = false;
mockMM->mapAuxGpuVaRetValue = false;
std::unique_ptr<Image> image(D3DTexture<TypeParam>::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr));
ASSERT_NE(nullptr, image.get());
EXPECT_EQ(1u, mockMM.mapAuxGpuVACalled);
EXPECT_EQ(1u, mockMM->mapAuxGpuVACalled);
EXPECT_FALSE(gmm->isRenderCompressed);
}
@ -1413,7 +1415,7 @@ TYPED_TEST_P(D3DAuxTests, given3dSharableTextureWithoutUnifiedAuxFlagsWhenCreati
std::unique_ptr<Image> image(D3DTexture<TypeParam>::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr));
ASSERT_NE(nullptr, image.get());
EXPECT_EQ(0u, mockMM.mapAuxGpuVACalled);
EXPECT_EQ(0u, mockMM->mapAuxGpuVACalled);
EXPECT_FALSE(gmm->isRenderCompressed);
}
@ -1425,7 +1427,7 @@ TYPED_TEST_P(D3DAuxTests, given3dNonSharableTextureWithUnifiedAuxFlagsWhenCreati
std::unique_ptr<Image> image(D3DTexture<TypeParam>::create3d(this->context, (D3DTexture3d *)&this->dummyD3DTexture, CL_MEM_READ_WRITE, 1, nullptr));
ASSERT_NE(nullptr, image.get());
EXPECT_EQ(1u, mockMM.mapAuxGpuVACalled);
EXPECT_EQ(1u, mockMM->mapAuxGpuVACalled);
EXPECT_TRUE(gmm->isRenderCompressed);
}