Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
VkCV Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vulkan2021
VkCV Framework
Merge requests
!58
Resolve "Compute Pipeline"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Compute Pipeline"
65-compute-pipeline
into
develop
Overview
4
Commits
13
Pipelines
11
Changes
1
Merged
Mark Oliver Mints
requested to merge
65-compute-pipeline
into
develop
3 years ago
Overview
4
Commits
13
Pipelines
11
Changes
1
Expand
Closes
#65 (closed)
Edited
3 years ago
by
Ghost User
0
0
Merge request reports
Viewing commit
52eb4752
Prev
Next
Show latest version
1 file
+
16
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
52eb4752
[
#65
][Add] Create Compute Pipeline
· 52eb4752
Mark Oliver Mints
authored
3 years ago
src/vkcv/PipelineManager.cpp
+
16
−
7
Options
@@ -333,26 +333,35 @@ namespace vkcv
const
size_t
matrixPushConstantSize
=
shaderProgram
.
getPushConstantSize
();
const
vk
::
PushConstantRange
pushConstantRange
(
vk
::
ShaderStageFlagBits
::
eAll
,
0
,
matrixPushConstantSize
);
vk
::
PipelineLayoutCreateInfo
pipelineLayoutCreateInfo
(
// TODO: Check this. I'm not sure if this is correct
const
vk
::
PipelineLayoutCreateInfo
pipelineLayoutCreateInfo
(
// TODO: Check this. I'm not sure if this is correct
{},
nullptr
,
(
pushConstantRange
));
vk
::
PipelineLayout
vkPipelineLayout
{}
;
vk
::
PipelineLayout
vkPipelineLayout
;
if
(
m_Device
.
createPipelineLayout
(
&
pipelineLayoutCreateInfo
,
nullptr
,
&
vkPipelineLayout
)
!=
vk
::
Result
::
eSuccess
)
{
m_Device
.
destroy
(
computeModule
);
return
PipelineHandle
();
}
// TODO: Create Compute Pipeline
vk
::
Pipeline
vkPipeline
{};
vk
::
ComputePipelineCreateInfo
computePipelineCreateInfo
;
// TODO: Set params
vk
::
ComputePipelineCreateInfo
computePipelineCreateInfo
;
computePipelineCreateInfo
.
stage
=
pipelineComputeShaderStageInfo
;
computePipelineCreateInfo
.
layout
=
vkPipelineLayout
;
vk
::
Pipeline
vkPipeline
;
if
(
m_Device
.
createComputePipelines
(
nullptr
,
1
,
&
computePipelineCreateInfo
,
nullptr
,
&
vkPipeline
)
!=
vk
::
Result
::
eSuccess
)
{
// TODO: Set Params
m_Device
.
destroy
(
computeModule
);
return
PipelineHandle
();
}
return
PipelineHandle
();
m_Device
.
destroy
(
computeModule
);
const
uint64_t
id
=
m_Pipelines
.
size
();
m_Pipelines
.
push_back
({
vkPipeline
,
vkPipelineLayout
});
return
PipelineHandle
(
id
,
[
&
](
uint64_t
id
)
{
destroyPipelineById
(
id
);
});
}
// There is an issue for refactoring the Pipeline Manager.
Loading