]> git.tdb.fi Git - libs/gl.git/blob - source/backends/vulkan/framebuffer_backend.h
Rework multisample resolve to use resolve attachments
[libs/gl.git] / source / backends / vulkan / framebuffer_backend.h
1 #ifndef MSP_GL_FRAMEBUFFER_BACKEND_H_
2 #define MSP_GL_FRAMEBUFFER_BACKEND_H_
3
4 #include <string>
5 #include "frameformat.h"
6 #include "handles.h"
7
8 namespace Msp {
9 namespace GL {
10
11 class Device;
12 class Texture;
13
14 class VulkanFramebuffer: public NonCopyable
15 {
16         friend class RenderPass;
17         friend class VulkanCommands;
18         friend class VulkanPipelineState;
19
20 protected:
21         Device &device;
22         mutable VkFramebuffer handle = 0;
23         mutable std::vector<VkImageView> view_handles;
24         std::string debug_name;
25
26         VulkanFramebuffer(bool);
27         VulkanFramebuffer(VulkanFramebuffer &&);
28         ~VulkanFramebuffer();
29
30         bool is_format_supported(const FrameFormat &);
31         void format_changed(const FrameFormat &) { }
32         static void require_layered() { }
33
34         void update(unsigned) const;
35         void require_complete() const { }
36
37         void prepare_image_layouts(bool = false) const;
38
39         void set_debug_name(const std::string &);
40         void set_vulkan_object_name() const;
41 };
42
43 using FramebufferBackend = VulkanFramebuffer;
44
45 } // namespace GL
46 } // namespace Msp
47
48 #endif