mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 10:26:29 +08:00
Improve L0 sampler_state programming
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
bad53dc58c
commit
0791898c9e
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user