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
52eb4752
Commit
52eb4752
authored
3 years ago
by
Mark Oliver Mints
Browse files
Options
Downloads
Patches
Plain Diff
[
#65
][Add] Create Compute Pipeline
parent
2ebaeebb
No related branches found
No related tags found
1 merge request
!58
Resolve "Compute Pipeline"
Pipeline
#25511
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
+16
-7
16 additions, 7 deletions
src/vkcv/PipelineManager.cpp
with
16 additions
and
7 deletions
src/vkcv/PipelineManager.cpp
+
16
−
7
View file @
52eb4752
...
@@ -333,26 +333,35 @@ namespace vkcv
...
@@ -333,26 +333,35 @@ namespace vkcv
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
);
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
,
nullptr
,
(
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
();
}
}
// TODO: Create Compute Pipeline
vk
::
ComputePipelineCreateInfo
computePipelineCreateInfo
;
vk
::
Pipeline
vkPipeline
{};
computePipelineCreateInfo
.
stage
=
pipelineComputeShaderStageInfo
;
vk
::
ComputePipelineCreateInfo
computePipelineCreateInfo
;
// TODO: Set params
computePipelineCreateInfo
.
layout
=
vkPipelineLayout
;
vk
::
Pipeline
vkPipeline
;
if
(
m_Device
.
createComputePipelines
(
nullptr
,
1
,
&
computePipelineCreateInfo
,
nullptr
,
&
vkPipeline
)
!=
vk
::
Result
::
eSuccess
)
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.
// There is an issue for refactoring the Pipeline Manager.
...
...
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