Add writeStreamInline at the end of flushTask

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2022-06-15 10:29:35 +00:00
committed by Compute-Runtime-Automation
parent c0121eb824
commit ba156c7eaa
4 changed files with 99 additions and 0 deletions

View File

@@ -66,6 +66,7 @@ set(NEO_CORE_tests_mocks
${CMAKE_CURRENT_SOURCE_DIR}/mock_io_functions.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel_info.cpp
${CMAKE_CURRENT_SOURCE_DIR}/mock_kernel_info.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_logical_state_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_lrca_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_memory_manager.h
${CMAKE_CURRENT_SOURCE_DIR}/mock_memory_operations_handler.h

View File

@@ -0,0 +1,32 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/command_stream/linear_stream.h"
#include "shared/source/helpers/logical_state_helper.h"
#include "hw_cmds.h"
namespace NEO {
template <typename GfxFamily>
class LogicalStateHelperMock : public LogicalStateHelper {
public:
LogicalStateHelperMock() = default;
void writeStreamInline(LinearStream &linearStream) override {
writeStreamInlineCalledCounter++;
auto cmd = linearStream.getSpaceForCmd<typename GfxFamily::MI_NOOP>();
*cmd = GfxFamily::cmdInitNoop;
cmd->setIdentificationNumber(0x123);
}
uint32_t writeStreamInlineCalledCounter = 0;
};
} // namespace NEO