From ccd93e1ea818b0314c8f365f8858f7e909631f18 Mon Sep 17 00:00:00 2001 From: "Dunajski, Bartosz" Date: Wed, 3 Apr 2019 15:59:31 +0200 Subject: [PATCH] Add method to dispatch blit operation from hostPtr to Buffer Related-To: NEO-3020 Change-Id: If76f2c659c3ee343693a6d3ced86a47d7ed0bf61 Signed-off-by: Dunajski, Bartosz --- .../command_stream/command_stream_receiver.h | 2 + .../command_stream_receiver_hw.h | 2 + .../command_stream_receiver_hw.inl | 31 +++++++ .../command_stream_receiver_hw_gen10.cpp | 3 +- .../command_stream_receiver_hw_gen11.cpp | 3 +- .../gen8/command_stream_receiver_hw_gen8.cpp | 3 +- .../gen9/command_stream_receiver_hw_gen9.cpp | 3 +- runtime/helpers/CMakeLists.txt | 2 + runtime/helpers/blit_commands_helper.h | 21 +++++ runtime/helpers/blit_commands_helper.inl | 78 +++++++++++++++++ runtime/memory_manager/memory_constants.h | 7 ++ .../os_agnostic_memory_manager.cpp | 6 +- .../command_stream_receiver_hw_tests.cpp | 84 +++++++++++++++++++ unit_tests/kernel/kernel_tests.cpp | 1 + unit_tests/mocks/mock_csr.h | 2 + 15 files changed, 243 insertions(+), 5 deletions(-) create mode 100644 runtime/helpers/blit_commands_helper.h create mode 100644 runtime/helpers/blit_commands_helper.inl diff --git a/runtime/command_stream/command_stream_receiver.h b/runtime/command_stream/command_stream_receiver.h index b597fbe19f..f4f0955ed1 100644 --- a/runtime/command_stream/command_stream_receiver.h +++ b/runtime/command_stream/command_stream_receiver.h @@ -180,6 +180,8 @@ class CommandStreamReceiver { this->latestSentTaskCount = latestSentTaskCount; } + virtual void blitFromHostPtr(MemObj &destinationMemObj, void *sourceHostPtr, uint64_t sourceSize) = 0; + protected: void cleanupResources(); diff --git a/runtime/command_stream/command_stream_receiver_hw.h b/runtime/command_stream/command_stream_receiver_hw.h index 5c4cc1b345..c548b1b739 100644 --- a/runtime/command_stream/command_stream_receiver_hw.h +++ b/runtime/command_stream/command_stream_receiver_hw.h @@ -70,6 +70,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver { return CommandStreamReceiverType::CSR_HW; } + void blitFromHostPtr(MemObj &destinationMemObj, void *sourceHostPtr, uint64_t sourceSize) override; + protected: using CommandStreamReceiver::osContext; diff --git a/runtime/command_stream/command_stream_receiver_hw.inl b/runtime/command_stream/command_stream_receiver_hw.inl index 56fc2bb21b..cddcda0f11 100644 --- a/runtime/command_stream/command_stream_receiver_hw.inl +++ b/runtime/command_stream/command_stream_receiver_hw.inl @@ -14,6 +14,7 @@ #include "runtime/device/device.h" #include "runtime/event/event.h" #include "runtime/gtpin/gtpin_notify.h" +#include "runtime/helpers/blit_commands_helper.h" #include "runtime/helpers/cache_policy.h" #include "runtime/helpers/flat_batch_buffer_helper_hw.h" #include "runtime/helpers/flush_stamp.h" @@ -775,4 +776,34 @@ bool CommandStreamReceiverHw::detectInitProgrammingFlagsRequired(cons return DebugManager.flags.ForceCsrReprogramming.get(); } +template +void CommandStreamReceiverHw::blitFromHostPtr(MemObj &destinationMemObj, void *sourceHostPtr, uint64_t sourceSize) { + using MI_BATCH_BUFFER_END = typename GfxFamily::MI_BATCH_BUFFER_END; + using MI_FLUSH_DW = typename GfxFamily::MI_FLUSH_DW; + + UNRECOVERABLE_IF(osContext->getEngineType() != aub_stream::EngineType::ENGINE_BCS); + + auto &commandStream = getCS(BlitCommandsHelper::estimateBlitCommandsSize(sourceSize)); + + HostPtrSurface hostPtrSurface(sourceHostPtr, static_cast(sourceSize), true); + bool success = createAllocationForHostSurface(hostPtrSurface, false); + UNRECOVERABLE_IF(!success); + + UNRECOVERABLE_IF(destinationMemObj.peekClMemObjType() != CL_MEM_OBJECT_BUFFER); + BlitCommandsHelper::dispatchBlitCommandsForBuffer(static_cast(destinationMemObj), commandStream, *hostPtrSurface.getAllocation(), sourceSize); + + auto miFlushDwCmd = reinterpret_cast(commandStream.getSpace(sizeof(MI_FLUSH_DW))); + *miFlushDwCmd = GfxFamily::cmdInitMiFlushDw; + miFlushDwCmd->setPostSyncOperation(MI_FLUSH_DW::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA_QWORD); + miFlushDwCmd->setDestinationAddress(tagAllocation->getGpuAddress()); + miFlushDwCmd->setImmediateData(taskCount + 1); + + auto batchBufferEnd = reinterpret_cast(commandStream.getSpace(sizeof(MI_BATCH_BUFFER_END))); + *batchBufferEnd = GfxFamily::cmdInitBatchBufferEnd; + + alignToCacheLine(commandStream); + + taskCount++; +} + } // namespace NEO diff --git a/runtime/gen10/command_stream_receiver_hw_gen10.cpp b/runtime/gen10/command_stream_receiver_hw_gen10.cpp index 72806d8c4d..ab82c12b5e 100644 --- a/runtime/gen10/command_stream_receiver_hw_gen10.cpp +++ b/runtime/gen10/command_stream_receiver_hw_gen10.cpp @@ -7,6 +7,7 @@ #include "runtime/command_stream/command_stream_receiver_hw.inl" #include "runtime/command_stream/device_command_stream.h" +#include "runtime/helpers/blit_commands_helper.inl" #include "hw_cmds.h" #include "hw_info.h" @@ -38,8 +39,8 @@ void populateFactoryTable>() { commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver::create; } -// Explicitly instantiate CommandStreamReceiverHw for this device family template class CommandStreamReceiverHw; +template struct BlitCommandsHelper; const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit(); const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit(); diff --git a/runtime/gen11/command_stream_receiver_hw_gen11.cpp b/runtime/gen11/command_stream_receiver_hw_gen11.cpp index cb9bcee77a..917e921ac9 100644 --- a/runtime/gen11/command_stream_receiver_hw_gen11.cpp +++ b/runtime/gen11/command_stream_receiver_hw_gen11.cpp @@ -8,6 +8,7 @@ #include "runtime/command_stream/command_stream_receiver_hw.inl" #include "runtime/command_stream/device_command_stream.h" #include "runtime/gen11/reg_configs.h" +#include "runtime/helpers/blit_commands_helper.inl" #include "runtime/os_interface/debug_settings_manager.h" namespace NEO { @@ -141,8 +142,8 @@ void populateFactoryTable>() { commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver::create; } -// Explicitly instantiate CommandStreamReceiverHw for this device family template class CommandStreamReceiverHw; +template struct BlitCommandsHelper; const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit(); const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit(); diff --git a/runtime/gen8/command_stream_receiver_hw_gen8.cpp b/runtime/gen8/command_stream_receiver_hw_gen8.cpp index c3f25ca316..c0be5443b9 100644 --- a/runtime/gen8/command_stream_receiver_hw_gen8.cpp +++ b/runtime/gen8/command_stream_receiver_hw_gen8.cpp @@ -7,6 +7,7 @@ #include "runtime/command_stream/command_stream_receiver_hw.inl" #include "runtime/command_stream/device_command_stream.h" +#include "runtime/helpers/blit_commands_helper.inl" #include "hw_cmds.h" #include "hw_info.h" @@ -35,8 +36,8 @@ void CommandStreamReceiverHw::addClearSLMWorkAround(Family::PIPE_CONTROL pCmd->setProtectedMemoryDisable(1); } -// Explicitly instantiate CommandStreamReceiverHw for this device family template class CommandStreamReceiverHw; +template struct BlitCommandsHelper; const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit(); const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit(); diff --git a/runtime/gen9/command_stream_receiver_hw_gen9.cpp b/runtime/gen9/command_stream_receiver_hw_gen9.cpp index 41f8774779..979f47565b 100644 --- a/runtime/gen9/command_stream_receiver_hw_gen9.cpp +++ b/runtime/gen9/command_stream_receiver_hw_gen9.cpp @@ -7,6 +7,7 @@ #include "runtime/command_stream/command_stream_receiver_hw.inl" #include "runtime/command_stream/device_command_stream.h" +#include "runtime/helpers/blit_commands_helper.inl" #include "hw_cmds.h" #include "hw_info.h" @@ -30,8 +31,8 @@ void populateFactoryTable>() { commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver::create; } -// Explicitly instantiate CommandStreamReceiverHw for this device family template class CommandStreamReceiverHw; +template struct BlitCommandsHelper; const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit(); const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit(); diff --git a/runtime/helpers/CMakeLists.txt b/runtime/helpers/CMakeLists.txt index e22cd95978..112a8854d7 100644 --- a/runtime/helpers/CMakeLists.txt +++ b/runtime/helpers/CMakeLists.txt @@ -14,6 +14,8 @@ set(RUNTIME_SRCS_HELPERS_BASE ${CMAKE_CURRENT_SOURCE_DIR}/base_object.h ${CMAKE_CURRENT_SOURCE_DIR}/base_object_allocator.cpp ${CMAKE_CURRENT_SOURCE_DIR}/basic_math.h + ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper.inl + ${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper.h ${CMAKE_CURRENT_SOURCE_DIR}/built_ins_helper.h ${CMAKE_CURRENT_SOURCE_DIR}/cache_policy.cpp ${CMAKE_CURRENT_SOURCE_DIR}/cache_policy.h diff --git a/runtime/helpers/blit_commands_helper.h b/runtime/helpers/blit_commands_helper.h new file mode 100644 index 0000000000..d5c3618300 --- /dev/null +++ b/runtime/helpers/blit_commands_helper.h @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2019 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#pragma once +#include + +namespace NEO { +class Buffer; +class GraphicsAllocation; +class LinearStream; + +template +struct BlitCommandsHelper { + static size_t estimateBlitCommandsSize(uint64_t copySize); + static void dispatchBlitCommandsForBuffer(Buffer &buffer, LinearStream &linearStream, GraphicsAllocation &hostPtrAllocation, uint64_t copySize); +}; +} // namespace NEO diff --git a/runtime/helpers/blit_commands_helper.inl b/runtime/helpers/blit_commands_helper.inl new file mode 100644 index 0000000000..519a7d8834 --- /dev/null +++ b/runtime/helpers/blit_commands_helper.inl @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2019 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "runtime/helpers/blit_commands_helper.h" + +namespace NEO { + +template +size_t BlitCommandsHelper::estimateBlitCommandsSize(uint64_t copySize) { + size_t numberOfBlits = 0; + uint64_t sizeToBlit = copySize; + uint64_t width = 1; + uint64_t height = 1; + + while (sizeToBlit != 0) { + if (sizeToBlit > BlitterConstants::maxBlitWidth) { + // 2D: maxBlitWidth x (1 .. maxBlitHeight) + width = BlitterConstants::maxBlitWidth; + height = std::min((sizeToBlit / width), BlitterConstants::maxBlitHeight); + } else { + // 1D: (1 .. maxBlitWidth) x 1 + width = sizeToBlit; + height = 1; + } + sizeToBlit -= (width * height); + numberOfBlits++; + } + + size_t size = (sizeof(typename GfxFamily::XY_COPY_BLT) * numberOfBlits) + + sizeof(typename GfxFamily::MI_FLUSH_DW) + + sizeof(typename GfxFamily::MI_BATCH_BUFFER_END); + + return alignUp(size, MemoryConstants::cacheLineSize); +} + +template +void BlitCommandsHelper::dispatchBlitCommandsForBuffer(Buffer &buffer, LinearStream &linearStream, + GraphicsAllocation &hostPtrAllocation, uint64_t copySize) { + uint64_t sizeToBlit = copySize; + uint64_t width = 1; + uint64_t height = 1; + uint64_t offset = 0; + + while (sizeToBlit != 0) { + if (sizeToBlit > BlitterConstants::maxBlitWidth) { + // dispatch 2D blit: maxBlitWidth x (1 .. maxBlitHeight) + width = BlitterConstants::maxBlitWidth; + height = std::min((sizeToBlit / width), BlitterConstants::maxBlitHeight); + } else { + // dispatch 1D blt: (1 .. maxBlitWidth) x 1 + width = sizeToBlit; + height = 1; + } + + auto bltCmd = linearStream.getSpaceForCmd(); + *bltCmd = GfxFamily::cmdInitXyCopyBlt; + + bltCmd->setDestinationX1CoordinateLeft(0); + bltCmd->setDestinationY1CoordinateTop(0); + bltCmd->setSourceX1CoordinateLeft(0); + bltCmd->setSourceY1CoordinateTop(0); + + bltCmd->setDestinationX2CoordinateRight(static_cast(width)); + bltCmd->setDestinationY2CoordinateBottom(static_cast(height)); + + bltCmd->setDestinationBaseAddress(buffer.getGraphicsAllocation()->getGpuAddress() + offset); + bltCmd->setSourceBaseAddress(hostPtrAllocation.getGpuAddress() + offset); + + auto blitSize = width * height; + sizeToBlit -= blitSize; + offset += blitSize; + } +} +} // namespace NEO diff --git a/runtime/memory_manager/memory_constants.h b/runtime/memory_manager/memory_constants.h index 1d17dd866e..5972b7bc1c 100644 --- a/runtime/memory_manager/memory_constants.h +++ b/runtime/memory_manager/memory_constants.h @@ -45,4 +45,11 @@ static const uintptr_t page4kEntryMask = std::numeric_limits::max() & static const uintptr_t page64kEntryMask = std::numeric_limits::max() & ~MemoryConstants::page64kMask; static const int GfxAddressBits = is64bit ? 48 : 32; static const uint64_t maxSvmAddress = is64bit ? maxNBitValue<47> : maxNBitValue<32>; + } // namespace MemoryConstants + +namespace BlitterConstants { +static constexpr uint64_t maxBlitWidth = 0x7FFF; +static constexpr uint64_t maxBlitHeight = 0x7FFF; +static constexpr uint64_t max2dBlitSize = maxBlitWidth * maxBlitHeight; +} // namespace BlitterConstants diff --git a/runtime/memory_manager/os_agnostic_memory_manager.cpp b/runtime/memory_manager/os_agnostic_memory_manager.cpp index 370258e773..9bdeddfe7d 100644 --- a/runtime/memory_manager/os_agnostic_memory_manager.cpp +++ b/runtime/memory_manager/os_agnostic_memory_manager.cpp @@ -104,7 +104,11 @@ GraphicsAllocation *OsAgnosticMemoryManager::allocate32BitGraphicsMemoryImpl(con auto gpuAddress = allocator32Bit->allocate(allocationSize); if (allocationData.size < 0xfffff000) { - ptrAlloc = alignedMallocWrapper(allocationSize, MemoryConstants::allocationAlignment); + if (fakeBigAllocations) { + ptrAlloc = reinterpret_cast(dummyAddress); + } else { + ptrAlloc = alignedMallocWrapper(allocationSize, MemoryConstants::allocationAlignment); + } } MemoryAllocation *memoryAllocation = nullptr; 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 325b2c94c1..ae8fb11aa5 100644 --- a/unit_tests/command_stream/command_stream_receiver_hw_tests.cpp +++ b/unit_tests/command_stream/command_stream_receiver_hw_tests.cpp @@ -14,6 +14,7 @@ #include "runtime/command_stream/scratch_space_controller.h" #include "runtime/event/user_event.h" #include "runtime/helpers/aligned_memory.h" +#include "runtime/helpers/blit_commands_helper.h" #include "runtime/helpers/cache_policy.h" #include "runtime/helpers/preamble.h" #include "runtime/helpers/ptr_math.h" @@ -21,6 +22,7 @@ #include "runtime/memory_manager/graphics_allocation.h" #include "runtime/memory_manager/memory_manager.h" #include "runtime/os_interface/debug_settings_manager.h" +#include "runtime/os_interface/os_context.h" #include "runtime/utilities/linux/debug_env_reader.h" #include "test.h" #include "unit_tests/fixtures/built_in_fixture.h" @@ -38,6 +40,7 @@ #include "unit_tests/mocks/mock_event.h" #include "unit_tests/mocks/mock_kernel.h" #include "unit_tests/mocks/mock_submissions_aggregator.h" +#include "unit_tests/utilities/base_object_utils.h" #include "reg_configs_common.h" @@ -250,3 +253,84 @@ HWTEST_F(CommandStreamReceiverHwTest, WhenScratchSpaceIsRequiredThenCorrectAddre scratchController->getScratchSpaceAllocation()->setCpuPtrAndGpuAddress(scratchController->getScratchSpaceAllocation()->getUnderlyingBuffer(), expectedScratchAddress); EXPECT_TRUE(UnitTestHelper::evaluateGshAddressForScratchSpace((expectedScratchAddress - MemoryConstants::pageSize), scratchController->calculateNewGSH())); } + +HWTEST_F(CommandStreamReceiverHwTest, givenBltSizeWhenEstimatingCommandSizeThenAddAllRequiredCommands) { + uint64_t alignedBltSize = (3 * BlitterConstants::max2dBlitSize) + 1; + uint64_t notAlignedBltSize = (3 * BlitterConstants::max2dBlitSize); + uint32_t alignedNumberOfBlts = 4; + uint32_t notAlignedNumberOfBlts = 3; + + size_t expectedSize = sizeof(typename FamilyType::MI_FLUSH_DW) + sizeof(typename FamilyType::MI_BATCH_BUFFER_END); + + auto expectedAlignedSize = alignUp(expectedSize + (sizeof(typename FamilyType::XY_COPY_BLT) * alignedNumberOfBlts), MemoryConstants::cacheLineSize); + auto expectedNotAlignedSize = alignUp(expectedSize + (sizeof(typename FamilyType::XY_COPY_BLT) * notAlignedNumberOfBlts), MemoryConstants::cacheLineSize); + + auto alignedEstimatedSize = BlitCommandsHelper::estimateBlitCommandsSize(alignedBltSize); + auto notAlignedEstimatedSize = BlitCommandsHelper::estimateBlitCommandsSize(notAlignedBltSize); + + EXPECT_EQ(expectedAlignedSize, alignedEstimatedSize); + EXPECT_EQ(expectedNotAlignedSize, notAlignedEstimatedSize); +} + +HWTEST_F(CommandStreamReceiverHwTest, givenBltSizeWithLeftoverWhenDispatchedThenProgramAllRequiredCommands) { + using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW; + auto &csr = pDevice->getUltCommandStreamReceiver(); + MockContext context(pDevice); + static_cast(csr.getMemoryManager())->turnOnFakingBigAllocations(); + auto engine = csr.getMemoryManager()->getRegisteredEngineForCsr(&csr); + auto contextId = engine->osContext->getContextId(); + + delete engine->osContext; + engine->osContext = OsContext::create(nullptr, contextId, 0, aub_stream::EngineType::ENGINE_BCS, PreemptionMode::Disabled, false); + engine->osContext->incRefInternal(); + csr.setupContext(*engine->osContext); + + uint32_t bltLeftover = 17; + uint64_t bltSize = (2 * BlitterConstants::max2dBlitSize) + bltLeftover; + uint32_t numberOfBlts = 3; + + cl_int retVal = CL_SUCCESS; + auto buffer = clUniquePtr(Buffer::create(&context, CL_MEM_READ_WRITE, static_cast(bltSize), nullptr, retVal)); + void *hostPtr = reinterpret_cast(0x12340000); + + uint32_t newTaskCount = 19; + csr.taskCount = newTaskCount - 1; + csr.blitFromHostPtr(*buffer, hostPtr, bltSize); + EXPECT_EQ(newTaskCount, csr.taskCount); + + HardwareParse hwParser; + hwParser.parseCommands(csr.commandStream); + auto &cmdList = hwParser.cmdList; + + auto cmdIterator = cmdList.begin(); + + for (uint32_t i = 0; i < numberOfBlts; i++) { + auto bltCmd = genCmdCast(*(cmdIterator++)); + EXPECT_NE(nullptr, bltCmd); + + EXPECT_EQ(0u, bltCmd->getDestinationX1CoordinateLeft()); + EXPECT_EQ(0u, bltCmd->getDestinationY1CoordinateTop()); + EXPECT_EQ(0u, bltCmd->getSourceX1CoordinateLeft()); + EXPECT_EQ(0u, bltCmd->getSourceY1CoordinateTop()); + if (i == (numberOfBlts - 1)) { + EXPECT_EQ(bltLeftover, bltCmd->getDestinationX2CoordinateRight()); + EXPECT_EQ(1u, bltCmd->getDestinationY2CoordinateBottom()); + } else { + EXPECT_EQ(static_cast(BlitterConstants::maxBlitWidth), bltCmd->getDestinationX2CoordinateRight()); + EXPECT_EQ(static_cast(BlitterConstants::maxBlitWidth), bltCmd->getDestinationY2CoordinateBottom()); + } + } + + auto miFlushCmd = genCmdCast(*(cmdIterator++)); + EXPECT_NE(nullptr, miFlushCmd); + EXPECT_EQ(MI_FLUSH_DW::POST_SYNC_OPERATION_WRITE_IMMEDIATE_DATA_QWORD, miFlushCmd->getPostSyncOperation()); + EXPECT_EQ(csr.getTagAllocation()->getGpuAddress(), miFlushCmd->getDestinationAddress()); + EXPECT_EQ(newTaskCount, miFlushCmd->getImmediateData()); + + EXPECT_NE(nullptr, genCmdCast(*(cmdIterator++))); + + // padding + while (cmdIterator != cmdList.end()) { + EXPECT_NE(nullptr, genCmdCast(*(cmdIterator++))); + } +} diff --git a/unit_tests/kernel/kernel_tests.cpp b/unit_tests/kernel/kernel_tests.cpp index 49efa3d6f4..8991925dea 100644 --- a/unit_tests/kernel/kernel_tests.cpp +++ b/unit_tests/kernel/kernel_tests.cpp @@ -544,6 +544,7 @@ class CommandStreamReceiverMock : public CommandStreamReceiver { void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool quickKmdSleep, bool forcePowerSavingMode) override { } + void blitFromHostPtr(MemObj &destinationMemObj, void *sourceHostPtr, uint64_t sourceSize) override{}; CompletionStamp flushTask( LinearStream &commandStream, diff --git a/unit_tests/mocks/mock_csr.h b/unit_tests/mocks/mock_csr.h index fde3ae3492..247e8acaaa 100644 --- a/unit_tests/mocks/mock_csr.h +++ b/unit_tests/mocks/mock_csr.h @@ -245,6 +245,8 @@ class MockCommandStreamReceiver : public CommandStreamReceiver { void waitForTaskCountWithKmdNotifyFallback(uint32_t taskCountToWait, FlushStamp flushStampToWait, bool quickKmdSleep, bool forcePowerSavingMode) override { } + void blitFromHostPtr(MemObj &destinationMemObj, void *sourceHostPtr, uint64_t sourceSize) override{}; + void setOSInterface(OSInterface *osInterface); CommandStreamReceiverType getType() override {