15 const std::weak_ptr<DeviceHolderVK>& device_holder,
16 uint32_t max_sampler_anisotropy)
17 : device_holder_(device_holder),
18 max_sampler_anisotropy_(max_sampler_anisotropy) {}
29 if (mips_disabled_workaround_) {
38 std::max<uint32_t>(1u, max_sampler_anisotropy_)));
41 for (
const auto& [
key, value] : samplers_) {
43 return raw_ptr(value);
46 auto device_holder = device_holder_.lock();
47 if (!device_holder || !device_holder->GetDevice()) {
48 return raw_ptr<const Sampler>(
nullptr);
50 samplers_.push_back(std::make_pair(
52 std::make_shared<SamplerVK>(device_holder->GetDevice(), desc_copy)));
53 return raw_ptr(samplers_.back().second);
~SamplerLibraryVK() override
SamplerLibraryVK(const std::weak_ptr< DeviceHolderVK > &device_holder, uint32_t max_sampler_anisotropy)
void ApplyWorkarounds(const WorkaroundsVK &workarounds)
A wrapper around a raw ptr that adds additional unopt mode only checks.
@ kBase
The texture is sampled as if it only had a single mipmap level.
static uint64_t ToKey(const SamplerDescriptor &d)
A non-exhaustive set of driver specific workarounds.
bool broken_mipmap_generation