MayaFlux 0.1.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 271 of file VKShaderModule.cpp.

272{
273 if (!m_module) {
275 "Cannot get stage create info from invalid shader module");
276 return {};
277 }
278
279 vk::PipelineShaderStageCreateInfo stage_info;
280 stage_info.stage = m_stage;
281 stage_info.module = m_module;
282 stage_info.pName = m_entry_point.c_str();
283
284 if (!m_specialization_entries.empty()) {
285 const_cast<VKShaderModule*>(this)->update_specialization_info();
286 stage_info.pSpecializationInfo = &m_specialization_info;
287 }
288
289 return stage_info;
290}
#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: