2018-01-24 17:23:11 +08:00
|
|
|
/*
|
2022-06-30 03:17:47 +08:00
|
|
|
* Copyright (C) 2018-2022 Intel Corporation
|
2018-01-24 17:23:11 +08:00
|
|
|
*
|
2018-09-18 15:11:08 +08:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-01-24 17:23:11 +08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-06-30 03:17:47 +08:00
|
|
|
#include "shared/source/gen9/hw_cmds.h"
|
2021-08-25 18:28:05 +08:00
|
|
|
#include "shared/source/os_interface/hw_info_config.h"
|
2022-10-28 21:51:20 +08:00
|
|
|
#include "shared/test/common/helpers/default_hw_info.h"
|
2022-06-30 03:17:47 +08:00
|
|
|
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
|
|
|
#include "shared/test/common/test_macros/test.h"
|
2021-08-25 18:28:05 +08:00
|
|
|
|
2018-01-24 17:23:11 +08:00
|
|
|
#include <memory>
|
|
|
|
|
2019-03-26 18:59:46 +08:00
|
|
|
using namespace NEO;
|
2018-01-24 17:23:11 +08:00
|
|
|
|
2022-10-28 21:51:20 +08:00
|
|
|
using Gen9SamplerTest = ::testing::Test;
|
2018-01-24 17:23:11 +08:00
|
|
|
|
2020-10-14 17:44:03 +08:00
|
|
|
GEN9TEST_F(Gen9SamplerTest, WhenAppendingSamplerStateParamsThenStateIsNotChanged) {
|
2018-01-24 17:23:11 +08:00
|
|
|
typedef typename FamilyType::SAMPLER_STATE SAMPLER_STATE;
|
2019-01-18 00:10:12 +08:00
|
|
|
auto stateWithoutAppendedParams = FamilyType::cmdInitSamplerState;
|
|
|
|
auto stateWithAppendedParams = FamilyType::cmdInitSamplerState;
|
2018-01-24 17:23:11 +08:00
|
|
|
EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0);
|
2021-08-25 18:28:05 +08:00
|
|
|
HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->adjustSamplerState(&stateWithAppendedParams, *defaultHwInfo);
|
2018-01-24 17:23:11 +08:00
|
|
|
EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0);
|
|
|
|
}
|