1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
/*
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/helpers/hw_mapper.h"
#include "level_zero/core/source/sampler/sampler_imp.h"
namespace L0 {
template <GFXCORE_FAMILY gfxCoreFamily>
struct SamplerCoreFamily : public SamplerImp {
public:
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
using SAMPLER_STATE = typename GfxFamily::SAMPLER_STATE;
using BaseClass = SamplerImp;
ze_result_t initialize(Device *device, const ze_sampler_desc_t *desc) override;
void copySamplerStateToDSH(ArrayRef<uint8_t> dynamicStateHeap,
const uint32_t offset) override;
static constexpr float getGenSamplerMaxLod() {
return 14.0f;
}
protected:
SAMPLER_STATE samplerState;
float lodMin = 1.0f;
float lodMax = 1.0f;
};
template <uint32_t gfxProductFamily>
struct SamplerProductFamily;
} // namespace L0
|