2017-12-21 07:45:38 +08:00
|
|
|
/*
|
2020-01-30 16:36:05 +08:00
|
|
|
* Copyright (C) 2017-2020 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
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
2020-02-24 05:44:01 +08:00
|
|
|
#include "shared/source/helpers/preamble.h"
|
2020-03-31 13:43:07 +08:00
|
|
|
#include "shared/test/unit_test/cmd_parse/hw_parse.h"
|
2020-02-24 17:22:30 +08:00
|
|
|
|
2020-02-23 22:20:22 +08:00
|
|
|
#include "opencl/test/unit_test/command_stream/linear_stream_fixture.h"
|
2020-05-28 20:05:12 +08:00
|
|
|
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
2020-02-23 22:20:22 +08:00
|
|
|
#include "opencl/test/unit_test/fixtures/platform_fixture.h"
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
using namespace NEO;
|
2017-12-21 07:45:38 +08:00
|
|
|
|
2020-05-28 20:05:12 +08:00
|
|
|
struct PreambleFixture : public ClDeviceFixture,
|
2017-12-21 07:45:38 +08:00
|
|
|
public LinearStreamFixture,
|
|
|
|
public HardwareParse,
|
|
|
|
public ::testing::Test {
|
|
|
|
void SetUp() override {
|
2020-05-28 20:05:12 +08:00
|
|
|
ClDeviceFixture::SetUp();
|
2017-12-21 07:45:38 +08:00
|
|
|
HardwareParse::SetUp();
|
|
|
|
}
|
|
|
|
|
|
|
|
void TearDown() override {
|
|
|
|
HardwareParse::TearDown();
|
2020-05-28 20:05:12 +08:00
|
|
|
ClDeviceFixture::TearDown();
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
class PreambleVfeState : public PlatformFixture,
|
|
|
|
public ::testing::Test,
|
|
|
|
public LinearStreamFixture,
|
|
|
|
public HardwareParse {
|
|
|
|
public:
|
|
|
|
void SetUp() override {
|
|
|
|
::testing::Test::SetUp();
|
|
|
|
LinearStreamFixture::SetUp();
|
|
|
|
HardwareParse::SetUp();
|
2018-06-26 16:51:01 +08:00
|
|
|
PlatformFixture::SetUp();
|
2020-03-04 15:51:02 +08:00
|
|
|
testWaTable = &pPlatform->peekExecutionEnvironment()->rootDeviceEnvironments[0]->getMutableHardwareInfo()->workaroundTable;
|
2017-12-21 07:45:38 +08:00
|
|
|
}
|
|
|
|
void TearDown() override {
|
|
|
|
PlatformFixture::TearDown();
|
|
|
|
HardwareParse::TearDown();
|
|
|
|
LinearStreamFixture::TearDown();
|
|
|
|
::testing::Test::TearDown();
|
|
|
|
}
|
|
|
|
|
2019-05-06 18:33:44 +08:00
|
|
|
WorkaroundTable *testWaTable;
|
2017-12-21 07:45:38 +08:00
|
|
|
};
|