@@ -421,8 +421,6 @@ TEST_P(CommandQueueIndirectHeapTest, IndirectHeapContainsAtLeast64KB) {
421421 auto &indirectHeap = cmdQ.getIndirectHeap (this ->GetParam (), sizeof (uint32_t ));
422422 if (this ->GetParam () == IndirectHeap::SURFACE_STATE) {
423423 EXPECT_EQ (64 * KB - MemoryConstants::pageSize, indirectHeap.getAvailableSpace ());
424- } else if (this ->GetParam () == IndirectHeap::INSTRUCTION) {
425- EXPECT_EQ (optimalInstructionHeapSize, indirectHeap.getAvailableSpace ());
426424 } else {
427425 EXPECT_EQ (64 * KB, indirectHeap.getAvailableSpace ());
428426 }
@@ -478,9 +476,6 @@ TEST_P(CommandQueueIndirectHeapTest, MemoryManagerWithReusableAllocationsWhenAsk
478476
479477 auto memoryManager = pDevice->getMemoryManager ();
480478 auto allocationSize = defaultHeapSize * 2 ;
481- if (this ->GetParam () == IndirectHeap::INSTRUCTION) {
482- allocationSize = optimalInstructionHeapSize * 2 ;
483- }
484479
485480 auto allocation = memoryManager->allocateGraphicsMemory (allocationSize);
486481 memoryManager->storeAllocation (std::unique_ptr<GraphicsAllocation>(allocation), REUSABLE_ALLOCATION);
@@ -627,7 +622,6 @@ INSTANTIATE_TEST_CASE_P(
627622 IndirectHeap::DYNAMIC_STATE,
628623 IndirectHeap::GENERAL_STATE,
629624 IndirectHeap::INDIRECT_OBJECT,
630- IndirectHeap::INSTRUCTION,
631625 IndirectHeap::SURFACE_STATE));
632626
633627typedef Test<DeviceFixture> CommandQueueCSTest;
@@ -733,40 +727,6 @@ HWTEST_F(WaitForQueueCompletionTests, whenFinishIsCalledThenCallWaitWithoutQuick
733727 EXPECT_FALSE (cmdQ->requestedUseQuickKmdSleep );
734728}
735729
736- constexpr char sipPattern[] = {2 , 3 , 5 , 7 , 11 , 13 , 17 , 19 , 23 , 29 , 31 , 37 , 39 , 41 };
737- static_assert (false == isAligned<MemoryConstants::cacheLineSize>(sizeof (sipPattern)),
738- "Will be checking for automatic cacheline alignment, so pattern length must not be a multiple of cacheline");
739- constexpr size_t alignedPatternSize = alignUp(sizeof (sipPattern), MemoryConstants::cacheLineSize);
740-
741- TEST (CommandQueueGetIndirectHeap, whenNewInstructionHeapIsBeingCreatedThenCommandStreamReceiverCanReserveAMemoryBlockAtItsBegining) {
742- auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::create<MockDevice>(nullptr ));
743- MockCommandStreamReceiver *csr = new MockCommandStreamReceiver;
744- mockDevice->resetCommandStreamReceiver (csr);
745-
746- csr->instructionHeapReserveredData .assign (sipPattern, sipPattern + sizeof (sipPattern));
747- MockCommandQueue cmdQ{nullptr , mockDevice.get (), nullptr };
748- IndirectHeap &heap = cmdQ.getIndirectHeap (OCLRT::IndirectHeap::INSTRUCTION, 8192 );
749- EXPECT_LE (8192U , heap.getAvailableSpace ());
750- EXPECT_EQ (alignedPatternSize, heap.getUsed ());
751-
752- ASSERT_LE (sizeof (sipPattern), heap.getMaxAvailableSpace ());
753- char *reservedBlock = reinterpret_cast <char *>(heap.getCpuBase ());
754- auto dataFoundInReservedBlock = ArrayRef<char >(reservedBlock, sizeof (sipPattern));
755- auto expectedData = ArrayRef<char >(csr->instructionHeapReserveredData );
756- EXPECT_THAT (dataFoundInReservedBlock, testing::ContainerEq (expectedData));
757- }
758-
759- TEST (CommandQueueGetIndirectHeap, whenCheckingForCsrInstructionHeapReservedBlockSizeThenCachelineAlignmentIsExpected) {
760- auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::create<MockDevice>(nullptr ));
761- MockCommandStreamReceiver *csr = new MockCommandStreamReceiver;
762- mockDevice->resetCommandStreamReceiver (csr);
763- csr->instructionHeapReserveredData .assign (sipPattern, sipPattern + sizeof (sipPattern));
764- MockCommandQueue cmdQ{nullptr , mockDevice.get (), nullptr };
765-
766- EXPECT_GE (alignedPatternSize, csr->getInstructionHeapCmdStreamReceiverReservedSize ());
767- EXPECT_EQ (alignedPatternSize, cmdQ.getInstructionHeapReservedBlockSize ());
768- }
769-
770730TEST (CommandQueue, givenEnqueueAcquireSharedObjectsWhenNoObjectsThenReturnSuccess) {
771731 MockContext context;
772732 CommandQueue cmdQ (&context, nullptr , 0 );
0 commit comments