@@ -668,15 +668,21 @@ HWTEST_F(WddmCommandStreamMockGdiTest, givenRecordedCommandBufferWhenItIsSubmitt
668
668
mockCsr->overrideSubmissionAggregator (mockedSubmissionsAggregator);
669
669
670
670
auto commandBuffer = memManager->allocateGraphicsMemory (1024 , 4096 );
671
+ auto dshAlloc = memManager->allocateGraphicsMemory (1024 , 4096 );
672
+ auto iohAlloc = memManager->allocateGraphicsMemory (1024 , 4096 );
673
+ auto sshAlloc = memManager->allocateGraphicsMemory (1024 , 4096 );
671
674
672
675
mockCsr->setTagAllocation (tagAllocation);
673
676
674
677
LinearStream cs (commandBuffer);
678
+ LinearStream dsh (dshAlloc);
679
+ LinearStream ioh (iohAlloc);
680
+ LinearStream ssh (sshAlloc);
675
681
676
682
DispatchFlags dispatchFlags;
677
683
dispatchFlags.guardCommandBufferWithPipeControl = true ;
678
684
dispatchFlags.requiresCoherency = true ;
679
- mockCsr->flushTask (cs, 0u , cs, cs, cs , 0u , dispatchFlags);
685
+ mockCsr->flushTask (cs, 0u , dsh, ioh, ssh , 0u , dispatchFlags);
680
686
681
687
auto &cmdBuffers = mockedSubmissionsAggregator->peekCommandBuffers ();
682
688
auto storedCommandBuffer = cmdBuffers.peekHead ();
@@ -692,11 +698,14 @@ HWTEST_F(WddmCommandStreamMockGdiTest, givenRecordedCommandBufferWhenItIsSubmitt
692
698
auto csrCommandStream = mockCsr->commandStream .getGraphicsAllocation ();
693
699
EXPECT_EQ (reinterpret_cast <uint64_t >(csrCommandStream->getUnderlyingBuffer ()), mockWddm->submitResult .commandBufferSubmitted );
694
700
EXPECT_TRUE (((COMMAND_BUFFER_HEADER *)mockWddm->submitResult .commandHeaderSubmitted )->RequiresCoherency );
695
- EXPECT_EQ (3u , mockWddm->makeResidentResult .handleCount );
701
+ EXPECT_EQ (6u , mockWddm->makeResidentResult .handleCount );
696
702
697
703
std::vector<D3DKMT_HANDLE> expectedHandles;
698
704
expectedHandles.push_back (((WddmAllocation *)tagAllocation)->handle );
699
705
expectedHandles.push_back (((WddmAllocation *)commandBuffer)->handle );
706
+ expectedHandles.push_back (((WddmAllocation *)dshAlloc)->handle );
707
+ expectedHandles.push_back (((WddmAllocation *)iohAlloc)->handle );
708
+ expectedHandles.push_back (((WddmAllocation *)sshAlloc)->handle );
700
709
expectedHandles.push_back (((WddmAllocation *)csrCommandStream)->handle );
701
710
702
711
for (auto i = 0u ; i < mockWddm->makeResidentResult .handleCount ; i++) {
@@ -712,8 +721,14 @@ HWTEST_F(WddmCommandStreamMockGdiTest, givenRecordedCommandBufferWhenItIsSubmitt
712
721
713
722
EXPECT_NE (trimListUnusedPosition, ((WddmAllocation *)tagAllocation)->getTrimCandidateListPosition ());
714
723
EXPECT_NE (trimListUnusedPosition, ((WddmAllocation *)commandBuffer)->getTrimCandidateListPosition ());
724
+ EXPECT_EQ (trimListUnusedPosition, ((WddmAllocation *)dshAlloc)->getTrimCandidateListPosition ());
725
+ EXPECT_EQ (trimListUnusedPosition, ((WddmAllocation *)iohAlloc)->getTrimCandidateListPosition ());
726
+ EXPECT_NE (trimListUnusedPosition, ((WddmAllocation *)sshAlloc)->getTrimCandidateListPosition ());
715
727
EXPECT_NE (trimListUnusedPosition, ((WddmAllocation *)csrCommandStream)->getTrimCandidateListPosition ());
716
728
729
+ memManager->freeGraphicsMemory (dshAlloc);
730
+ memManager->freeGraphicsMemory (iohAlloc);
731
+ memManager->freeGraphicsMemory (sshAlloc);
717
732
memManager->freeGraphicsMemory (commandBuffer);
718
733
}
719
734
0 commit comments