]> git.tdb.fi Git - libs/gl.git/blob - source/backends/vulkan/sampler_backend.h
Implement textures and samplers for Vulkan
[libs/gl.git] / source / backends / vulkan / sampler_backend.h
1 #ifndef MSP_GL_SAMPLER_BACKEND_H_
2 #define MSP_GL_SAMPLER_BACKEND_H_
3
4 #include "handles.h"
5
6 namespace Msp {
7 namespace GL {
8
9 class Device;
10
11 class VulkanSampler
12 {
13         friend class VulkanPipelineState;
14
15 protected:
16         Device &device;
17         mutable VkSampler handle = 0;
18         std::string debug_name;
19
20         VulkanSampler();
21         VulkanSampler(VulkanSampler &&);
22         ~VulkanSampler();
23
24         static bool check_anisotropic(bool) { return true; }
25
26         void update(unsigned) const;
27
28         void set_debug_name(const std::string &);
29         void set_vulkan_object_name() const;
30 };
31
32 using SamplerBackend = VulkanSampler;
33
34 unsigned get_vulkan_filter(unsigned);
35 unsigned get_vulkan_mipmap_mode(unsigned);
36 unsigned get_vulkan_address_mode(unsigned);
37
38 } // namespace GL
39 } // namespace Msp
40
41 #endif