summaryrefslogblamecommitdiffstats
path: root/src/video_core/renderer_vulkan/vk_sampler_cache.h
blob: 771b05c739d76d99196cf61fa17942782b4e5bb9 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                    
                                     





                                        
                                                                                           



                                                    

                                                                           
 
                                                                  
 
        
                           


                     
// Copyright 2019 yuzu Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

#include <unordered_map>

#include "common/common_types.h"
#include "video_core/renderer_vulkan/declarations.h"
#include "video_core/sampler_cache.h"
#include "video_core/textures/texture.h"

namespace Vulkan {

class VKDevice;

class VKSamplerCache final : public VideoCommon::SamplerCache<vk::Sampler, UniqueSampler> {
public:
    explicit VKSamplerCache(const VKDevice& device);
    ~VKSamplerCache();

protected:
    UniqueSampler CreateSampler(const Tegra::Texture::TSCEntry& tsc) const;

    vk::Sampler ToSamplerType(const UniqueSampler& sampler) const;

private:
    const VKDevice& device;
};

} // namespace Vulkan