MayaFlux 0.2.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ get_stage_create_info()

vk::PipelineShaderStageCreateInfo MayaFlux::Core::VKShaderModule::get_stage_create_info ( ) const

Get pipeline shader stage create info.

Returns
vk::PipelineShaderStageCreateInfo for pipeline creation

This is the primary integration point with pipeline builders. Usage: auto stage_info = shader_module.get_stage_create_info(); pipeline_builder.add_shader_stage(stage_info);

Definition at line 284 of file VKShaderModule.cpp.

285{
286 if (!m_module) {
288 "Cannot get stage create info from invalid shader module");
289 return {};
290 }
291
292 vk::PipelineShaderStageCreateInfo stage_info;
293 stage_info.stage = m_stage;
294 stage_info.module = m_module;
295 stage_info.pName = m_entry_point.c_str();
296
297 if (!m_specialization_entries.empty()) {
298 const_cast<VKShaderModule*>(this)->update_specialization_info();
299 stage_info.pSpecializationInfo = &m_specialization_info;
300 }
301
302 return stage_info;
303}
#define MF_ERROR(comp, ctx,...)
vk::SpecializationInfo m_specialization_info
std::vector< vk::SpecializationMapEntry > m_specialization_entries
vk::ShaderStageFlagBits m_stage
void update_specialization_info()
Update specialization info from current map Called before get_stage_create_info() to ensure fresh dat...
@ GraphicsBackend
Graphics/visual rendering backend (Vulkan, OpenGL)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Journal::GraphicsBackend, m_entry_point, m_module, m_specialization_entries, m_specialization_info, m_stage, MF_ERROR, and update_specialization_info().

+ Here is the call graph for this function: