mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
Add hwInfo to sampler setArg and appendSamplerStateParams
Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7dad49ccf4
commit
9d0422cf69
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -50,7 +50,7 @@ class Sampler : public BaseObject<_cl_sampler> {
|
||||
cl_int getInfo(cl_sampler_info paramName, size_t paramValueSize,
|
||||
void *paramValue, size_t *paramValueSizeRet);
|
||||
|
||||
virtual void setArg(void *memory) = 0;
|
||||
virtual void setArg(void *memory, const HardwareInfo &hwInfo) = 0;
|
||||
|
||||
static size_t getSamplerStateSize(const HardwareInfo &hwInfo);
|
||||
bool isTransformable() const;
|
||||
@@ -86,8 +86,8 @@ class Sampler : public BaseObject<_cl_sampler> {
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct SamplerHw : public Sampler {
|
||||
void setArg(void *memory) override;
|
||||
void appendSamplerStateParams(typename GfxFamily::SAMPLER_STATE *state);
|
||||
void setArg(void *memory, const HardwareInfo &hwInfo) override;
|
||||
void appendSamplerStateParams(typename GfxFamily::SAMPLER_STATE *state, const HardwareInfo &hwInfo);
|
||||
static constexpr float getGenSamplerMaxLod() {
|
||||
return 14.0f;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -13,7 +13,7 @@
|
||||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
void SamplerHw<GfxFamily>::setArg(void *memory) {
|
||||
void SamplerHw<GfxFamily>::setArg(void *memory, const HardwareInfo &hwInfo) {
|
||||
using SAMPLER_STATE = typename GfxFamily::SAMPLER_STATE;
|
||||
auto samplerState = reinterpret_cast<SAMPLER_STATE *>(memory);
|
||||
samplerState->setNonNormalizedCoordinateEnable(!this->normalizedCoordinates);
|
||||
@@ -87,11 +87,11 @@ void SamplerHw<GfxFamily>::setArg(void *memory) {
|
||||
samplerState->setMinLod(minLodValue.getRawAccess());
|
||||
samplerState->setMaxLod(maxLodValue.getRawAccess());
|
||||
|
||||
appendSamplerStateParams(samplerState);
|
||||
appendSamplerStateParams(samplerState, hwInfo);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void SamplerHw<GfxFamily>::appendSamplerStateParams(typename GfxFamily::SAMPLER_STATE *state) {
|
||||
void SamplerHw<GfxFamily>::appendSamplerStateParams(typename GfxFamily::SAMPLER_STATE *state, const HardwareInfo &hwInfo) {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2020 Intel Corporation
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -15,7 +15,7 @@ namespace NEO {
|
||||
using SAMPLER_STATE = typename Family::SAMPLER_STATE;
|
||||
|
||||
template <>
|
||||
void SamplerHw<Family>::appendSamplerStateParams(SAMPLER_STATE *state) {
|
||||
void SamplerHw<Family>::appendSamplerStateParams(SAMPLER_STATE *state, const HardwareInfo &hwInfo) {
|
||||
if (DebugManager.flags.ForceSamplerLowFilteringPrecision.get()) {
|
||||
state->setLowQualityFilter(SAMPLER_STATE::LOW_QUALITY_FILTER_ENABLE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user