Improve L0 sampler_state programming

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2022-04-21 15:12:57 +00:00
committed by Compute-Runtime-Automation
parent bad53dc58c
commit 0791898c9e
3 changed files with 7 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -19,7 +19,7 @@ struct SamplerCoreFamily : public SamplerImp {
using BaseClass = SamplerImp;
ze_result_t initialize(Device *device, const ze_sampler_desc_t *desc) override;
virtual void appendSamplerStateParams(SAMPLER_STATE *state){};
void copySamplerStateToDSH(void *dynamicStateHeap, const uint32_t dynamicStateHeapSize,
const uint32_t offset) override;

View File

@@ -107,7 +107,9 @@ ze_result_t SamplerCoreFamily<gfxCoreFamily>::initialize(Device *device, const z
samplerState.setMinLod(minLodValue.getRawAccess());
samplerState.setMaxLod(maxLodValue.getRawAccess());
appendSamplerStateParams(&samplerState);
auto &hwInfo = device->getHwInfo();
NEO::HwInfoConfig::get(hwInfo.platform.eProductFamily)->adjustSamplerState(&samplerState, hwInfo);
return ZE_RESULT_SUCCESS;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021 Intel Corporation
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -14,11 +14,7 @@ template struct SamplerCoreFamily<IGFX_XE_HPG_CORE>;
template <>
struct SamplerProductFamily<IGFX_DG2> : public SamplerCoreFamily<IGFX_XE_HPG_CORE> {
using SamplerCoreFamily::SamplerCoreFamily;
void appendSamplerStateParams(SAMPLER_STATE *state) override {
if (NEO::DebugManager.flags.ForceSamplerLowFilteringPrecision.get()) {
state->setLowQualityFilter(SAMPLER_STATE::LOW_QUALITY_FILTER_ENABLE);
}
}
ze_result_t initialize(Device *device, const ze_sampler_desc_t *desc) override {
return SamplerCoreFamily<IGFX_XE_HPG_CORE>::initialize(device, desc);
};