Split command_stream_receiver_hw_tests to 2 files
to avoid compile error with to long file Change-Id: I9b30a92af8836854832c3975fb6165fb606f79a9 Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
parent
b2ee148da9
commit
d5f7ad616d
|
@ -12,7 +12,9 @@ set(IGDRCL_SRCS_tests_command_stream
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/aub_subcapture_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmd_parse_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_fixture.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_1_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_2_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_fixture.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests.inl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_tests.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_flush_task_1_tests.cpp
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
||||
#include "opencl/test/unit_test/mocks/mock_context.h"
|
||||
#include "test.h"
|
||||
using namespace NEO;
|
||||
struct BcsTests : public Test<ClDeviceFixture> {
|
||||
void SetUp() override {
|
||||
Test<ClDeviceFixture>::SetUp();
|
||||
|
||||
auto &csr = pDevice->getGpgpuCommandStreamReceiver();
|
||||
auto engine = csr.getMemoryManager()->getRegisteredEngineForCsr(&csr);
|
||||
auto contextId = engine->osContext->getContextId();
|
||||
|
||||
delete engine->osContext;
|
||||
engine->osContext = OsContext::create(nullptr, contextId, pDevice->getDeviceBitfield(), aub_stream::EngineType::ENGINE_BCS, PreemptionMode::Disabled,
|
||||
false, false, false);
|
||||
engine->osContext->incRefInternal();
|
||||
csr.setupContext(*engine->osContext);
|
||||
|
||||
context = std::make_unique<MockContext>(pClDevice);
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
context.reset();
|
||||
Test<ClDeviceFixture>::TearDown();
|
||||
}
|
||||
|
||||
uint32_t blitBuffer(CommandStreamReceiver *bcsCsr, const BlitProperties &blitProperties, bool blocking) {
|
||||
BlitPropertiesContainer container;
|
||||
container.push_back(blitProperties);
|
||||
|
||||
return bcsCsr->blitBuffer(container, blocking, false);
|
||||
}
|
||||
|
||||
TimestampPacketContainer timestampPacketContainer;
|
||||
CsrDependencies csrDependencies;
|
||||
std::unique_ptr<MockContext> context;
|
||||
};
|
Loading…
Reference in New Issue