diff --git a/runtime/command_queue/dispatch_walker.h b/runtime/command_queue/dispatch_walker.h index 22f9e2d346..5541624893 100644 --- a/runtime/command_queue/dispatch_walker.h +++ b/runtime/command_queue/dispatch_walker.h @@ -579,8 +579,6 @@ void dispatchWalker( auto offsetCrossThreadData = KernelCommandsHelper::sendIndirectState( *commandStream, *dsh, - *ish, - cmdQInstructionHeapReservedBlockSize, *ioh, *ssh, kernel, @@ -750,8 +748,6 @@ void dispatchScheduler( auto offsetCrossThreadData = KernelCommandsHelper::sendIndirectState( *commandStream, *dsh, - *ish, - 0, *ioh, *ssh, scheduler, diff --git a/runtime/command_queue/enqueue_common.h b/runtime/command_queue/enqueue_common.h index 740999342f..b9b8a8b612 100644 --- a/runtime/command_queue/enqueue_common.h +++ b/runtime/command_queue/enqueue_common.h @@ -568,7 +568,6 @@ CompletionStamp CommandQueueHw::enqueueNonBlocked( commandStream, commandStreamStart, *dsh, - getIndirectHeap(IndirectHeap::INSTRUCTION), *ioh, getIndirectHeap(IndirectHeap::SURFACE_STATE), taskLevel, diff --git a/runtime/command_stream/command_stream_receiver.h b/runtime/command_stream/command_stream_receiver.h index d5d5d3372f..84f3ccdc32 100644 --- a/runtime/command_stream/command_stream_receiver.h +++ b/runtime/command_stream/command_stream_receiver.h @@ -60,8 +60,7 @@ class CommandStreamReceiver { virtual FlushStamp flush(BatchBuffer &batchBuffer, EngineType engineType, ResidencyContainer *allocationsForResidency) = 0; virtual CompletionStamp flushTask(LinearStream &commandStream, size_t commandStreamStart, - const LinearStream &dsh, const LinearStream &ih, - const LinearStream &ioh, const LinearStream &ssh, + const LinearStream &dsh, const LinearStream &ioh, const LinearStream &ssh, uint32_t taskLevel, DispatchFlags &dispatchFlags) = 0; virtual void flushBatchedSubmissions() = 0; diff --git a/runtime/command_stream/command_stream_receiver_hw.h b/runtime/command_stream/command_stream_receiver_hw.h index 28e10a08a6..6c0ed6b316 100644 --- a/runtime/command_stream/command_stream_receiver_hw.h +++ b/runtime/command_stream/command_stream_receiver_hw.h @@ -46,8 +46,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { FlushStamp flush(BatchBuffer &batchBuffer, EngineType engineType, ResidencyContainer *allocationsForResidency) override; CompletionStamp flushTask(LinearStream &commandStream, size_t commandStreamStart, - const LinearStream &dsh, const LinearStream &ih, - const LinearStream &ioh, const LinearStream &ssh, + const LinearStream &dsh, const LinearStream &ioh, const LinearStream &ssh, uint32_t taskLevel, DispatchFlags &dispatchFlags) override; void flushBatchedSubmissions() override; @@ -72,10 +71,10 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { uint64_t baseAddress, uint64_t commandOffset, const LinearStream &dsh, - const LinearStream &ih, const LinearStream &ioh, const LinearStream &ssh, - uint64_t generalStateBase); + uint64_t generalStateBase, + uint64_t internalHeapBaseAddress); protected: void programPreemption(LinearStream &csr, DispatchFlags &dispatchFlags); @@ -96,7 +95,6 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { static void emitNoop(LinearStream &commandStream, size_t bytesToUpdate); HeapDirtyState dshState; - HeapDirtyState ihState; HeapDirtyState iohState; HeapDirtyState sshState; diff --git a/runtime/command_stream/command_stream_receiver_hw.inl b/runtime/command_stream/command_stream_receiver_hw.inl index 986d21b202..a6dd5af56f 100644 --- a/runtime/command_stream/command_stream_receiver_hw.inl +++ b/runtime/command_stream/command_stream_receiver_hw.inl @@ -109,7 +109,6 @@ CompletionStamp CommandStreamReceiverHw::flushTask( LinearStream &commandStreamTask, size_t commandStreamStartTask, const LinearStream &dsh, - const LinearStream &ih, const LinearStream &ioh, const LinearStream &ssh, uint32_t taskLevel, @@ -229,11 +228,10 @@ CompletionStamp CommandStreamReceiverHw::flushTask( programVFEState(commandStreamCSR, dispatchFlags); bool dshDirty = dshState.updateAndCheck(&dsh); - bool ihDirty = ihState.updateAndCheck(&ih); bool iohDirty = iohState.updateAndCheck(&ioh); bool sshDirty = sshState.updateAndCheck(&ssh); - auto isStateBaseAddressDirty = dshDirty || ihDirty || iohDirty || sshDirty || stateBaseAddressDirty; + auto isStateBaseAddressDirty = dshDirty || iohDirty || sshDirty || stateBaseAddressDirty; auto requiredL3Index = CacheSettings::l3CacheOn; if (this->disableL3Cache) { @@ -265,16 +263,16 @@ CompletionStamp CommandStreamReceiverHw::flushTask( StateBaseAddressHelper::programStateBaseAddress( commandStreamCSR, dsh, - ih, ioh, ssh, newGSHbase, - requiredL3Index); + requiredL3Index, + memoryManager->getInternalHeapBaseAddress()); latestSentStatelessMocsConfig = requiredL3Index; if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) { - collectStateBaseAddresPatchInfo(commandStream.getGpuBase(), stateBaseAddressCmdOffset, dsh, ih, ioh, ssh, newGSHbase); + collectStateBaseAddresPatchInfo(commandStream.getGpuBase(), stateBaseAddressCmdOffset, dsh, ioh, ssh, newGSHbase, memoryManager->getInternalHeapBaseAddress()); } } @@ -299,12 +297,10 @@ CompletionStamp CommandStreamReceiverHw::flushTask( } auto dshAllocation = dsh.getGraphicsAllocation(); - auto ihAllocation = ih.getGraphicsAllocation(); auto iohAllocation = ioh.getGraphicsAllocation(); auto sshAllocation = ssh.getGraphicsAllocation(); this->makeResident(*dshAllocation); - this->makeResident(*ihAllocation); this->makeResident(*iohAllocation); this->makeResident(*sshAllocation); @@ -650,10 +646,10 @@ void CommandStreamReceiverHw::collectStateBaseAddresPatchInfo( uint64_t baseAddress, uint64_t commandOffset, const LinearStream &dsh, - const LinearStream &ih, const LinearStream &ioh, const LinearStream &ssh, - uint64_t generalStateBase) { + uint64_t generalStateBase, + uint64_t internalHeapOffset) { typedef typename GfxFamily::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; @@ -661,7 +657,7 @@ void CommandStreamReceiverHw::collectStateBaseAddresPatchInfo( PatchInfoData generalStatePatchInfo = {generalStateBase, 0u, PatchInfoAllocationType::GeneralStateHeap, baseAddress, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::GENERALSTATEBASEADDRESS_BYTEOFFSET, PatchInfoAllocationType::Default}; PatchInfoData surfaceStatePatchInfo = {ssh.getGpuBase(), 0u, PatchInfoAllocationType::SurfaceStateHeap, baseAddress, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::SURFACESTATEBASEADDRESS_BYTEOFFSET, PatchInfoAllocationType::Default}; PatchInfoData indirectObjectPatchInfo = {ioh.getGpuBase(), 0u, PatchInfoAllocationType::IndirectObjectHeap, baseAddress, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::INDIRECTOBJECTBASEADDRESS_BYTEOFFSET, PatchInfoAllocationType::Default}; - PatchInfoData instructionPatchInfo = {ih.getGpuBase(), 0u, PatchInfoAllocationType::InstructionHeap, baseAddress, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::INSTRUCTIONBASEADDRESS_BYTEOFFSET, PatchInfoAllocationType::Default}; + PatchInfoData instructionPatchInfo = {internalHeapOffset, 0u, PatchInfoAllocationType::InstructionHeap, baseAddress, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::INSTRUCTIONBASEADDRESS_BYTEOFFSET, PatchInfoAllocationType::Default}; setPatchInfoData(dynamicStatePatchInfo); setPatchInfoData(generalStatePatchInfo); diff --git a/runtime/device_queue/device_queue_hw.inl b/runtime/device_queue/device_queue_hw.inl index edd31f69d2..dcb53325c7 100644 --- a/runtime/device_queue/device_queue_hw.inl +++ b/runtime/device_queue/device_queue_hw.inl @@ -325,6 +325,11 @@ void DeviceQueueHw::setupIndirectState(IndirectHeap &instructionHeap, for (uint32_t i = 0; i < blockCount; i++) { const KernelInfo *pBlockInfo = blockManager->getBlockKernelInfo(i); + auto blockAllocation = pBlockInfo->getGraphicsAllocation(); + DEBUG_BREAK_IF(!blockAllocation); + + auto gpuAddress = blockAllocation ? blockAllocation->getGpuAddressToPatch() : 0llu; + auto bindingTableCount = pBlockInfo->patchInfo.bindingTableState->Count; maxBindingTableCount = std::max(maxBindingTableCount, bindingTableCount); @@ -336,17 +341,14 @@ void DeviceQueueHw::setupIndirectState(IndirectHeap &instructionHeap, // Determine SIMD size uint32_t simd = pBlockInfo->getMaxSimdSize(); - // Copy the kernel over to the ISH - uint64_t kernelStartOffset = (uint64_t)KernelCommandsHelper::copyKernelBinary(instructionHeap, *pBlockInfo); - DEBUG_BREAK_IF(pBlockInfo->patchInfo.interfaceDescriptorData == nullptr); uint32_t idOffset = pBlockInfo->patchInfo.interfaceDescriptorData->Offset; const INTERFACE_DESCRIPTOR_DATA *pBlockID = static_cast(ptrOffset(pBlockInfo->heapInfo.pDsh, idOffset)); pIDDestination[blockIndex + i] = *pBlockID; - pIDDestination[blockIndex + i].setKernelStartPointerHigh(kernelStartOffset >> 32); - pIDDestination[blockIndex + i].setKernelStartPointer((uint32_t)kernelStartOffset); + pIDDestination[blockIndex + i].setKernelStartPointerHigh(gpuAddress >> 32); + pIDDestination[blockIndex + i].setKernelStartPointer((uint32_t)gpuAddress); pIDDestination[blockIndex + i].setBarrierEnable(pBlockInfo->patchInfo.executionEnvironment->HasBarriers > 0); pIDDestination[blockIndex + i].setDenormMode(INTERFACE_DESCRIPTOR_DATA::DENORM_MODE_SETBYKERNEL); diff --git a/runtime/helpers/kernel_commands.h b/runtime/helpers/kernel_commands.h index 1cede72118..46bd8201c2 100644 --- a/runtime/helpers/kernel_commands.h +++ b/runtime/helpers/kernel_commands.h @@ -45,10 +45,6 @@ struct KernelCommandsHelper : public PerThreadDataHelper { static uint32_t computeSlmValues(uint32_t valueIn); - static size_t copyKernelBinary( - IndirectHeap &indirectHeap, - const KernelInfo &kernelInfo); - static size_t sendInterfaceDescriptorData( const IndirectHeap &indirectHeap, uint64_t offsetInterfaceDescriptor, @@ -96,8 +92,6 @@ struct KernelCommandsHelper : public PerThreadDataHelper { static size_t sendIndirectState( LinearStream &commandStream, IndirectHeap &dsh, - IndirectHeap &ih, - size_t ihReservedBlockSize, IndirectHeap &ioh, IndirectHeap &ssh, Kernel &kernel, diff --git a/runtime/helpers/kernel_commands.inl b/runtime/helpers/kernel_commands.inl index e87e5bc13d..5899bb8150 100644 --- a/runtime/helpers/kernel_commands.inl +++ b/runtime/helpers/kernel_commands.inl @@ -144,24 +144,6 @@ size_t KernelCommandsHelper::getTotalSizeRequiredSSH( return getSizeRequired(multiDispatchInfo, [](const DispatchInfo &dispatchInfo) { return getSizeRequiredSSH(*dispatchInfo.getKernel()); }); } -template -size_t KernelCommandsHelper::copyKernelBinary( - IndirectHeap &indirectHeap, - const KernelInfo &kernelInfo) { - const auto alignKernelBinary = 64 * sizeof(uint8_t); - indirectHeap.align(alignKernelBinary); - - auto kernelStartOffset = indirectHeap.getUsed(); - - auto pKernelHeap = kernelInfo.heapInfo.pKernelHeap; - auto kernelHeapSize = kernelInfo.heapInfo.pKernelHeader->KernelHeapSize; - - auto pKernelDataDst = indirectHeap.getSpace(kernelHeapSize); - memcpy_s(pKernelDataDst, kernelHeapSize, pKernelHeap, kernelHeapSize); - - return kernelStartOffset; -} - template size_t KernelCommandsHelper::sendInterfaceDescriptorData( const IndirectHeap &indirectHeap, @@ -331,8 +313,6 @@ template size_t KernelCommandsHelper::sendIndirectState( LinearStream &commandStream, IndirectHeap &dsh, - IndirectHeap &ih, - size_t ihReservedBlockSize, IndirectHeap &ioh, IndirectHeap &ssh, Kernel &kernel, @@ -349,9 +329,14 @@ size_t KernelCommandsHelper::sendIndirectState( DEBUG_BREAK_IF(simd != 8 && simd != 16 && simd != 32); // Copy the kernel over to the ISH - auto kernelStartOffset = copyKernelBinary(ih, kernel.getKernelInfo()); - + auto kernelStartOffset = 0llu; const auto &kernelInfo = kernel.getKernelInfo(); + auto kernelAllocation = kernelInfo.getGraphicsAllocation(); + DEBUG_BREAK_IF(!kernelAllocation); + if (kernelAllocation) { + kernelStartOffset = kernelInfo.getGraphicsAllocation()->getGpuAddressToPatch(); + } + const auto &patchInfo = kernelInfo.patchInfo; auto dstBindingTablePointer = pushBindingTableAndSurfaceStates(ssh, kernel); @@ -416,7 +401,7 @@ size_t KernelCommandsHelper::sendIndirectState( KernelCommandsHelper::sendInterfaceDescriptorData( dsh, offsetInterfaceDescriptor, - kernelStartOffset + ihReservedBlockSize, + kernelStartOffset, kernel.getCrossThreadDataSize(), sizePerThreadData, dstBindingTablePointer, diff --git a/runtime/helpers/state_base_address.h b/runtime/helpers/state_base_address.h index b27527b523..0d475afe19 100644 --- a/runtime/helpers/state_base_address.h +++ b/runtime/helpers/state_base_address.h @@ -32,10 +32,10 @@ struct StateBaseAddressHelper { static void programStateBaseAddress( LinearStream &commandStream, const LinearStream &dsh, - const LinearStream &ih, const LinearStream &ioh, const LinearStream &ssh, uint64_t generalStateBase, - uint32_t statelessMocsIndex); + uint32_t statelessMocsIndex, + uint64_t internalHeapBase); }; } diff --git a/runtime/helpers/state_base_address.inl b/runtime/helpers/state_base_address.inl index f367944722..a8b0bef316 100644 --- a/runtime/helpers/state_base_address.inl +++ b/runtime/helpers/state_base_address.inl @@ -31,11 +31,11 @@ template void StateBaseAddressHelper::programStateBaseAddress( LinearStream &commandStream, const LinearStream &dsh, - const LinearStream &ih, const LinearStream &ioh, const LinearStream &ssh, uint64_t generalStateBase, - uint32_t statelessMocsIndex) { + uint32_t statelessMocsIndex, + uint64_t internalHeapBase) { typedef typename GfxFamily::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; auto pCmd = (STATE_BASE_ADDRESS *)commandStream.getSpace(sizeof(STATE_BASE_ADDRESS)); @@ -52,7 +52,7 @@ void StateBaseAddressHelper::programStateBaseAddress( pCmd->setGeneralStateBaseAddress(generalStateBase); pCmd->setSurfaceStateBaseAddress(reinterpret_cast(ssh.getCpuBase())); pCmd->setIndirectObjectBaseAddress(reinterpret_cast(ioh.getCpuBase())); - pCmd->setInstructionBaseAddress(reinterpret_cast(ih.getCpuBase())); + pCmd->setInstructionBaseAddress(internalHeapBase); pCmd->setDynamicStateBufferSizeModifyEnable(true); pCmd->setGeneralStateBufferSizeModifyEnable(true); @@ -62,7 +62,8 @@ void StateBaseAddressHelper::programStateBaseAddress( pCmd->setDynamicStateBufferSize(static_cast((dsh.getMaxAvailableSpace() + MemoryConstants::pageMask) / MemoryConstants::pageSize)); pCmd->setGeneralStateBufferSize(static_cast(-1)); pCmd->setIndirectObjectBufferSize(static_cast((ioh.getMaxAvailableSpace() + MemoryConstants::pageMask) / MemoryConstants::pageSize)); - pCmd->setInstructionBufferSize(static_cast((ih.getMaxAvailableSpace() + +MemoryConstants::pageMask) / MemoryConstants::pageSize)); + + pCmd->setInstructionBufferSize(MemoryConstants::sizeOf4GBinPageEntities); //set cache settings pCmd->setStatelessDataPortAccessMemoryObjectControlState(Gmm::getMOCS(statelessMocsIndex)); diff --git a/runtime/helpers/task_information.cpp b/runtime/helpers/task_information.cpp index 73c066e3a9..11b3697ecb 100644 --- a/runtime/helpers/task_information.cpp +++ b/runtime/helpers/task_information.cpp @@ -83,7 +83,6 @@ CompletionStamp &CommandMapUnmap::submit(uint32_t taskLevel, bool terminated) { completionStamp = csr.flushTask(queueCommandStream, offset, cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE), - cmdQ.getIndirectHeap(IndirectHeap::INSTRUCTION), cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT), cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE), taskLevel, @@ -271,7 +270,6 @@ CompletionStamp &CommandComputeKernel::submit(uint32_t taskLevel, bool terminate completionStamp = commandStreamReceiver.flushTask(queueCommandStream, offset, *dsh, - ish, *ioh, ssh, taskLevel, @@ -313,7 +311,6 @@ CompletionStamp &CommandMarker::submit(uint32_t taskLevel, bool terminated) { completionStamp = csr.flushTask(queueCommandStream, offset, cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE), - cmdQ.getIndirectHeap(IndirectHeap::INSTRUCTION), cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT), cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE), taskLevel, diff --git a/runtime/memory_manager/memory_constants.h b/runtime/memory_manager/memory_constants.h index 245fe5d9cb..bde85a8aa4 100644 --- a/runtime/memory_manager/memory_constants.h +++ b/runtime/memory_manager/memory_constants.h @@ -42,6 +42,7 @@ static const uintptr_t pageMask = (pageSize - 1); static const uintptr_t page64kMask = (pageSize64k - 1); static const uint64_t max32BitAppAddress = ((1ULL << 31) - 1); static const uint64_t max64BitAppAddress = ((1ULL << 47) - 1); +static const uint32_t sizeOf4GBinPageEntities = (MemoryConstants::gigaByte * 4 - MemoryConstants::pageSize) / MemoryConstants::pageSize; } const bool is32bit = (sizeof(void *) == 4) ? true : false; diff --git a/unit_tests/aub_tests/command_queue/enqueue_kernel_aub_tests.cpp b/unit_tests/aub_tests/command_queue/enqueue_kernel_aub_tests.cpp index c757065ab8..8468b3df25 100644 --- a/unit_tests/aub_tests/command_queue/enqueue_kernel_aub_tests.cpp +++ b/unit_tests/aub_tests/command_queue/enqueue_kernel_aub_tests.cpp @@ -127,11 +127,7 @@ HWTEST_F(AUBHelloWorld, simple) { auto pSBA = reinterpret_cast(cmdStateBaseAddress); ASSERT_NE(nullptr, pSBA); - auto pISH = pSBA->getInstructionBaseAddress(); - auto pInterfaceDescriptorData = reinterpret_cast(cmdInterfaceDescriptorData); - auto offsetKSP = pInterfaceDescriptorData->getKernelStartPointer() + ((uint64_t)pInterfaceDescriptorData->getKernelStartPointerHigh() << 32); - - auto pISA = (void *)ptrOffset(pISH, (uintptr_t)offsetKSP); + auto pISA = pKernel->getKernelInfo().getGraphicsAllocation()->getUnderlyingBuffer(); EXPECT_EQ(0, memcmp(pISA, pExpectedISA, expectedSize)); } @@ -264,11 +260,7 @@ HWTEST_F(AUBSimpleArg, simple) { auto pSBA = reinterpret_cast(cmdStateBaseAddress); ASSERT_NE(nullptr, pSBA); - auto pISH = pSBA->getInstructionBaseAddress(); - auto pInterfaceDescriptorData = reinterpret_cast(cmdInterfaceDescriptorData); - auto offsetKSP = pInterfaceDescriptorData->getKernelStartPointer() + ((uint64_t)pInterfaceDescriptorData->getKernelStartPointerHigh() << 32); - - auto pISA = (void *)ptrOffset(pISH, (uintptr_t)offsetKSP); + auto pISA = pKernel->getKernelInfo().getGraphicsAllocation()->getUnderlyingBuffer(); EXPECT_EQ(0, memcmp(pISA, pExpectedISA, expectedSize)); } diff --git a/unit_tests/command_queue/command_queue_flush_waitlist_tests.cpp b/unit_tests/command_queue/command_queue_flush_waitlist_tests.cpp index f65756ad1c..326c620f94 100644 --- a/unit_tests/command_queue/command_queue_flush_waitlist_tests.cpp +++ b/unit_tests/command_queue/command_queue_flush_waitlist_tests.cpp @@ -68,7 +68,7 @@ HWTEST_F(CommandQueueSimpleTest, flushWaitlistDoesNotFlushSingleEventWhenTaskCou dispatchFlags.blocking = true; dispatchFlags.dcFlush = true; - csr.flushTask(stream, 0, stream, stream, stream, stream, 0, dispatchFlags); + csr.flushTask(stream, 0, stream, stream, stream, 0, dispatchFlags); EXPECT_EQ(1u, csr.peekLatestSentTaskCount()); csr.taskCount = 1; diff --git a/unit_tests/command_queue/dispatch_walker_tests.cpp b/unit_tests/command_queue/dispatch_walker_tests.cpp index 359309e932..57b4488d8c 100644 --- a/unit_tests/command_queue/dispatch_walker_tests.cpp +++ b/unit_tests/command_queue/dispatch_walker_tests.cpp @@ -96,7 +96,6 @@ struct DispatchWalkerTest : public CommandQueueFixture, public DeviceFixture, pu SPatchSamplerStateArray samplerArray; KernelInfo kernelInfo; - KernelInfo kernelInfoWithSampler; uint32_t kernelIsa[32]; @@ -769,6 +768,14 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerWithMultipleDispatchInfo) { HWTEST_F(DispatchWalkerTest, dispatchWalkerWithMultipleDispatchInfoCorrectlyProgramsInterfaceDesriptors) { using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA; + auto memoryManager = this->pDevice->getMemoryManager(); + auto kernelIsaAllocation = memoryManager->createInternalGraphicsAllocation(nullptr, 4096u); + auto kernelIsaWithSamplerAllocation = memoryManager->createInternalGraphicsAllocation(nullptr, 4096u); + kernelInfo.kernelAllocation = kernelIsaAllocation; + kernelInfoWithSampler.kernelAllocation = kernelIsaWithSamplerAllocation; + auto gpuAddress1 = kernelIsaAllocation->getGpuAddressToPatch(); + auto gpuAddress2 = kernelIsaWithSamplerAllocation->getGpuAddressToPatch(); + MockKernel kernel1(&program, kernelInfo, *pDevice); ASSERT_EQ(CL_SUCCESS, kernel1.initialize()); MockKernel kernel2(&program, kernelInfoWithSampler, *pDevice); @@ -804,6 +811,7 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerWithMultipleDispatchInfoCorrectlyProg for (uint32_t index = 0; index < multiDispatchInfo.size(); index++) { uint32_t addressLow = pID[index].getKernelStartPointer(); uint32_t addressHigh = pID[index].getKernelStartPointerHigh(); + uint64_t fullAddress = ((uint64_t)addressHigh << 32) | addressLow; if (index > 0) { uint32_t addressLowOfPrevious = pID[index - 1].getKernelStartPointer(); @@ -820,6 +828,7 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerWithMultipleDispatchInfoCorrectlyProg auto samplerCount = pID[index].getSamplerCount(); EXPECT_EQ(0u, samplerPointer); EXPECT_EQ(0u, samplerCount); + EXPECT_EQ(fullAddress, gpuAddress1); } if (index == 1) { @@ -827,6 +836,7 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerWithMultipleDispatchInfoCorrectlyProg auto samplerCount = pID[index].getSamplerCount(); EXPECT_NE(0u, samplerPointer); EXPECT_EQ(1u, samplerCount); + EXPECT_EQ(fullAddress, gpuAddress2); } } @@ -844,6 +854,9 @@ HWTEST_F(DispatchWalkerTest, dispatchWalkerWithMultipleDispatchInfoCorrectlyProg auto IDSize = cmd->getInterfaceDescriptorTotalLength(); EXPECT_EQ(dshBeforeMultiDisptach, IDStartAddress); EXPECT_EQ(interfaceDesriptorTableSize, IDSize); + + memoryManager->freeGraphicsMemory(kernelIsaAllocation); + memoryManager->freeGraphicsMemory(kernelIsaWithSamplerAllocation); } HWTEST_F(DispatchWalkerTest, dispatchWalkerWithMultipleDispatchInfoCorrectlyProgramsGpgpuWalkerIDOffset) { diff --git a/unit_tests/command_queue/enqueue_copy_buffer_rect_tests.cpp b/unit_tests/command_queue/enqueue_copy_buffer_rect_tests.cpp index a33cb4481b..09b4f6c632 100644 --- a/unit_tests/command_queue/enqueue_copy_buffer_rect_tests.cpp +++ b/unit_tests/command_queue/enqueue_copy_buffer_rect_tests.cpp @@ -163,7 +163,6 @@ HWTEST_F(EnqueueCopyBufferRectTest, 2D_addsCommands) { HWTEST_F(EnqueueCopyBufferRectTest, 2D_addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueCopyBufferRect2D(); @@ -192,7 +191,6 @@ HWTEST_F(EnqueueCopyBufferRectTest, 2D_addsIndirectData) { EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); if (kernel->requiresSshForBuffers()) { EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -224,6 +222,8 @@ HWTEST_F(EnqueueCopyBufferRectTest, 2D_StateBaseAddress) { enqueueCopyBufferRect2D(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); + auto *cmd = (STATE_BASE_ADDRESS *)cmdStateBaseAddress; ASSERT_NE(nullptr, cmd); @@ -239,7 +239,7 @@ HWTEST_F(EnqueueCopyBufferRectTest, 2D_StateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -250,7 +250,7 @@ HWTEST_F(EnqueueCopyBufferRectTest, 2D_StateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); @@ -403,6 +403,7 @@ HWTEST_F(EnqueueCopyBufferRectTest, 3D_StateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueCopyBufferRect3D(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); auto *cmd = (STATE_BASE_ADDRESS *)cmdStateBaseAddress; ASSERT_NE(nullptr, cmd); @@ -419,7 +420,7 @@ HWTEST_F(EnqueueCopyBufferRectTest, 3D_StateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -430,7 +431,7 @@ HWTEST_F(EnqueueCopyBufferRectTest, 3D_StateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); diff --git a/unit_tests/command_queue/enqueue_copy_buffer_tests.cpp b/unit_tests/command_queue/enqueue_copy_buffer_tests.cpp index 1ffb92c193..f62f2141d2 100644 --- a/unit_tests/command_queue/enqueue_copy_buffer_tests.cpp +++ b/unit_tests/command_queue/enqueue_copy_buffer_tests.cpp @@ -137,7 +137,6 @@ HWTEST_F(EnqueueCopyBufferTest, addsCommands) { HWTEST_F(EnqueueCopyBufferTest, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueCopyBuffer(); @@ -160,7 +159,6 @@ HWTEST_F(EnqueueCopyBufferTest, addsIndirectData) { EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); if (kernel->requiresSshForBuffers()) { EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -191,6 +189,7 @@ HWTEST_F(EnqueueCopyBufferTest, StateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueCopyBuffer(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); auto *cmd = (STATE_BASE_ADDRESS *)cmdStateBaseAddress; ASSERT_NE(nullptr, cmd); @@ -207,7 +206,7 @@ HWTEST_F(EnqueueCopyBufferTest, StateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -218,7 +217,7 @@ HWTEST_F(EnqueueCopyBufferTest, StateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); diff --git a/unit_tests/command_queue/enqueue_copy_buffer_to_image_tests.cpp b/unit_tests/command_queue/enqueue_copy_buffer_to_image_tests.cpp index 67833a9c03..5761d3287e 100644 --- a/unit_tests/command_queue/enqueue_copy_buffer_to_image_tests.cpp +++ b/unit_tests/command_queue/enqueue_copy_buffer_to_image_tests.cpp @@ -87,13 +87,11 @@ HWTEST_F(EnqueueCopyBufferToImageTest, addsCommands) { HWTEST_F(EnqueueCopyBufferToImageTest, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueCopyBufferToImage(); EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -122,6 +120,7 @@ HWTEST_F(EnqueueCopyBufferToImageTest, stateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueCopyBufferToImage(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto *cmd = getCommand(itorPipelineSelect, itorWalker); @@ -138,7 +137,7 @@ HWTEST_F(EnqueueCopyBufferToImageTest, stateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -149,7 +148,7 @@ HWTEST_F(EnqueueCopyBufferToImageTest, stateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); diff --git a/unit_tests/command_queue/enqueue_copy_image_tests.cpp b/unit_tests/command_queue/enqueue_copy_image_tests.cpp index abc7084d1f..1d7516ed0b 100644 --- a/unit_tests/command_queue/enqueue_copy_image_tests.cpp +++ b/unit_tests/command_queue/enqueue_copy_image_tests.cpp @@ -90,13 +90,11 @@ HWTEST_F(EnqueueCopyImageTest, addsCommands) { HWTEST_F(EnqueueCopyImageTest, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueCopyImage(); EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -125,6 +123,7 @@ HWTEST_F(EnqueueCopyImageTest, stateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueCopyImage(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto *cmd = getCommand(itorPipelineSelect, itorWalker); @@ -141,7 +140,7 @@ HWTEST_F(EnqueueCopyImageTest, stateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -152,7 +151,7 @@ HWTEST_F(EnqueueCopyImageTest, stateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); diff --git a/unit_tests/command_queue/enqueue_copy_image_to_buffer_tests.cpp b/unit_tests/command_queue/enqueue_copy_image_to_buffer_tests.cpp index 15348af152..527df5aa75 100644 --- a/unit_tests/command_queue/enqueue_copy_image_to_buffer_tests.cpp +++ b/unit_tests/command_queue/enqueue_copy_image_to_buffer_tests.cpp @@ -88,13 +88,11 @@ HWTEST_F(EnqueueCopyImageToBufferTest, addsCommands) { HWTEST_F(EnqueueCopyImageToBufferTest, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueCopyImageToBuffer(); EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -123,6 +121,7 @@ HWTEST_F(EnqueueCopyImageToBufferTest, stateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueCopyImageToBuffer(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto *cmd = getCommand(itorPipelineSelect, itorWalker); @@ -139,7 +138,7 @@ HWTEST_F(EnqueueCopyImageToBufferTest, stateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -150,7 +149,7 @@ HWTEST_F(EnqueueCopyImageToBufferTest, stateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); diff --git a/unit_tests/command_queue/enqueue_fill_buffer_tests.cpp b/unit_tests/command_queue/enqueue_fill_buffer_tests.cpp index 5b1f74f4ee..5127cced63 100644 --- a/unit_tests/command_queue/enqueue_fill_buffer_tests.cpp +++ b/unit_tests/command_queue/enqueue_fill_buffer_tests.cpp @@ -107,7 +107,6 @@ HWTEST_F(EnqueueFillBufferCmdTests, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueFillBuffer(); @@ -131,7 +130,6 @@ HWTEST_F(EnqueueFillBufferCmdTests, addsIndirectData) { EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); if (kernel->requiresSshForBuffers()) { EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -242,6 +240,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, StateBaseAddress) { typedef typename FamilyType::PARSE PARSE; typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueFillBuffer(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); auto *cmd = (STATE_BASE_ADDRESS *)cmdStateBaseAddress; ASSERT_NE(nullptr, cmd); @@ -258,7 +257,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, StateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -269,7 +268,7 @@ HWTEST_F(EnqueueFillBufferCmdTests, StateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); diff --git a/unit_tests/command_queue/enqueue_fill_image_tests.cpp b/unit_tests/command_queue/enqueue_fill_image_tests.cpp index 07756de0a0..c01b643f85 100644 --- a/unit_tests/command_queue/enqueue_fill_image_tests.cpp +++ b/unit_tests/command_queue/enqueue_fill_image_tests.cpp @@ -98,13 +98,11 @@ HWTEST_F(EnqueueFillImageTest, addsCommands) { HWTEST_F(EnqueueFillImageTest, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueFillImage(); EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -133,6 +131,7 @@ HWTEST_F(EnqueueFillImageTest, stateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueFillImage(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto *cmd = getCommand(itorPipelineSelect, itorWalker); @@ -149,7 +148,7 @@ HWTEST_F(EnqueueFillImageTest, stateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -160,7 +159,7 @@ HWTEST_F(EnqueueFillImageTest, stateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); diff --git a/unit_tests/command_queue/enqueue_kernel_tests.cpp b/unit_tests/command_queue/enqueue_kernel_tests.cpp index 9a862a33cb..5409df6826 100644 --- a/unit_tests/command_queue/enqueue_kernel_tests.cpp +++ b/unit_tests/command_queue/enqueue_kernel_tests.cpp @@ -411,13 +411,11 @@ HWTEST_P(EnqueueWorkItemTests, addsCommands) { HWTEST_P(EnqueueWorkItemTests, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueKernel(); EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); if (pKernel->requiresSshForBuffers() || (pKernel->getKernelInfo().patchInfo.imageMemObjKernelArgs.size() > 0)) { EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -448,6 +446,7 @@ HWTEST_P(EnqueueWorkItemTests, StateBaseAddress) { typedef typename FamilyType::PARSE PARSE; typedef typename PARSE::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueKernel(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto itorCmd = find(itorPipelineSelect, itorWalker); @@ -473,7 +472,7 @@ HWTEST_P(EnqueueWorkItemTests, StateBaseAddress) { } EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -484,7 +483,7 @@ HWTEST_P(EnqueueWorkItemTests, StateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command PARSE::template validateCommand(cmdList.begin(), itorCmd); @@ -1107,7 +1106,7 @@ HWTEST_F(EnqueueKernelTest, givenCommandStreamReceiverInBatchingModeWhenEnqueueK size_t csrSurfaceCount = (pDevice->getPreemptionMode() == PreemptionMode::MidThread) ? 1 : 0; EXPECT_EQ(0, mockCsr->flushCalledCount); - EXPECT_EQ(6u + csrSurfaceCount, cmdBuffer->surfaces.size()); + EXPECT_EQ(5u + csrSurfaceCount, cmdBuffer->surfaces.size()); } HWTEST_F(EnqueueKernelTest, givenDefaultCommandStreamReceiverWhenClFlushIsCalledThenSuccessIsReturned) { diff --git a/unit_tests/command_queue/enqueue_read_buffer_rect_tests.cpp b/unit_tests/command_queue/enqueue_read_buffer_rect_tests.cpp index 1e4c3496cc..bff092b1ca 100644 --- a/unit_tests/command_queue/enqueue_read_buffer_rect_tests.cpp +++ b/unit_tests/command_queue/enqueue_read_buffer_rect_tests.cpp @@ -175,7 +175,6 @@ HWTEST_F(EnqueueReadBufferRectTest, 2D_addsCommands) { HWTEST_F(EnqueueReadBufferRectTest, 2D_addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueReadBufferRect2D(); @@ -204,7 +203,6 @@ HWTEST_F(EnqueueReadBufferRectTest, 2D_addsIndirectData) { EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); if (kernel->requiresSshForBuffers()) { EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -235,6 +233,7 @@ HWTEST_F(EnqueueReadBufferRectTest, 2D_StateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueReadBufferRect2D(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto itorCmd = find(itorPipelineSelect, itorWalker); @@ -254,7 +253,7 @@ HWTEST_F(EnqueueReadBufferRectTest, 2D_StateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -265,7 +264,7 @@ HWTEST_F(EnqueueReadBufferRectTest, 2D_StateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorCmd); diff --git a/unit_tests/command_queue/enqueue_read_buffer_tests.cpp b/unit_tests/command_queue/enqueue_read_buffer_tests.cpp index 5023759963..7d0a9bf7e5 100644 --- a/unit_tests/command_queue/enqueue_read_buffer_tests.cpp +++ b/unit_tests/command_queue/enqueue_read_buffer_tests.cpp @@ -144,7 +144,6 @@ HWTEST_F(EnqueueReadBufferTypeTest, addsCommands) { HWTEST_F(EnqueueReadBufferTypeTest, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); srcBuffer->forceDisallowCPUCopy = true; @@ -167,7 +166,6 @@ HWTEST_F(EnqueueReadBufferTypeTest, addsIndirectData) { EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); if (kernel->requiresSshForBuffers()) { EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -200,6 +198,7 @@ HWTEST_F(EnqueueReadBufferTypeTest, StateBaseAddress) { srcBuffer->forceDisallowCPUCopy = true; enqueueReadBuffer(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto itorCmd = find(itorPipelineSelect, itorWalker); @@ -219,7 +218,7 @@ HWTEST_F(EnqueueReadBufferTypeTest, StateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -230,7 +229,7 @@ HWTEST_F(EnqueueReadBufferTypeTest, StateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorCmd); diff --git a/unit_tests/command_queue/enqueue_read_image_tests.cpp b/unit_tests/command_queue/enqueue_read_image_tests.cpp index 3ca737e95d..167d50356e 100644 --- a/unit_tests/command_queue/enqueue_read_image_tests.cpp +++ b/unit_tests/command_queue/enqueue_read_image_tests.cpp @@ -98,13 +98,11 @@ HWTEST_F(EnqueueReadImageTest, addsCommands) { HWTEST_F(EnqueueReadImageTest, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueReadImage(); EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -133,6 +131,7 @@ HWTEST_F(EnqueueReadImageTest, stateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueReadImage(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto *cmd = getCommand(itorPipelineSelect, itorWalker); @@ -149,7 +148,7 @@ HWTEST_F(EnqueueReadImageTest, stateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -160,7 +159,7 @@ HWTEST_F(EnqueueReadImageTest, stateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); diff --git a/unit_tests/command_queue/enqueue_write_buffer_rect_tests.cpp b/unit_tests/command_queue/enqueue_write_buffer_rect_tests.cpp index 0f23196ba4..9151902cf0 100644 --- a/unit_tests/command_queue/enqueue_write_buffer_rect_tests.cpp +++ b/unit_tests/command_queue/enqueue_write_buffer_rect_tests.cpp @@ -150,7 +150,6 @@ HWTEST_F(EnqueueWriteBufferRectTest, 2D_addsCommands) { HWTEST_F(EnqueueWriteBufferRectTest, 2D_addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueWriteBufferRect2D(); @@ -178,7 +177,6 @@ HWTEST_F(EnqueueWriteBufferRectTest, 2D_addsIndirectData) { EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); if (kernel->requiresSshForBuffers()) { EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -209,6 +207,7 @@ HWTEST_F(EnqueueWriteBufferRectTest, 2D_StateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueWriteBufferRect2D(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto itorCmd = find(itorPipelineSelect, itorWalker); @@ -228,7 +227,7 @@ HWTEST_F(EnqueueWriteBufferRectTest, 2D_StateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -239,7 +238,7 @@ HWTEST_F(EnqueueWriteBufferRectTest, 2D_StateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorCmd); diff --git a/unit_tests/command_queue/enqueue_write_buffer_tests.cpp b/unit_tests/command_queue/enqueue_write_buffer_tests.cpp index 33b3bce43d..56c064fa99 100644 --- a/unit_tests/command_queue/enqueue_write_buffer_tests.cpp +++ b/unit_tests/command_queue/enqueue_write_buffer_tests.cpp @@ -139,7 +139,6 @@ HWTEST_F(EnqueueWriteBufferTypeTest, addsCommands) { HWTEST_F(EnqueueWriteBufferTypeTest, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); srcBuffer->forceDisallowCPUCopy = true; @@ -162,7 +161,6 @@ HWTEST_F(EnqueueWriteBufferTypeTest, addsIndirectData) { EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); if (kernel->requiresSshForBuffers()) { EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -195,6 +193,7 @@ HWTEST_F(EnqueueWriteBufferTypeTest, StateBaseAddress) { srcBuffer->forceDisallowCPUCopy = true; enqueueWriteBuffer(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto itorCmd = find(itorPipelineSelect, itorWalker); @@ -214,7 +213,7 @@ HWTEST_F(EnqueueWriteBufferTypeTest, StateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -225,7 +224,7 @@ HWTEST_F(EnqueueWriteBufferTypeTest, StateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorCmd); diff --git a/unit_tests/command_queue/enqueue_write_image_tests.cpp b/unit_tests/command_queue/enqueue_write_image_tests.cpp index 0e5e2be08f..4d1aac7e3f 100644 --- a/unit_tests/command_queue/enqueue_write_image_tests.cpp +++ b/unit_tests/command_queue/enqueue_write_image_tests.cpp @@ -99,13 +99,11 @@ HWTEST_F(EnqueueWriteImageTest, addsCommands) { HWTEST_F(EnqueueWriteImageTest, addsIndirectData) { auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); enqueueWriteImage(); EXPECT_NE(dshBefore, pDSH->getUsed()); EXPECT_NE(iohBefore, pIOH->getUsed()); - EXPECT_NE(ihBefore, pIH->getUsed()); EXPECT_NE(sshBefore, pSSH->getUsed()); } @@ -134,6 +132,7 @@ HWTEST_F(EnqueueWriteImageTest, stateBaseAddress) { typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; enqueueWriteImage(); + auto internalHeapBase = this->pDevice->getCommandStreamReceiver().getMemoryManager()->getInternalHeapBaseAddress(); // All state should be programmed before walker auto *cmd = getCommand(itorPipelineSelect, itorWalker); @@ -150,7 +149,7 @@ HWTEST_F(EnqueueWriteImageTest, stateBaseAddress) { EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress()); EXPECT_EQ((uintptr_t)pSSH->getCpuBase(), cmd->getSurfaceStateBaseAddress()); EXPECT_EQ((uintptr_t)pIOH->getCpuBase(), cmd->getIndirectObjectBaseAddress()); - EXPECT_EQ((uintptr_t)pIH->getCpuBase(), cmd->getInstructionBaseAddress()); + EXPECT_EQ(internalHeapBase, cmd->getInstructionBaseAddress()); // Verify all sizes are getting programmed EXPECT_TRUE(cmd->getDynamicStateBufferSizeModifyEnable()); @@ -161,7 +160,7 @@ HWTEST_F(EnqueueWriteImageTest, stateBaseAddress) { EXPECT_EQ(pDSH->getMaxAvailableSpace(), cmd->getDynamicStateBufferSize() * MemoryConstants::pageSize); EXPECT_NE(0u, cmd->getGeneralStateBufferSize()); EXPECT_EQ(pIOH->getMaxAvailableSpace(), cmd->getIndirectObjectBufferSize() * MemoryConstants::pageSize); - EXPECT_EQ(pIH->getMaxAvailableSpace(), cmd->getInstructionBufferSize() * MemoryConstants::pageSize); + EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize()); // Generically validate this command FamilyType::PARSE::template validateCommand(cmdList.begin(), itorStateBaseAddress); diff --git a/unit_tests/command_queue/get_size_required_buffer_tests.cpp b/unit_tests/command_queue/get_size_required_buffer_tests.cpp index 36f1a06bb4..1c4ad7c1d8 100644 --- a/unit_tests/command_queue/get_size_required_buffer_tests.cpp +++ b/unit_tests/command_queue/get_size_required_buffer_tests.cpp @@ -423,7 +423,6 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueKernelHelloWorld) { auto usedBeforeCS = commandStream.getUsed(); auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); size_t workSize[] = {256}; @@ -439,12 +438,10 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueKernelHelloWorld) { auto usedAfterCS = commandStream.getUsed(); auto dshAfter = pDSH->getUsed(); auto iohAfter = pIOH->getUsed(); - auto ihAfter = pIH->getUsed(); auto sshAfter = pSSH->getUsed(); auto expectedSizeCS = EnqueueOperation::getSizeRequiredCS(false, false, *pCmdQ, nullptr); auto expectedSizeDSH = KernelCommandsHelper::getSizeRequiredDSH(*KernelFixture::pKernel); - auto expectedSizeIH = KernelCommandsHelper::getSizeRequiredIH(*KernelFixture::pKernel); auto expectedSizeIOH = KernelCommandsHelper::getSizeRequiredIOH(*KernelFixture::pKernel, workSize[0]); auto expectedSizeSSH = KernelCommandsHelper::getSizeRequiredSSH(*KernelFixture::pKernel); @@ -454,7 +451,6 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueKernelHelloWorld) { EXPECT_EQ(expectedSizeCS, usedAfterCS - usedBeforeCS); EXPECT_GE(expectedSizeDSH, dshAfter - dshBefore); - EXPECT_GE(expectedSizeIH, ihAfter - ihBefore); EXPECT_GE(expectedSizeIOH, iohAfter - iohBefore); EXPECT_GE(expectedSizeSSH, sshAfter - sshBefore); } @@ -466,7 +462,6 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueKernelSimpleArg) { auto usedBeforeCS = commandStream.getUsed(); auto dshBefore = pDSH->getUsed(); auto iohBefore = pIOH->getUsed(); - auto ihBefore = pIH->getUsed(); auto sshBefore = pSSH->getUsed(); size_t workSize[] = {256}; @@ -482,12 +477,10 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueKernelSimpleArg) { auto usedAfterCS = commandStream.getUsed(); auto dshAfter = pDSH->getUsed(); auto iohAfter = pIOH->getUsed(); - auto ihAfter = pIH->getUsed(); auto sshAfter = pSSH->getUsed(); auto expectedSizeCS = EnqueueOperation::getSizeRequiredCS(false, false, *pCmdQ, nullptr); auto expectedSizeDSH = KernelCommandsHelper::getSizeRequiredDSH(*KernelFixture::pKernel); - auto expectedSizeIH = KernelCommandsHelper::getSizeRequiredIH(*KernelFixture::pKernel); auto expectedSizeIOH = KernelCommandsHelper::getSizeRequiredIOH(*KernelFixture::pKernel, workSize[0]); auto expectedSizeSSH = KernelCommandsHelper::getSizeRequiredSSH(*KernelFixture::pKernel); @@ -500,7 +493,6 @@ HWTEST_F(GetSizeRequiredBufferTest, enqueueKernelSimpleArg) { EXPECT_EQ(expectedSizeCS, usedAfterCS - usedBeforeCS); EXPECT_GE(expectedSizeDSH, dshAfter - dshBefore); - EXPECT_GE(expectedSizeIH, ihAfter - ihBefore); EXPECT_GE(expectedSizeIOH, iohAfter - iohBefore); EXPECT_GE(expectedSizeSSH, sshAfter - sshBefore); } diff --git a/unit_tests/command_queue/get_size_required_tests.cpp b/unit_tests/command_queue/get_size_required_tests.cpp index 90da5d6ea2..8c277fd3e7 100644 --- a/unit_tests/command_queue/get_size_required_tests.cpp +++ b/unit_tests/command_queue/get_size_required_tests.cpp @@ -40,12 +40,10 @@ struct GetSizeRequiredTest : public CommandEnqueueFixture, MemoryManagementFixture::SetUp(); CommandEnqueueFixture::SetUp(); dsh = &pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE); - ih = &pCmdQ->getIndirectHeap(IndirectHeap::INSTRUCTION); ioh = &pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT); ssh = &pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE); usedBeforeDSH = dsh->getUsed(); - usedBeforeIH = ih->getUsed(); usedBeforeIOH = ioh->getUsed(); usedBeforeSSH = ssh->getUsed(); WhitelistedRegisters regs = {0}; @@ -60,12 +58,10 @@ struct GetSizeRequiredTest : public CommandEnqueueFixture, MockContext context; IndirectHeap *dsh; IndirectHeap *ioh; - IndirectHeap *ih; IndirectHeap *ssh; size_t usedBeforeDSH; size_t usedBeforeIOH; - size_t usedBeforeIH; size_t usedBeforeSSH; }; @@ -78,7 +74,6 @@ HWTEST_F(GetSizeRequiredTest, finish) { EXPECT_EQ(0u, commandStream.getUsed() - usedBeforeCS); EXPECT_EQ(0u, dsh->getUsed() - usedBeforeDSH); - EXPECT_EQ(0u, ih->getUsed() - usedBeforeIH); EXPECT_EQ(0u, ioh->getUsed() - usedBeforeIOH); EXPECT_EQ(0u, ssh->getUsed() - usedBeforeSSH); } @@ -98,7 +93,6 @@ HWTEST_F(GetSizeRequiredTest, enqueueMarker) { EXPECT_EQ(0u, commandStream.getUsed() - usedBeforeCS); EXPECT_EQ(0u, dsh->getUsed() - usedBeforeDSH); - EXPECT_EQ(0u, ih->getUsed() - usedBeforeIH); EXPECT_EQ(0u, ioh->getUsed() - usedBeforeIOH); EXPECT_EQ(0u, ssh->getUsed() - usedBeforeSSH); diff --git a/unit_tests/command_stream/command_stream_receiver_hw_tests.cpp b/unit_tests/command_stream/command_stream_receiver_hw_tests.cpp index 09be71535a..bc582d5431 100644 --- a/unit_tests/command_stream/command_stream_receiver_hw_tests.cpp +++ b/unit_tests/command_stream/command_stream_receiver_hw_tests.cpp @@ -77,13 +77,11 @@ struct UltCommandStreamReceiverTest size_t alignmentStream = 0x1000; cmdBuffer = alignedMalloc(sizeStream, alignmentStream); dshBuffer = alignedMalloc(sizeStream, alignmentStream); - ihBuffer = alignedMalloc(sizeStream, alignmentStream); iohBuffer = alignedMalloc(sizeStream, alignmentStream); sshBuffer = alignedMalloc(sizeStream, alignmentStream); ASSERT_NE(nullptr, cmdBuffer); ASSERT_NE(nullptr, dshBuffer); - ASSERT_NE(nullptr, ihBuffer); ASSERT_NE(nullptr, iohBuffer); ASSERT_NE(nullptr, sshBuffer); @@ -95,10 +93,6 @@ struct UltCommandStreamReceiverTest graphicsAllocation = new GraphicsAllocation(dshBuffer, sizeStream); dsh.replaceGraphicsAllocation(graphicsAllocation); - ih.replaceBuffer(ihBuffer, sizeStream); - graphicsAllocation = new GraphicsAllocation(ihBuffer, sizeStream); - ih.replaceGraphicsAllocation(graphicsAllocation); - ioh.replaceBuffer(iohBuffer, sizeStream); graphicsAllocation = new GraphicsAllocation(iohBuffer, sizeStream); @@ -112,14 +106,12 @@ struct UltCommandStreamReceiverTest void TearDown() override { pDevice->getCommandStreamReceiver().flushBatchedSubmissions(); delete dsh.getGraphicsAllocation(); - delete ih.getGraphicsAllocation(); delete ioh.getGraphicsAllocation(); delete ssh.getGraphicsAllocation(); delete commandStream.getGraphicsAllocation(); alignedFree(sshBuffer); alignedFree(iohBuffer); - alignedFree(ihBuffer); alignedFree(dshBuffer); alignedFree(cmdBuffer); HardwareParse::TearDown(); @@ -143,7 +135,6 @@ struct UltCommandStreamReceiverTest commandStream, startOffset, dsh, - ih, ioh, ssh, taskLevel, @@ -154,7 +145,6 @@ struct UltCommandStreamReceiverTest void configureCSRHeapStatesToNonDirty() { auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver(); commandStreamReceiver.dshState.updateAndCheck(&dsh); - commandStreamReceiver.ihState.updateAndCheck(&ih); commandStreamReceiver.iohState.updateAndCheck(&ioh); commandStreamReceiver.sshState.updateAndCheck(&ssh); } @@ -192,13 +182,11 @@ struct UltCommandStreamReceiverTest uint32_t taskLevel = 42; LinearStream commandStream; LinearStream dsh; - LinearStream ih; LinearStream ioh; LinearStream ssh; void *cmdBuffer = nullptr; void *dshBuffer = nullptr; - void *ihBuffer = nullptr; void *iohBuffer = nullptr; void *sshBuffer = nullptr; @@ -216,14 +204,13 @@ HWTEST_F(UltCommandStreamReceiverTest, requiredCmdSizeForPreamble) { EXPECT_EQ(expectedCmdSize, getSizeRequiredPreambleCS(*pDevice)); } -HWTEST_F(UltCommandStreamReceiverTest, testInitialState) { +HWTEST_F(UltCommandStreamReceiverTest, givenCommandStreamReceiverInInitialStateWhenHeapsAreAskedForDirtyStatusThenTrueIsReturned) { auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver(); EXPECT_EQ(0u, commandStreamReceiver.peekTaskCount()); EXPECT_EQ(0u, commandStreamReceiver.peekTaskLevel()); EXPECT_TRUE(commandStreamReceiver.dshState.updateAndCheck(&dsh)); - EXPECT_TRUE(commandStreamReceiver.ihState.updateAndCheck(&ih)); EXPECT_TRUE(commandStreamReceiver.iohState.updateAndCheck(&ioh)); EXPECT_TRUE(commandStreamReceiver.sshState.updateAndCheck(&ssh)); } @@ -323,7 +310,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTaskIsSu mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -347,7 +333,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndMidThread mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -378,7 +363,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInDefaultModeAndMidThreadP mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -578,7 +562,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, stateBaseAddressTracking) { flushTask(commandStreamReceiver); EXPECT_FALSE(commandStreamReceiver.dshState.updateAndCheck(&dsh)); - EXPECT_FALSE(commandStreamReceiver.ihState.updateAndCheck(&ih)); EXPECT_FALSE(commandStreamReceiver.iohState.updateAndCheck(&ioh)); EXPECT_FALSE(commandStreamReceiver.sshState.updateAndCheck(&ssh)); } @@ -598,7 +581,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, stateBaseAddressProgrammingShouldM auto &cmd = *reinterpret_cast(cmdStateBaseAddress); EXPECT_EQ(dsh.getCpuBase(), reinterpret_cast(cmd.getDynamicStateBaseAddress())); - EXPECT_EQ(ih.getCpuBase(), reinterpret_cast(cmd.getInstructionBaseAddress())); + EXPECT_EQ(commandStreamReceiver.getMemoryManager()->getInternalHeapBaseAddress(), cmd.getInstructionBaseAddress()); EXPECT_EQ(ioh.getCpuBase(), reinterpret_cast(cmd.getIndirectObjectBaseAddress())); EXPECT_EQ(ssh.getCpuBase(), reinterpret_cast(cmd.getSurfaceStateBaseAddress())); @@ -610,7 +593,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenStateBaseAddressWhenItIsRequi typedef typename FamilyType::STATE_BASE_ADDRESS STATE_BASE_ADDRESS; auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver(); configureCSRtoNonDirtyState(); - ih.replaceBuffer(ptrOffset(ih.getCpuBase(), +1u), ih.getMaxAvailableSpace() - 1); + ioh.replaceBuffer(ptrOffset(ioh.getCpuBase(), +1u), ioh.getMaxAvailableSpace() - 1); flushTask(commandStreamReceiver); @@ -684,12 +667,10 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, stateBaseAddressShouldBeSentIfNeve HWTEST_F(CommandStreamReceiverFlushTaskTests, stateBaseAddressShouldBeSentIfSizeChanged) { auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver(); auto dshSize = dsh.getMaxAvailableSpace(); - auto ihSize = ih.getMaxAvailableSpace(); auto iohSize = ioh.getMaxAvailableSpace(); auto sshSize = ssh.getMaxAvailableSpace(); dsh.replaceBuffer(dsh.getCpuBase(), 0); - ih.replaceBuffer(ih.getCpuBase(), 0); ioh.replaceBuffer(ioh.getCpuBase(), 0); ssh.replaceBuffer(ssh.getCpuBase(), 0); @@ -699,7 +680,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, stateBaseAddressShouldBeSentIfSize configureCSRHeapStatesToNonDirty(); dsh.replaceBuffer(dsh.getCpuBase(), dshSize); - ih.replaceBuffer(ih.getCpuBase(), ihSize); ioh.replaceBuffer(ioh.getCpuBase(), iohSize); ssh.replaceBuffer(ssh.getCpuBase(), sshSize); @@ -749,18 +729,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenIohHeapChangeWhenFlushTaskIsC EXPECT_NE(cmdList.end(), stateBaseAddressItor); } -HWTEST_F(CommandStreamReceiverFlushTaskTests, givenIshHeapChangeWhenFlushTaskIsCalledThenSbaIsReloaded) { - auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver(); - configureCSRtoNonDirtyState(); - - ih.replaceBuffer(nullptr, 0); - flushTask(commandStreamReceiver); - - parseCommands(commandStreamReceiver.commandStream, 0); - auto stateBaseAddressItor = find(cmdList.begin(), cmdList.end()); - EXPECT_NE(cmdList.end(), stateBaseAddressItor); -} - HWTEST_F(CommandStreamReceiverFlushTaskTests, stateBaseAddressShouldNotBeSentIfTheSame) { auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver(); commandStreamReceiver.isPreambleSent = true; @@ -1010,7 +978,6 @@ HWTEST_F(CommandStreamReceiverCQFlushTaskTests, getCSShouldReturnACSWithEnoughSi linear, linear, linear, - linear, 1, dispatchFlags); @@ -1055,7 +1022,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, blockingFlushTaskWithOnlyPipeContr commandStreamTask, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -1098,7 +1064,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, FlushTaskBlockingHasPipeControlWit commandStreamTask, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -1223,7 +1188,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, FlushTaskWithTaskCSPassedAsCommand commandStreamTask, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2049,7 +2013,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, flushTaskWithPCWhenPreambleSentAnd DispatchFlags dispatchFlags; dispatchFlags.useSLM = true; - commandStreamReceiver.flushTask(commandStream, 0, dsh, ih, ioh, ssh, taskLevel, dispatchFlags); + commandStreamReceiver.flushTask(commandStream, 0, dsh, ioh, ssh, taskLevel, dispatchFlags); // Verify that we didn't grab a new CS buffer EXPECT_EQ(expectedUsed, csrCS.getUsed()); @@ -2167,7 +2131,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInNonDirtyStateWhenflushTa mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2194,7 +2157,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInNonDirtyStateAndBatching mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2228,7 +2190,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2239,8 +2200,8 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas EXPECT_EQ(cmdBufferList.peekHead(), cmdBufferList.peekTail()); auto cmdBuffer = cmdBufferList.peekHead(); - //we should have 4 heaps, tag allocation and csr command stream + cq - EXPECT_EQ(6u, cmdBuffer->surfaces.size()); + //we should have 3 heaps, tag allocation and csr command stream + cq + EXPECT_EQ(5u, cmdBuffer->surfaces.size()); EXPECT_EQ(0, mockCsr->flushCalledCount); @@ -2281,7 +2242,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndTwoRecord mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2290,7 +2250,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndTwoRecord mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2332,7 +2291,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2341,7 +2299,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2350,7 +2307,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2396,7 +2352,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2407,7 +2362,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2418,7 +2372,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndThreeReco mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2460,7 +2413,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2477,7 +2429,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas mockCsr->flushTask(commandStream, commandStream.getUsed(), dsh, - ih, ioh, ssh, taskLevel, @@ -2539,7 +2490,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenRecorded mockCsr->flushTask(commandStream, 4, dsh, - ih, ioh, ssh, taskLevel, @@ -2554,7 +2504,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenRecorded EXPECT_FALSE(cmdBufferList.peekIsEmpty()); auto cmdBuffer = cmdBufferList.peekHead(); - EXPECT_EQ(5u, cmdBuffer->surfaces.size()); + EXPECT_EQ(4u, cmdBuffer->surfaces.size()); //copy those surfaces std::vector residentSurfaces = cmdBuffer->surfaces; @@ -2608,7 +2558,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenBlocking mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2660,7 +2609,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenFlushTas mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2686,7 +2634,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInDefaultModeWhenFlushTask csr.flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2714,7 +2661,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenWaitForT mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2753,7 +2699,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenEnqueueI mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2792,7 +2737,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenSusbsequ mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2813,7 +2757,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenSusbsequ mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2850,7 +2793,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTotalRes mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2872,7 +2814,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTotalRes mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -2905,7 +2846,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTwoTasks mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevelPriorToSubmission, @@ -2915,7 +2855,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenTwoTasks mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevelPriorToSubmission, @@ -2979,7 +2918,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenDcFlushI mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -3007,7 +2945,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenCommandA mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -3037,7 +2974,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWithOutOfOrd mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -3070,7 +3006,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenDcFlushI mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -3102,7 +3037,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndOoqFlagSe mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevelPriorToSubmission, @@ -3112,7 +3046,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeAndOoqFlagSe mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevelPriorToSubmission, @@ -3160,7 +3093,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenPipeCont mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevelPriorToSubmission, @@ -3170,7 +3102,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenPipeCont mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevelPriorToSubmission, @@ -3220,7 +3151,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenThreeTas mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevelPriorToSubmission, @@ -3230,7 +3160,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenThreeTas mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevelPriorToSubmission, @@ -3239,7 +3168,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenCsrInBatchingModeWhenThreeTas mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevelPriorToSubmission, @@ -3355,7 +3283,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithThrottleSetT mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -3386,7 +3313,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithThrottleSetT mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -3417,7 +3343,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenDispatchFlagsWithThrottleSetT mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -3446,7 +3371,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenMockCommandStreamerWhenAddPat mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -3476,7 +3400,6 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenMockCommandStreamerWhenAddPat mockCsr->flushTask(commandStream, 0, dsh, - ih, ioh, ssh, taskLevel, @@ -3497,7 +3420,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenMockCommandStreamerWhenAddPat expectedAddress = ioh.getGpuBase(); break; case PatchInfoAllocationType::InstructionHeap: - expectedAddress = ih.getGpuBase(); + expectedAddress = mockCsr->getMemoryManager()->getInternalHeapBaseAddress(); break; default: expectedAddress = 0u; @@ -3532,7 +3455,9 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenMockCsrWhenCollectStateBaseAd uint64_t commandOffset = 0xa; uint64_t generalStateBase = 0xff; - mockCsr->collectStateBaseAddresPatchInfo(baseAddress, commandOffset, dsh, ih, ioh, ssh, generalStateBase); + auto internalHeapBase = this->pDevice->getMemoryManager()->getInternalHeapBaseAddress(); + + mockCsr->collectStateBaseAddresPatchInfo(baseAddress, commandOffset, dsh, ioh, ssh, generalStateBase, internalHeapBase); ASSERT_EQ(patchInfoDataVector.size(), 5u); PatchInfoData dshPatch = patchInfoDataVector[0]; @@ -3551,7 +3476,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenMockCsrWhenCollectStateBaseAd EXPECT_EQ(dshPatch.targetAllocationOffset, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::DYNAMICSTATEBASEADDRESS_BYTEOFFSET); //IH - EXPECT_EQ(ihPatch.sourceAllocation, ih.getGpuBase()); + EXPECT_EQ(ihPatch.sourceAllocation, internalHeapBase); EXPECT_EQ(ihPatch.targetAllocationOffset, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::INSTRUCTIONBASEADDRESS_BYTEOFFSET); //IOH diff --git a/unit_tests/execution_model/enqueue_execution_model_kernel_tests.cpp b/unit_tests/execution_model/enqueue_execution_model_kernel_tests.cpp index 79f498665e..b1f19f7e65 100644 --- a/unit_tests/execution_model/enqueue_execution_model_kernel_tests.cpp +++ b/unit_tests/execution_model/enqueue_execution_model_kernel_tests.cpp @@ -71,14 +71,11 @@ HWTEST_P(ParentKernelEnqueueTest, givenParentKernelWhenEnqueuedThenDeviceQueueDS MockMultiDispatchInfo multiDispatchInfo(pKernel); - auto ish = &getIndirectHeap(*pCmdQ, multiDispatchInfo); + auto graphicsAllocation = pKernel->getKernelInfo().getGraphicsAllocation(); + auto kernelIsaAddress = graphicsAllocation->getGpuAddressToPatch(); - size_t initialIsh = ish->getUsed(); - // instruction heap is aligned o 64 bytes - initialIsh = alignUp(initialIsh, 64); - - uint64_t lowPart = initialIsh & 0xffffffff; - uint64_t hightPart = (initialIsh & 0xffffffff00000000) >> 32; + uint64_t lowPart = kernelIsaAddress & 0xffffffff; + uint64_t hightPart = (kernelIsaAddress & 0xffffffff00000000) >> 32; pCmdQ->enqueueKernel(pKernel, 1, globalOffsets, workItems, workItems, 0, nullptr, nullptr); @@ -95,8 +92,6 @@ HWTEST_P(ParentKernelEnqueueTest, givenParentKernelWhenEnqueuedThenDeviceQueueDS const uint32_t blockFirstIndex = 1; - uint64_t kernelAddressPrevious = hightPart | lowPart; - for (uint32_t i = 0; i < blockCount; i++) { const KernelInfo *pBlockInfo = blockManager->getBlockKernelInfo(i); @@ -117,9 +112,7 @@ HWTEST_P(ParentKernelEnqueueTest, givenParentKernelWhenEnqueuedThenDeviceQueueDS EXPECT_NE((uint64_t)0u, ((uint64_t)idData[blockFirstIndex + i].getKernelStartPointerHigh() << 32) | (uint64_t)idData[blockFirstIndex + i].getKernelStartPointer()); uint64_t kernelAddress = ((uint64_t)idData[blockFirstIndex + i].getKernelStartPointerHigh() << 32) | (uint64_t)idData[blockFirstIndex + i].getKernelStartPointer(); - - EXPECT_LT(kernelAddressPrevious, kernelAddress); - kernelAddressPrevious = kernelAddress; + EXPECT_EQ(pBlockInfo->getGraphicsAllocation()->getGpuAddressToPatch(), kernelAddress); } } } diff --git a/unit_tests/helpers/kernel_commands_tests.cpp b/unit_tests/helpers/kernel_commands_tests.cpp index 3bfdd2e0c5..4ec758255a 100644 --- a/unit_tests/helpers/kernel_commands_tests.cpp +++ b/unit_tests/helpers/kernel_commands_tests.cpp @@ -70,40 +70,6 @@ struct KernelCommandsTest : DeviceFixture, size_t sizeRequiredISH; }; -HWTEST_F(KernelCommandsTest, copyKernelBinaryResourceUsage) { - CommandQueueHw cmdQ(pContext, pDevice, 0); - - std::unique_ptr srcImage(Image2dHelper<>::create(pContext)); - ASSERT_NE(nullptr, srcImage.get()); - std::unique_ptr dstImage(Image2dHelper<>::create(pContext)); - ASSERT_NE(nullptr, dstImage.get()); - - MultiDispatchInfo multiDispatchInfo; - auto &builder = BuiltIns::getInstance().getBuiltinDispatchInfoBuilder(EBuiltInOps::CopyImageToImage3d, - cmdQ.getContext(), cmdQ.getDevice()); - ASSERT_NE(nullptr, &builder); - - BuiltinDispatchInfoBuilder::BuiltinOpParams dc; - dc.srcMemObj = srcImage.get(); - dc.dstMemObj = dstImage.get(); - dc.srcOffset = {0, 0, 0}; - dc.dstOffset = {0, 0, 0}; - dc.size = {1, 1, 1}; - builder.buildDispatchInfos(multiDispatchInfo, dc); - EXPECT_NE(0u, multiDispatchInfo.size()); - - auto kernel = multiDispatchInfo.begin()->getKernel(); - ASSERT_NE(nullptr, kernel); - - auto &indirectHeap = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, kernel->getKernelHeapSize()); - auto usedIndirectHeapBefore = indirectHeap.getUsed(); - - KernelCommandsHelper::copyKernelBinary(indirectHeap, kernel->getKernelInfo()); - auto usedIndirectHeapAfter = indirectHeap.getUsed(); - - EXPECT_EQ(kernel->getKernelHeapSize(), usedIndirectHeapAfter - usedIndirectHeapBefore); -} - HWTEST_F(KernelCommandsTest, programInterfaceDescriptorDataResourceUsage) { CommandQueueHw cmdQ(pContext, pDevice, 0); @@ -306,11 +272,9 @@ HWTEST_F(KernelCommandsTest, sendIndirectStateResourceUsage) { auto &commandStream = cmdQ.getCS(); auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192); auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192); - auto &ih = cmdQ.getIndirectHeap(IndirectHeap::INSTRUCTION, 8192); auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192); auto usedBeforeCS = commandStream.getUsed(); auto usedBeforeDSH = dsh.getUsed(); - auto usedBeforeIH = ih.getUsed(); auto usedBeforeIOH = ioh.getUsed(); auto usedBeforeSSH = ssh.getUsed(); @@ -326,8 +290,6 @@ HWTEST_F(KernelCommandsTest, sendIndirectStateResourceUsage) { KernelCommandsHelper::sendIndirectState( commandStream, dsh, - ih, - 0, ioh, ssh, *kernel, @@ -341,15 +303,12 @@ HWTEST_F(KernelCommandsTest, sendIndirectStateResourceUsage) { // estimation purposes to avoid OOM. auto usedAfterDSH = dsh.getUsed(); auto usedAfterIOH = ioh.getUsed(); - auto usedAfterIH = ih.getUsed(); auto usedAfterSSH = ssh.getUsed(); auto sizeRequiredDSH = KernelCommandsHelper::getSizeRequiredDSH(*kernel); - auto sizeRequiredIH = KernelCommandsHelper::getSizeRequiredIH(*kernel); auto sizeRequiredIOH = KernelCommandsHelper::getSizeRequiredIOH(*kernel, localWorkSize); auto sizeRequiredSSH = KernelCommandsHelper::getSizeRequiredSSH(*kernel); EXPECT_GE(sizeRequiredDSH, usedAfterDSH - usedBeforeDSH); - EXPECT_GE(sizeRequiredIH, usedAfterIH - usedBeforeIH); EXPECT_GE(sizeRequiredIOH, usedAfterIOH - usedBeforeIOH); EXPECT_GE(sizeRequiredSSH, usedAfterSSH - usedBeforeSSH); @@ -388,7 +347,6 @@ HWTEST_F(KernelCommandsTest, usedBindingTableStatePointer) { auto &commandStream = cmdQ.getCS(); auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192); auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192); - auto &ih = cmdQ.getIndirectHeap(IndirectHeap::INSTRUCTION, 8192); auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192); // Obtain where the pointers will be stored @@ -409,8 +367,6 @@ HWTEST_F(KernelCommandsTest, usedBindingTableStatePointer) { KernelCommandsHelper::sendIndirectState( commandStream, dsh, - ih, - 0, ioh, ssh, *kernel, @@ -546,7 +502,6 @@ HWTEST_F(KernelCommandsTest, usedBindingTableStatePointersForGlobalAndConstantAn auto &commandStream = cmdQ.getCS(); auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192); auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192); - auto &ih = cmdQ.getIndirectHeap(IndirectHeap::INSTRUCTION, 8192); auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192); // Initialize binding table state pointers with pattern @@ -564,8 +519,6 @@ HWTEST_F(KernelCommandsTest, usedBindingTableStatePointersForGlobalAndConstantAn KernelCommandsHelper::sendIndirectState( commandStream, dsh, - ih, - 0, ioh, ssh, *pKernel, @@ -757,7 +710,6 @@ HWTEST_F(KernelCommandsTest, GivenKernelWithSamplersWhenIndirectStateIsProgramme auto &commandStream = cmdQ.getCS(); auto &dsh = cmdQ.getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192); auto &ioh = cmdQ.getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 8192); - auto &ih = cmdQ.getIndirectHeap(IndirectHeap::INSTRUCTION, 8192); auto &ssh = cmdQ.getIndirectHeap(IndirectHeap::SURFACE_STATE, 8192); const uint32_t borderColorSize = 64; @@ -799,8 +751,6 @@ HWTEST_F(KernelCommandsTest, GivenKernelWithSamplersWhenIndirectStateIsProgramme KernelCommandsHelper::sendIndirectState( commandStream, dsh, - ih, - 0, ioh, ssh, *kernel, diff --git a/unit_tests/indirect_heap/indirect_heap_fixture.cpp b/unit_tests/indirect_heap/indirect_heap_fixture.cpp index 0860196503..4d7d6d0863 100644 --- a/unit_tests/indirect_heap/indirect_heap_fixture.cpp +++ b/unit_tests/indirect_heap/indirect_heap_fixture.cpp @@ -29,6 +29,5 @@ void IndirectHeapFixture::SetUp(CommandQueue *pCmdQ) { pDSH = &pCmdQ->getIndirectHeap(IndirectHeap::DYNAMIC_STATE, 8192); pSSH = &pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, 4096); pIOH = &pCmdQ->getIndirectHeap(IndirectHeap::INDIRECT_OBJECT, 4096); - pIH = &pCmdQ->getIndirectHeap(IndirectHeap::INSTRUCTION, 4096); } } diff --git a/unit_tests/indirect_heap/indirect_heap_fixture.h b/unit_tests/indirect_heap/indirect_heap_fixture.h index 5c454be735..760a26f12e 100644 --- a/unit_tests/indirect_heap/indirect_heap_fixture.h +++ b/unit_tests/indirect_heap/indirect_heap_fixture.h @@ -30,7 +30,6 @@ class CommandQueue; struct IndirectHeapFixture { IndirectHeapFixture() : pDSH(nullptr), - pIH(nullptr), pIOH(nullptr), pSSH(nullptr) { } @@ -40,7 +39,6 @@ struct IndirectHeapFixture { } IndirectHeap *pDSH; - IndirectHeap *pIH; IndirectHeap *pIOH; IndirectHeap *pSSH; }; diff --git a/unit_tests/kernel/kernel_tests.cpp b/unit_tests/kernel/kernel_tests.cpp index bfc93f56ff..3b912cc5ee 100644 --- a/unit_tests/kernel/kernel_tests.cpp +++ b/unit_tests/kernel/kernel_tests.cpp @@ -451,7 +451,6 @@ class CommandStreamReceiverMock : public CommandStreamReceiver { LinearStream &commandStream, size_t commandStreamStart, const LinearStream &dsh, - const LinearStream &ih, const LinearStream &ioh, const LinearStream &ssh, uint32_t taskLevel, diff --git a/unit_tests/libult/ult_command_stream_receiver.h b/unit_tests/libult/ult_command_stream_receiver.h index b21f5bd3f5..46f0f0f8ed 100644 --- a/unit_tests/libult/ult_command_stream_receiver.h +++ b/unit_tests/libult/ult_command_stream_receiver.h @@ -35,7 +35,6 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw { public: using BaseClass::dshState; using BaseClass::hwInfo; - using BaseClass::ihState; using BaseClass::iohState; using BaseClass::lastWaitForCompletionTimestamp; using BaseClass::sshState; diff --git a/unit_tests/mocks/mock_csr.cpp b/unit_tests/mocks/mock_csr.cpp index 9de7522714..7b8764fae7 100644 --- a/unit_tests/mocks/mock_csr.cpp +++ b/unit_tests/mocks/mock_csr.cpp @@ -32,7 +32,6 @@ CompletionStamp MockCommandStreamReceiver::flushTask( LinearStream &commandStream, size_t commandStreamStart, const LinearStream &dsh, - const LinearStream &ih, const LinearStream &ioh, const LinearStream &ssh, uint32_t taskLevel, diff --git a/unit_tests/mocks/mock_csr.h b/unit_tests/mocks/mock_csr.h index 0a81dbdfe2..62eaca5009 100644 --- a/unit_tests/mocks/mock_csr.h +++ b/unit_tests/mocks/mock_csr.h @@ -120,7 +120,6 @@ class MockCsr : public MockCsrBase { LinearStream &commandStream, size_t commandStreamStart, const LinearStream &dsh, - const LinearStream &ih, const LinearStream &ioh, const LinearStream &ssh, uint32_t taskLevel, @@ -135,7 +134,6 @@ class MockCsr : public MockCsrBase { commandStream, commandStreamStart, dsh, - ih, ioh, ssh, taskLevel, @@ -191,11 +189,11 @@ class MockCsrHw2 : public CommandStreamReceiverHw { } CompletionStamp flushTask(LinearStream &commandStream, size_t commandStreamStart, - const LinearStream &dsh, const LinearStream &ih, const LinearStream &ioh, + const LinearStream &dsh, const LinearStream &ioh, const LinearStream &ssh, uint32_t taskLevel, DispatchFlags &dispatchFlags) override { passedDispatchFlags = dispatchFlags; return CommandStreamReceiverHw::flushTask(commandStream, commandStreamStart, - dsh, ih, ioh, ssh, taskLevel, dispatchFlags); + dsh, ioh, ssh, taskLevel, dispatchFlags); } int flushCalledCount = 0; @@ -220,7 +218,6 @@ class MockCommandStreamReceiver : public CommandStreamReceiver { LinearStream &commandStream, size_t commandStreamStart, const LinearStream &dsh, - const LinearStream &ih, const LinearStream &ioh, const LinearStream &ssh, uint32_t taskLevel, diff --git a/unit_tests/os_interface/linux/drm_command_stream_tests.cpp b/unit_tests/os_interface/linux/drm_command_stream_tests.cpp index 87ef313a64..2b165adda4 100644 --- a/unit_tests/os_interface/linux/drm_command_stream_tests.cpp +++ b/unit_tests/os_interface/linux/drm_command_stream_tests.cpp @@ -559,7 +559,7 @@ struct DrmCsrVfeTests : ::testing::Test { void flushTask(CommandStreamReceiver &csr, LinearStream &stream, bool lowPriority) { dispatchFlags.lowPriority = lowPriority; - csr.flushTask(stream, 0, stream, stream, stream, stream, 0, dispatchFlags); + csr.flushTask(stream, 0, stream, stream, stream, 0, dispatchFlags); } HardwareParse hwParser; @@ -988,7 +988,7 @@ TEST_F(DrmCommandStreamBatchingTests, givenCsrWhenDispatchPolicyIsSetToBatchingT tCsr->setTagAllocation(tagAllocation); DispatchFlags dispatchFlags; - tCsr->flushTask(cs, 0u, cs, cs, cs, cs, 0u, dispatchFlags); + tCsr->flushTask(cs, 0u, cs, cs, cs, 0u, dispatchFlags); //make sure command buffer is recorded auto &cmdBuffers = mockedSubmissionsAggregator->peekCommandBuffers(); @@ -1041,7 +1041,7 @@ TEST_F(DrmCommandStreamBatchingTests, givenRecordedCommandBufferWhenItIsSubmitte DispatchFlags dispatchFlags; dispatchFlags.guardCommandBufferWithPipeControl = true; - tCsr->flushTask(cs, 0u, cs, cs, cs, cs, 0u, dispatchFlags); + tCsr->flushTask(cs, 0u, cs, cs, cs, 0u, dispatchFlags); auto &cmdBuffers = mockedSubmissionsAggregator->peekCommandBuffers(); auto storedCommandBuffer = cmdBuffers.peekHead(); diff --git a/unit_tests/os_interface/windows/device_command_stream_tests.cpp b/unit_tests/os_interface/windows/device_command_stream_tests.cpp index 71e3937e4f..e00ff25b59 100644 --- a/unit_tests/os_interface/windows/device_command_stream_tests.cpp +++ b/unit_tests/os_interface/windows/device_command_stream_tests.cpp @@ -676,7 +676,7 @@ HWTEST_F(WddmCommandStreamMockGdiTest, givenRecordedCommandBufferWhenItIsSubmitt DispatchFlags dispatchFlags; dispatchFlags.guardCommandBufferWithPipeControl = true; dispatchFlags.requiresCoherency = true; - mockCsr->flushTask(cs, 0u, cs, cs, cs, cs, 0u, dispatchFlags); + mockCsr->flushTask(cs, 0u, cs, cs, cs, 0u, dispatchFlags); auto &cmdBuffers = mockedSubmissionsAggregator->peekCommandBuffers(); auto storedCommandBuffer = cmdBuffers.peekHead(); @@ -809,12 +809,12 @@ HWTEST_F(WddmCsrCompressionTests, givenEnabledCompressionWhenFlushingThenInitTra EXPECT_CALL(*mockMngr, initContextTRTableRegister(&mockWddmCsr, GMM_ENGINE_TYPE::ENGINE_TYPE_RCS)).Times(1).WillOnce(Return(GMM_SUCCESS)); DispatchFlags dispatchFlags; - mockWddmCsr.flushTask(cs, 0u, cs, cs, cs, cs, 0u, dispatchFlags); + mockWddmCsr.flushTask(cs, 0u, cs, cs, cs, 0u, dispatchFlags); EXPECT_TRUE(mockWddmCsr.pageTableManagerInitialized); // flush again to check if PT manager was initialized once - mockWddmCsr.flushTask(cs, 0u, cs, cs, cs, cs, 0u, dispatchFlags); + mockWddmCsr.flushTask(cs, 0u, cs, cs, cs, 0u, dispatchFlags); memManager->freeGraphicsMemory(graphicsAllocation); } @@ -836,7 +836,7 @@ HWTEST_F(WddmCsrCompressionTests, givenDisabledCompressionWhenFlushingThenDontIn EXPECT_FALSE(mockWddmCsr.pageTableManagerInitialized); DispatchFlags dispatchFlags; - mockWddmCsr.flushTask(cs, 0u, cs, cs, cs, cs, 0u, dispatchFlags); + mockWddmCsr.flushTask(cs, 0u, cs, cs, cs, 0u, dispatchFlags); EXPECT_FALSE(mockWddmCsr.pageTableManagerInitialized);