13SamplerLibraryVK::SamplerLibraryVK(
14 const std::weak_ptr<DeviceHolderVK>& device_holder)
15 : device_holder_(device_holder) {}
17SamplerLibraryVK::~SamplerLibraryVK() =
default;
21const std::unique_ptr<const Sampler>& SamplerLibraryVK::GetSampler(
23 auto found = samplers_.find(
desc);
24 if (found != samplers_.end()) {
27 auto device_holder = device_holder_.lock();
28 if (!device_holder || !device_holder->GetDevice()) {
31 return (samplers_[
desc] =
32 std::make_unique<SamplerVK>(device_holder->GetDevice(),
desc));
static const std::unique_ptr< const Sampler > kNullSampler