Lluvia
ll::Program Class Reference

Class representing Vulkan shader modules in SPIR-V representation. More...

#include <Program.h>

Public Member Functions

 Program ()=delete
 
 Program (const Program &program)=delete
 
 Program (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. More...
 
 ~Program ()
 
Programoperator= (const Program &program)=delete
 
Programoperator= (Program &&program)=delete
 
vk::ShaderModule getShaderModule () const noexcept
 Gets the corresponding Vulkan shader module for this program object. More...
 
const std::vector< uint8_t > & getSpirV () const noexcept
 Gets the SPIR-V code of this object. More...
 

Detailed Description

Class representing Vulkan shader modules in SPIR-V representation.

Program objects hold the SPIR-V code needed to run shader programs in the device. They are created using Session::createProgram methods.

auto session = ll::Session::create();
auto program = session->createProgram("path_to_spir-v.spv");
static std::shared_ptr< ll::Session > create()
Creates a new ll::Session object.

Constructor & Destructor Documentation

◆ Program() [1/4]

ll::Program::Program ( )
delete

◆ Program() [2/4]

ll::Program::Program ( const Program program)
delete

◆ Program() [3/4]

ll::Program::Program ( Program &&  program)
delete

◆ Program() [4/4]

ll::Program::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.

Parameters
[in]sessionThe session this node was created from.
[in]deviceThe Vulkan device.
[in]spirvCodeThe SPIR-V code.

◆ ~Program()

ll::Program::~Program ( )

Member Function Documentation

◆ getShaderModule()

vk::ShaderModule ll::Program::getShaderModule ( ) const
noexcept

Gets the corresponding Vulkan shader module for this program object.

Returns
The shader module.

◆ getSpirV()

const std::vector<uint8_t>& ll::Program::getSpirV ( ) const
noexcept

Gets the SPIR-V code of this object.

Returns
The SPIR-V code.

◆ operator=() [1/2]

Program& ll::Program::operator= ( const Program program)
delete

◆ operator=() [2/2]

Program& ll::Program::operator= ( Program &&  program)
delete

The documentation for this class was generated from the following file: