Skip to content
Snippets Groups Projects
Commit 8331c9cf authored by Mark Oliver Mints's avatar Mark Oliver Mints
Browse files

[#65][Add] Function for creating compute pipeline

parent 84c7c24c
Branches
Tags
1 merge request!58Resolve "Compute Pipeline"
...@@ -182,6 +182,7 @@ namespace vkcv ...@@ -182,6 +182,7 @@ namespace vkcv
{}, {},
(config.m_DescriptorLayouts), (config.m_DescriptorLayouts),
(pushConstantRange)); (pushConstantRange));
vk::PipelineLayout vkPipelineLayout{}; vk::PipelineLayout vkPipelineLayout{};
if (m_Device.createPipelineLayout(&pipelineLayoutCreateInfo, nullptr, &vkPipelineLayout) != vk::Result::eSuccess) if (m_Device.createPipelineLayout(&pipelineLayoutCreateInfo, nullptr, &vkPipelineLayout) != vk::Result::eSuccess)
{ {
...@@ -314,4 +315,23 @@ namespace vkcv ...@@ -314,4 +315,23 @@ namespace vkcv
return m_Configs.at(id); return m_Configs.at(id);
} }
PipelineHandle PipelineManager::createComputePipeline() {
// TODO: Set Compute Shader Stage
vk::PipelineShaderStageCreateInfo pipelineShaderStageCreateInfo; // TODO: Set params
// TODO: Set Compute Pipeline Layout
vk::PipelineLayout vkPipelineLayout{}; // TODO: Set params
// TODO: Create Compute Pipeline
vk::Pipeline vkPipeline{};
vk::ComputePipelineCreateInfo computePipelineCreateInfo; // TODO: Set params
if (m_Device.createComputePipelines(nullptr, 1, &computePipelineCreateInfo, nullptr, &vkPipeline)!= vk::Result::eSuccess)
{
// TODO: Set Params
}
return PipelineHandle();
}
} }
\ No newline at end of file
...@@ -35,6 +35,8 @@ namespace vkcv ...@@ -35,6 +35,8 @@ namespace vkcv
PipelineHandle createPipeline(const PipelineConfig &config, PassManager& passManager); PipelineHandle createPipeline(const PipelineConfig &config, PassManager& passManager);
PipelineHandle createComputePipeline();
[[nodiscard]] [[nodiscard]]
vk::Pipeline getVkPipeline(const PipelineHandle &handle) const; vk::Pipeline getVkPipeline(const PipelineHandle &handle) const;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment