Lluvia
Program.h
Go to the documentation of this file.
1 
8 #ifndef LLUVIA_CORE_PROGRAM_H_
9 #define LLUVIA_CORE_PROGRAM_H_
10 
11 #include <memory>
12 #include <vector>
13 
15 
16 namespace ll {
17 
18 namespace vulkan {
19  class Device;
20 } // namespace vulkan
21 
22 // forward declarations
23 class Session;
24 
37 class Program {
38 
39 public:
40  Program() = delete;
41  Program(const Program& program) = delete;
42  Program(Program&& program) = delete;
43 
52  const std::shared_ptr<ll::vulkan::Device>& device,
53  const std::vector<uint8_t>& spirvCode);
54 
56 
57  Program& operator=(const Program& program) = delete;
58  Program& operator=(Program&& program) = delete;
59 
65  vk::ShaderModule getShaderModule() const noexcept;
66 
72  const std::vector<uint8_t>& getSpirV() const noexcept;
73 
74 private:
75  std::shared_ptr<ll::vulkan::Device> m_device;
76 
77  vk::ShaderModule m_module;
78  std::vector<uint8_t> m_spirvCode;
79 };
80 
81 } // namespace ll
82 
83 #endif // LLUVIA_CORE_PROGRAM_H_
Class representing Vulkan shader modules in SPIR-V representation.
Definition: Program.h:37
const std::vector< uint8_t > & getSpirV() const noexcept
Gets the SPIR-V code of this object.
vk::ShaderModule getShaderModule() const noexcept
Gets the corresponding Vulkan shader module for this program object.
Program & operator=(const Program &program)=delete
Program & operator=(Program &&program)=delete
Program(const std::shared_ptr< ll::vulkan::Device > &device, const std::vector< uint8_t > &spirvCode)
Constructs the object from a Vulkan device and SPIR-V code.
Program(Program &&program)=delete
Program()=delete
Program(const Program &program)=delete
Definition: Buffer.h:28