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

◆ create_compute_pipeline()

std::shared_ptr< VKComputePipeline > MayaFlux::Core::BackendPipelineManager::create_compute_pipeline ( const std::shared_ptr< VKShaderModule > &  shader,
const std::vector< vk::DescriptorSetLayout > &  layouts,
uint32_t  push_constant_size 
)

Create a compute pipeline.

Parameters
shaderShader module to use for the compute pipeline
layoutsVector of descriptor set layouts used by the pipeline
push_constant_sizeSize of push constant range in bytes
Returns
Shared pointer to the created VKComputePipeline

Definition at line 81 of file BackendPipelineManager.cpp.

85{
86 auto pipeline = std::make_shared<VKComputePipeline>();
87 ComputePipelineConfig config;
88 config.shader = shader;
89 config.set_layouts = layouts;
90 if (push_constant_size > 0) {
91 config.add_push_constant(vk::ShaderStageFlagBits::eCompute, push_constant_size);
92 }
93
94 pipeline->create(m_context.get_device(), config);
95
96 track_compute_pipeline(pipeline);
97 return pipeline;
98}
void track_compute_pipeline(const std::shared_ptr< VKComputePipeline > &pipeline)
vk::Device get_device() const
Get logical device.
Definition VKContext.hpp:49

References MayaFlux::Core::ComputePipelineConfig::add_push_constant(), MayaFlux::Core::VKContext::get_device(), m_context, MayaFlux::Core::ComputePipelineConfig::set_layouts, MayaFlux::Core::ComputePipelineConfig::shader, and track_compute_pipeline().

Referenced by setup_backend_service().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: