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