mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add writeStreamInline at the end of flushTask
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c0121eb824
commit
ba156c7eaa
@@ -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
|
||||
|
||||
32
shared/test/common/mocks/mock_logical_state_helper.h
Normal file
32
shared/test/common/mocks/mock_logical_state_helper.h
Normal 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
|
||||
Reference in New Issue
Block a user