mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Cleaned up files: level_zero/core/test/unit_tests/fixtures/memory_ipc_fixture.h level_zero/core/test/unit_tests/sources/tracing/test_api_tracing_common.h opencl/test/unit_test/aub_tests/fixtures/multicontext_aub_fixture.h opencl/test/unit_test/fixtures/program_fixture.h opencl/test/unit_test/offline_compiler/environment.h opencl/test/unit_test/offline_compiler/mock/mock_argument_helper.h shared/test/common/cmd_parse/cmd_parse_base.inl shared/test/common/mocks/mock_aub_file_stream.h shared/test/common/mocks/mock_deferrable_deletion.h shared/test/common/mocks/windows/mock_gmm_memory_base.h shared/test/unit_test/encoders/walker_partition_fixture_xehp_and_later.h shared/test/unit_test/os_interface/windows/os_interface_win_tests.h Related-To: NEO-5548 Signed-off-by: Warchulski, Jaroslaw <jaroslaw.warchulski@intel.com>
45 lines
1.2 KiB
C++
45 lines
1.2 KiB
C++
/*
|
|
* Copyright (C) 2022-2023 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "shared/source/command_stream/linear_stream.h"
|
|
#include "shared/source/helpers/logical_state_helper.h"
|
|
|
|
namespace NEO {
|
|
|
|
template <typename GfxFamily>
|
|
class LogicalStateHelperMock : public LogicalStateHelper {
|
|
public:
|
|
LogicalStateHelperMock() : LogicalStateHelper() {
|
|
}
|
|
|
|
void writeStreamInline(LinearStream &linearStream, bool pipelinedState) override {
|
|
writeStreamInlineCalledCounter++;
|
|
|
|
if (makeFakeStreamWrite) {
|
|
auto cmd = GfxFamily::cmdInitNoop;
|
|
cmd.setIdentificationNumber(0x123);
|
|
|
|
auto cmdBuffer = linearStream.getSpaceForCmd<typename GfxFamily::MI_NOOP>();
|
|
*cmdBuffer = cmd;
|
|
}
|
|
}
|
|
|
|
void mergePipelinedState(const LogicalStateHelper &inputLogicalStateHelper) override {
|
|
mergePipelinedStateCounter++;
|
|
|
|
latestInputLogicalStateHelperForMerge = &inputLogicalStateHelper;
|
|
}
|
|
|
|
const LogicalStateHelper *latestInputLogicalStateHelperForMerge = nullptr;
|
|
uint32_t writeStreamInlineCalledCounter = 0;
|
|
uint32_t mergePipelinedStateCounter = 0;
|
|
bool makeFakeStreamWrite = false;
|
|
};
|
|
} // namespace NEO
|