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
Commits
6b163c82
Commit
6b163c82
authored
3 years ago
by
Mark Oliver Mints
Browse files
Options
Downloads
Patches
Plain Diff
[
#65
]add some comments
parent
3c77a6b5
No related branches found
No related tags found
1 merge request
!58
Resolve "Compute Pipeline"
Pipeline
#25514
passed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/vkcv/PipelineManager.cpp
+7
-6
7 additions, 6 deletions
src/vkcv/PipelineManager.cpp
with
7 additions
and
6 deletions
src/vkcv/PipelineManager.cpp
+
7
−
6
View file @
6b163c82
...
@@ -318,7 +318,7 @@ namespace vkcv
...
@@ -318,7 +318,7 @@ namespace vkcv
PipelineHandle
PipelineManager
::
createComputePipeline
(
const
ShaderProgram
&
shaderProgram
)
{
PipelineHandle
PipelineManager
::
createComputePipeline
(
const
ShaderProgram
&
shaderProgram
)
{
// Temporally handing over the Shader Program instead of a pipeline config
// Temporally handing over the Shader Program instead of a pipeline config
vk
::
ShaderModule
computeModule
;
vk
::
ShaderModule
computeModule
{}
;
if
(
createShaderModule
(
computeModule
,
shaderProgram
,
ShaderStage
::
COMPUTE
)
!=
vk
::
Result
::
eSuccess
)
if
(
createShaderModule
(
computeModule
,
shaderProgram
,
ShaderStage
::
COMPUTE
)
!=
vk
::
Result
::
eSuccess
)
return
PipelineHandle
();
return
PipelineHandle
();
...
@@ -330,22 +330,23 @@ namespace vkcv
...
@@ -330,22 +330,23 @@ namespace vkcv
nullptr
nullptr
);
);
// TODO: Validation Layer Error -> the size is 0 but has to be greater!
const
size_t
matrixPushConstantSize
=
shaderProgram
.
getPushConstantSize
();
const
size_t
matrixPushConstantSize
=
shaderProgram
.
getPushConstantSize
();
const
vk
::
PushConstantRange
pushConstantRange
(
vk
::
ShaderStageFlagBits
::
eAll
,
0
,
matrixPushConstantSize
);
const
vk
::
PushConstantRange
pushConstantRange
(
vk
::
ShaderStageFlagBits
::
eAll
,
0
,
matrixPushConstantSize
);
const
vk
::
PipelineLayoutCreateInfo
pipelineLayoutCreateInfo
(
// TODO: Check this. I'm not sure if this is correct
vk
::
PipelineLayoutCreateInfo
pipelineLayoutCreateInfo
(
// TODO: Check this. I'm not sure if this is correct
{},
{},
nullptr
,
{},
// TODO: For now no Descriptor Set
(
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
)
{
{
m_Device
.
destroy
(
computeModule
);
m_Device
.
destroy
(
computeModule
);
return
PipelineHandle
();
return
PipelineHandle
();
}
}
vk
::
ComputePipelineCreateInfo
computePipelineCreateInfo
;
vk
::
ComputePipelineCreateInfo
computePipelineCreateInfo
{}
;
computePipelineCreateInfo
.
stage
=
pipelineComputeShaderStageInfo
;
computePipelineCreateInfo
.
stage
=
pipelineComputeShaderStageInfo
;
computePipelineCreateInfo
.
layout
=
vkPipelineLayout
;
computePipelineCreateInfo
.
layout
=
vkPipelineLayout
;
...
@@ -360,7 +361,7 @@ namespace vkcv
...
@@ -360,7 +361,7 @@ namespace vkcv
const
uint64_t
id
=
m_Pipelines
.
size
();
const
uint64_t
id
=
m_Pipelines
.
size
();
m_Pipelines
.
push_back
({
vkPipeline
,
vkPipelineLayout
});
m_Pipelines
.
push_back
({
vkPipeline
,
vkPipelineLayout
});
return
PipelineHandle
(
id
,
[
&
](
uint64_t
id
)
{
destroyPipelineById
(
id
);
});
return
PipelineHandle
(
id
,
[
&
](
uint64_t
id
)
{
destroyPipelineById
(
id
);
});
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment