diff --git a/level_zero/core/source/cmdqueue/cmdqueue_hw.h b/level_zero/core/source/cmdqueue/cmdqueue_hw.h index ec5a847b2f..18040d6115 100644 --- a/level_zero/core/source/cmdqueue/cmdqueue_hw.h +++ b/level_zero/core/source/cmdqueue/cmdqueue_hw.h @@ -43,10 +43,10 @@ struct CommandQueueHw : public CommandQueueImp { size_t estimatePipelineSelect(); void programPipelineSelect(NEO::LinearStream &commandStream); - void handleScratchSpace(NEO::ResidencyContainer &residency, - NEO::HeapContainer &heapContainer, - NEO::ScratchSpaceController *scratchController, - bool &gsbaState, bool &frontEndState); + MOCKABLE_VIRTUAL void handleScratchSpace(NEO::ResidencyContainer &residency, + NEO::HeapContainer &heapContainer, + NEO::ScratchSpaceController *scratchController, + bool &gsbaState, bool &frontEndState); }; } // namespace L0 diff --git a/level_zero/core/test/unit_tests/sources/cmdqueue/CMakeLists.txt b/level_zero/core/test/unit_tests/sources/cmdqueue/CMakeLists.txt index 080cd91f66..affb6fdf6a 100644 --- a/level_zero/core/test/unit_tests/sources/cmdqueue/CMakeLists.txt +++ b/level_zero/core/test/unit_tests/sources/cmdqueue/CMakeLists.txt @@ -8,3 +8,4 @@ target_sources(${TARGET_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt ${CMAKE_CURRENT_SOURCE_DIR}/test_cmdqueue.cpp ) +add_subdirectories() diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp index 634fb7bb17..ba8479309f 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_flush_task_2_tests.cpp @@ -488,7 +488,6 @@ struct MockScratchController : public ScratchSpaceController { } uint64_t calculateNewGSH() override { return 0u; }; uint64_t getScratchPatchAddress() override { return 0u; }; - void programHeaps(HeapContainer &heapContainer, uint32_t scratchSlot, uint32_t requiredPerThreadScratchSize, diff --git a/shared/source/command_container/cmdcontainer.cpp b/shared/source/command_container/cmdcontainer.cpp index aaa376a9ff..6db0cff3a2 100644 --- a/shared/source/command_container/cmdcontainer.cpp +++ b/shared/source/command_container/cmdcontainer.cpp @@ -136,6 +136,7 @@ void CommandContainer::reset() { } indirectHeaps[IndirectHeap::Type::SURFACE_STATE]->getSpace(4 * MemoryConstants::pageSize); + iddBlock = nullptr; nextIddInBlock = this->getNumIddPerBlock(); lastSentNumGrfRequired = 0; diff --git a/shared/source/command_stream/scratch_space_controller.h b/shared/source/command_stream/scratch_space_controller.h index f9f4b23cc6..7e32d11c05 100644 --- a/shared/source/command_stream/scratch_space_controller.h +++ b/shared/source/command_stream/scratch_space_controller.h @@ -12,7 +12,6 @@ #include namespace NEO { - class Device; class ExecutionEnvironment; class GraphicsAllocation; @@ -32,7 +31,7 @@ class ScratchSpaceController { ScratchSpaceController(uint32_t rootDeviceIndex, ExecutionEnvironment &environment, InternalAllocationStorage &allocationStorage); virtual ~ScratchSpaceController(); - GraphicsAllocation *getScratchSpaceAllocation() { + MOCKABLE_VIRTUAL GraphicsAllocation *getScratchSpaceAllocation() { return scratchAllocation; } GraphicsAllocation *getPrivateScratchSpaceAllocation() {