@@ -71,7 +71,7 @@ TEST(GmmGlTests, givenGmmWhenAskedforCubeFaceIndexThenProperValueIsReturned) {
7171TEST_F (GmmTests, WhenGmmIsCreatedThenAllResourceAreCreated) {
7272 std::unique_ptr<MemoryManager> mm (new MemoryManagerCreate<OsAgnosticMemoryManager>(false , false , *executionEnvironment));
7373 void *pSysMem = mm->allocateSystemMemory (4096 , 4096 );
74- std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), pSysMem, 4096 , false ));
74+ std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), pSysMem, 4096 , 0 , false ));
7575
7676 ASSERT_TRUE (gmm->gmmResourceInfo .get () != nullptr );
7777
@@ -86,7 +86,7 @@ TEST_F(GmmTests, GivenUncacheableWhenGmmIsCreatedThenAllResourceAreCreated) {
8686 std::unique_ptr<MemoryManager> mm (new MemoryManagerCreate<OsAgnosticMemoryManager>(false , false , *executionEnvironment));
8787 void *pSysMem = mm->allocateSystemMemory (4096 , 4096 );
8888
89- std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), pSysMem, 4096 , true ));
89+ std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), pSysMem, 4096 , 0 , true ));
9090
9191 ASSERT_TRUE (gmm->gmmResourceInfo .get () != nullptr );
9292
@@ -103,7 +103,7 @@ TEST_F(GmmTests, givenHostPointerWithHighestBitSetWhenGmmIsCreatedThenItHasTheSa
103103 auto address = reinterpret_cast <void *>(addressWithHighestBitSet);
104104 auto expectedAddress = castToUint64 (address);
105105
106- std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), address, 4096 , false ));
106+ std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), address, 4096 , 0 , false ));
107107 EXPECT_EQ (gmm->resourceParams .pExistingSysMem , expectedAddress);
108108}
109109
@@ -113,7 +113,7 @@ TEST_F(GmmTests, GivenBufferSizeLargerThenMaxPitchWhenAskedForGmmCreationThenGmm
113113 MemoryManager *mm = new MemoryManagerCreate<OsAgnosticMemoryManager>(false , false , *executionEnvironment);
114114 void *pSysMem = mm->allocateSystemMemory (4096 , 4096 );
115115
116- auto gmmRes = new Gmm (getGmmClientContext (), pSysMem, maxSize, false );
116+ auto gmmRes = new Gmm (getGmmClientContext (), pSysMem, maxSize, 0 , false );
117117
118118 ASSERT_TRUE (gmmRes->gmmResourceInfo .get () != nullptr );
119119
@@ -127,7 +127,7 @@ TEST_F(GmmTests, GivenBufferSizeLargerThenMaxPitchWhenAskedForGmmCreationThenGmm
127127TEST_F (GmmTests, givenGmmCreatedFromExistingGmmThenHelperDoesNotReleaseParentGmm) {
128128 auto size = 4096u ;
129129 void *incomingPtr = (void *)0x1000 ;
130- auto gmmRes = new Gmm (getGmmClientContext (), incomingPtr, size, false );
130+ auto gmmRes = new Gmm (getGmmClientContext (), incomingPtr, size, 0 , false );
131131 auto gmmRes2 = new Gmm (getGmmClientContext (), gmmRes->gmmResourceInfo ->peekHandle ());
132132
133133 // copy is being made
@@ -204,20 +204,20 @@ TEST_F(GmmTests, WhenQueryingImgParamsThenCorrectValuesAreReturned) {
204204TEST_F (GmmTests, givenWidthWhenCreatingResourceThenSetWidth64Field) {
205205 const void *dummyPtr = reinterpret_cast <void *>(0x123 );
206206 size_t allocationSize = std::numeric_limits<size_t >::max ();
207- Gmm gmm (getGmmClientContext (), dummyPtr, allocationSize, false );
207+ Gmm gmm (getGmmClientContext (), dummyPtr, allocationSize, 0 , false );
208208 EXPECT_EQ (static_cast <uint64_t >(allocationSize), gmm.resourceParams .BaseWidth64 );
209209}
210210
211211TEST_F (GmmTests, givenNullptrWhenGmmConstructorIsCalledThenNoGfxMemoryIsProperlySet) {
212212 void *pSysMem = nullptr ;
213- std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), pSysMem, 4096 , false ));
213+ std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), pSysMem, 4096 , 0 , false ));
214214
215215 EXPECT_EQ (gmm->resourceParams .NoGfxMemory , 1u );
216216}
217217
218218TEST_F (GmmTests, givenPtrWhenGmmConstructorIsCalledThenNoGfxMemoryIsProperlySet) {
219219 void *pSysMem = reinterpret_cast <void *>(0x1111 );
220- std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), pSysMem, 4096 , false ));
220+ std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), pSysMem, 4096 , 0 , false ));
221221
222222 EXPECT_EQ (gmm->resourceParams .NoGfxMemory , 0u );
223223}
@@ -432,7 +432,7 @@ struct GmmMediaCompressedTests : public GmmTests {
432432 void SetUp () override {
433433 GmmTests::SetUp ();
434434 StorageInfo info;
435- gmm = std::make_unique<Gmm>(getGmmClientContext (), nullptr , 4 , false , true , true , info);
435+ gmm = std::make_unique<Gmm>(getGmmClientContext (), nullptr , 4 , 0 , false , true , true , info);
436436 flags = gmm->gmmResourceInfo ->getResourceFlags ();
437437 flags->Gpu .CCS = true ;
438438 flags->Gpu .UnifiedAuxSurface = true ;
@@ -696,7 +696,7 @@ TEST_F(GmmTests, GivenPlaneWhenCopyingResourceBltThenResourceIsCopiedCorrectly)
696696}
697697
698698TEST_F (GmmTests, givenAllValidFlagsWhenAskedForUnifiedAuxTranslationCapabilityThenReturnTrue) {
699- auto gmm = std::unique_ptr<Gmm>(new Gmm (getGmmClientContext (), nullptr , 1 , false ));
699+ auto gmm = std::unique_ptr<Gmm>(new Gmm (getGmmClientContext (), nullptr , 1 , 0 , false ));
700700 auto mockResource = reinterpret_cast <MockGmmResourceInfo *>(gmm->gmmResourceInfo .get ());
701701
702702 mockResource->setUnifiedAuxTranslationCapable ();
@@ -707,8 +707,14 @@ TEST_F(GmmTests, givenAllValidFlagsWhenAskedForUnifiedAuxTranslationCapabilityTh
707707 EXPECT_TRUE (gmm->unifiedAuxTranslationCapable ());
708708}
709709
710+ TEST_F (GmmTests, givenAlignmentValueWhenConstructingGmmThenSetAlignmentInResourceCreateObject) {
711+ const uint32_t alignment = 8096 ;
712+ Gmm gmm{getGmmClientContext (), nullptr , 1 , alignment, false };
713+ EXPECT_EQ (alignment, gmm.resourceParams .BaseAlignment );
714+ }
715+
710716TEST_F (GmmTests, givenInvalidFlagsSetWhenAskedForUnifiedAuxTranslationCapabilityThenReturnFalse) {
711- auto gmm = std::unique_ptr<Gmm>(new Gmm (getGmmClientContext (), nullptr , 1 , false ));
717+ auto gmm = std::unique_ptr<Gmm>(new Gmm (getGmmClientContext (), nullptr , 1 , 0 , false ));
712718 auto mockResource = reinterpret_cast <MockGmmResourceInfo *>(gmm->gmmResourceInfo .get ());
713719
714720 mockResource->mockResourceCreateParams .Flags .Gpu .CCS = 0 ;
@@ -761,12 +767,12 @@ TEST_F(GmmTests, whenResourceIsCreatedThenHandleItsOwnership) {
761767using GmmEnvironmentTest = MockExecutionEnvironmentGmmFixtureTest;
762768
763769TEST_F (GmmEnvironmentTest, givenGmmWithNotSetMCSInResourceInfoGpuFlagsWhenCallHasMultisampleControlSurfaceThenReturnFalse) {
764- auto gmm = std::unique_ptr<Gmm>(new Gmm (getGmmClientContext (), nullptr , 1 , false ));
770+ auto gmm = std::unique_ptr<Gmm>(new Gmm (getGmmClientContext (), nullptr , 1 , 0 , false ));
765771 EXPECT_FALSE (gmm->hasMultisampleControlSurface ());
766772}
767773
768774TEST_F (GmmEnvironmentTest, givenGmmWithSetMCSInResourceInfoGpuFlagsWhenCallhasMultisampleControlSurfaceThenReturnTrue) {
769- auto gmm = std::unique_ptr<Gmm>(new Gmm (getGmmClientContext (), nullptr , 1 , false ));
775+ auto gmm = std::unique_ptr<Gmm>(new Gmm (getGmmClientContext (), nullptr , 1 , 0 , false ));
770776 auto mockResource = reinterpret_cast <MockGmmResourceInfo *>(gmm->gmmResourceInfo .get ());
771777 mockResource->setMultisampleControlSurface ();
772778 EXPECT_TRUE (gmm->hasMultisampleControlSurface ());
@@ -826,7 +832,7 @@ TEST(GmmHelperTest, givenValidGmmFunctionsWhenCreateGmmHelperWithoutOsInterfaceT
826832
827833using GmmCompressionTest = GmmTests;
828834TEST_F (GmmCompressionTest, givenEnabledAndPreferredE2ECWhenApplyingForBuffersThenSetValidFlags) {
829- std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), nullptr , 1 , false ));
835+ std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), nullptr , 1 , 0 , false ));
830836 gmm->resourceParams = {};
831837
832838 localPlatformDevice->capabilityTable .ftrRenderCompressedBuffers = true ;
@@ -840,7 +846,7 @@ TEST_F(GmmCompressionTest, givenEnabledAndPreferredE2ECWhenApplyingForBuffersThe
840846
841847TEST_F (GmmCompressionTest, givenDisabledE2ECAndEnabledDebugFlagWhenApplyingForBuffersThenSetValidFlags) {
842848 DebugManagerStateRestore restore;
843- Gmm gmm (getGmmClientContext (), nullptr , 1 , false );
849+ Gmm gmm (getGmmClientContext (), nullptr , 1 , 0 , false );
844850 gmm.resourceParams = {};
845851
846852 DebugManager.flags .RenderCompressedBuffersEnabled .set (1 );
@@ -865,7 +871,7 @@ TEST_F(GmmCompressionTest, givenDisabledE2ECAndEnabledDebugFlagWhenApplyingForBu
865871}
866872
867873TEST_F (GmmCompressionTest, givenEnabledAndNotPreferredE2ECWhenApplyingForBuffersThenDontSetValidFlags) {
868- std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), nullptr , 1 , false ));
874+ std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), nullptr , 1 , 0 , false ));
869875 gmm->resourceParams = {};
870876
871877 localPlatformDevice->capabilityTable .ftrRenderCompressedBuffers = true ;
@@ -878,7 +884,7 @@ TEST_F(GmmCompressionTest, givenEnabledAndNotPreferredE2ECWhenApplyingForBuffers
878884}
879885
880886TEST_F (GmmCompressionTest, givenDisabledAndPreferredE2ECWhenApplyingForBuffersThenDontSetValidFlags) {
881- std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), nullptr , 1 , false ));
887+ std::unique_ptr<Gmm> gmm (new Gmm (getGmmClientContext (), nullptr , 1 , 0 , false ));
882888 gmm->resourceParams = {};
883889
884890 localPlatformDevice->capabilityTable .ftrRenderCompressedBuffers = false ;
0 commit comments