]> git.tdb.fi Git - libs/gl.git/blob - source/backends/vulkan/module_backend.h
Set debug names for shader modules on Vulkan
[libs/gl.git] / source / backends / vulkan / module_backend.h
1 #ifndef MSP_GL_MODULE_BACKEND_H_
2 #define MSP_GL_MODULE_BACKEND_H_
3
4 #include "handles.h"
5
6 namespace Msp {
7 namespace GL {
8
9 class Device;
10
11 class VulkanSpirVModule
12 {
13         friend class VulkanProgram;
14
15 protected:
16         Device &device;
17         VkShaderModule handle = 0;
18         std::string debug_name;
19
20         VulkanSpirVModule();
21         VulkanSpirVModule(VulkanSpirVModule &&);
22         ~VulkanSpirVModule();
23
24         void create();
25
26         void set_debug_name(const std::string &);
27         void set_vulkan_object_name() const;
28 };
29
30 using SpirVModuleBackend = VulkanSpirVModule;
31
32 unsigned get_vulkan_stage(unsigned);
33
34 } // namespace GL
35 } // namespace Msp
36
37 #endif