2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2023-01-04 21:32:37 +08:00
|
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2017-12-21 07:45:38 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2021-12-21 19:53:21 +08:00
|
|
|
#include "shared/test/common/fixtures/tbx_command_stream_fixture.h"
|
2019-02-27 18:39:32 +08:00
|
|
|
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/command_stream/command_stream_receiver.h"
|
2021-12-21 05:13:39 +08:00
|
|
|
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
|
2023-01-04 21:32:37 +08:00
|
|
|
#include "shared/source/memory_manager/os_agnostic_memory_manager.h"
|
2021-01-21 20:10:13 +08:00
|
|
|
#include "shared/test/common/mocks/mock_device.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2017-12-21 07:45:38 +08:00
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
namespace NEO {
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2022-08-12 22:24:49 +08:00
|
|
|
void TbxCommandStreamFixture::setUp(MockDevice *pDevice) {
|
2017-12-21 07:45:38 +08:00
|
|
|
// Create our TBX command stream receiver based on HW type
|
2020-10-28 23:08:37 +08:00
|
|
|
pCommandStreamReceiver = TbxCommandStreamReceiver::create("", false, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield());
|
2017-12-21 07:45:38 +08:00
|
|
|
ASSERT_NE(nullptr, pCommandStreamReceiver);
|
2020-01-21 18:00:03 +08:00
|
|
|
memoryManager = new OsAgnosticMemoryManager(*pDevice->executionEnvironment);
|
2017-12-21 07:45:38 +08:00
|
|
|
pDevice->resetCommandStreamReceiver(pCommandStreamReceiver);
|
|
|
|
}
|
|
|
|
|
2022-08-12 22:24:49 +08:00
|
|
|
void TbxCommandStreamFixture::tearDown() {
|
2020-01-21 18:00:03 +08:00
|
|
|
delete memoryManager;
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
2019-03-26 18:59:46 +08:00
|
|
|
} // namespace NEO
|