2018-01-24 10:23:11 +01:00
|
|
|
/*
|
2021-02-05 01:58:42 +00:00
|
|
|
* Copyright (C) 2018-2021 Intel Corporation
|
2018-01-24 10:23:11 +01:00
|
|
|
*
|
2018-09-18 09:11:08 +02:00
|
|
|
* SPDX-License-Identifier: MIT
|
2018-01-24 10:23:11 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2021-08-25 10:28:05 +00:00
|
|
|
#include "shared/source/os_interface/hw_info_config.h"
|
|
|
|
|
2020-05-28 14:05:12 +02:00
|
|
|
#include "opencl/test/unit_test/fixtures/cl_device_fixture.h"
|
2019-02-27 11:39:32 +01:00
|
|
|
#include "test.h"
|
|
|
|
|
2018-01-24 10:23:11 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2019-03-26 11:59:46 +01:00
|
|
|
using namespace NEO;
|
2018-01-24 10:23:11 +01:00
|
|
|
|
2020-05-28 14:05:12 +02:00
|
|
|
typedef Test<ClDeviceFixture> Gen8SamplerTest;
|
2018-01-24 10:23:11 +01:00
|
|
|
|
2020-10-14 11:44:03 +02:00
|
|
|
GEN8TEST_F(Gen8SamplerTest, WhenAppendingSamplerStateParamsThenStateIsNotChanged) {
|
2018-01-24 10:23:11 +01:00
|
|
|
typedef typename FamilyType::SAMPLER_STATE SAMPLER_STATE;
|
2019-01-17 17:10:12 +01:00
|
|
|
auto stateWithoutAppendedParams = FamilyType::cmdInitSamplerState;
|
|
|
|
auto stateWithAppendedParams = FamilyType::cmdInitSamplerState;
|
2018-01-24 10:23:11 +01:00
|
|
|
EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0);
|
2021-08-25 10:28:05 +00:00
|
|
|
HwInfoConfig::get(defaultHwInfo->platform.eProductFamily)->adjustSamplerState(&stateWithAppendedParams, *defaultHwInfo);
|
2018-01-24 10:23:11 +01:00
|
|
|
EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0);
|
|
|
|
}
|