Skip to content

Commit 0791898

Browse files
Improve L0 sampler_state programming
Signed-off-by: Bartosz Dunajski <[email protected]>
1 parent bad53dc commit 0791898

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

level_zero/core/source/sampler/sampler_hw.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2020-2021 Intel Corporation
2+
* Copyright (C) 2020-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -19,7 +19,7 @@ struct SamplerCoreFamily : public SamplerImp {
1919
using BaseClass = SamplerImp;
2020

2121
ze_result_t initialize(Device *device, const ze_sampler_desc_t *desc) override;
22-
virtual void appendSamplerStateParams(SAMPLER_STATE *state){};
22+
2323
void copySamplerStateToDSH(void *dynamicStateHeap, const uint32_t dynamicStateHeapSize,
2424
const uint32_t offset) override;
2525

level_zero/core/source/sampler/sampler_hw.inl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ ze_result_t SamplerCoreFamily<gfxCoreFamily>::initialize(Device *device, const z
107107
samplerState.setMinLod(minLodValue.getRawAccess());
108108
samplerState.setMaxLod(maxLodValue.getRawAccess());
109109

110-
appendSamplerStateParams(&samplerState);
110+
auto &hwInfo = device->getHwInfo();
111+
112+
NEO::HwInfoConfig::get(hwInfo.platform.eProductFamily)->adjustSamplerState(&samplerState, hwInfo);
111113

112114
return ZE_RESULT_SUCCESS;
113115
}

level_zero/core/source/xe_hpg_core/dg2/sampler_dg2.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2021 Intel Corporation
2+
* Copyright (C) 2021-2022 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -14,11 +14,7 @@ template struct SamplerCoreFamily<IGFX_XE_HPG_CORE>;
1414
template <>
1515
struct SamplerProductFamily<IGFX_DG2> : public SamplerCoreFamily<IGFX_XE_HPG_CORE> {
1616
using SamplerCoreFamily::SamplerCoreFamily;
17-
void appendSamplerStateParams(SAMPLER_STATE *state) override {
18-
if (NEO::DebugManager.flags.ForceSamplerLowFilteringPrecision.get()) {
19-
state->setLowQualityFilter(SAMPLER_STATE::LOW_QUALITY_FILTER_ENABLE);
20-
}
21-
}
17+
2218
ze_result_t initialize(Device *device, const ze_sampler_desc_t *desc) override {
2319
return SamplerCoreFamily<IGFX_XE_HPG_CORE>::initialize(device, desc);
2420
};

0 commit comments

Comments
 (0)