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
7d2bea42
Commit
7d2bea42
authored
3 years ago
by
Alexander Gauggel
Browse files
Options
Downloads
Patches
Plain Diff
[
#96
] Document command stream manager
parent
3d26ebba
No related branches found
No related tags found
1 merge request
!97
Resolve "Dokumentation vervollständigen"
Pipeline
#27503
passed
3 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/vkcv/CommandStreamManager.hpp
+42
-0
42 additions, 0 deletions
include/vkcv/CommandStreamManager.hpp
with
42 additions
and
0 deletions
include/vkcv/CommandStreamManager.hpp
+
42
−
0
View file @
7d2bea42
...
@@ -9,10 +9,17 @@ namespace vkcv {
...
@@ -9,10 +9,17 @@ namespace vkcv {
class
Core
;
class
Core
;
/**
* @brief Responsible for creation, deletion, callbacks and recording of command streams
*/
class
CommandStreamManager
class
CommandStreamManager
{
{
friend
class
Core
;
friend
class
Core
;
private:
private:
/**
* @brief Represents one command stream, into which commands can be recorded into.
* Consists of a command buffer, the command buffer's command pool and a queue, as well as some callbacks.
*/
struct
CommandStream
{
struct
CommandStream
{
inline
CommandStream
(
vk
::
CommandBuffer
cmdBuffer
,
vk
::
Queue
queue
,
vk
::
CommandPool
cmdPool
)
inline
CommandStream
(
vk
::
CommandBuffer
cmdBuffer
,
vk
::
Queue
queue
,
vk
::
CommandPool
cmdPool
)
:
cmdBuffer
(
cmdBuffer
),
cmdPool
(
cmdPool
),
queue
(
queue
)
{};
:
cmdBuffer
(
cmdBuffer
),
cmdPool
(
cmdPool
),
queue
(
queue
)
{};
...
@@ -38,17 +45,52 @@ namespace vkcv {
...
@@ -38,17 +45,52 @@ namespace vkcv {
CommandStreamManager
&
operator
=
(
CommandStreamManager
&&
other
)
=
delete
;
CommandStreamManager
&
operator
=
(
CommandStreamManager
&&
other
)
=
delete
;
CommandStreamManager
&
operator
=
(
const
CommandStreamManager
&
other
)
=
delete
;
CommandStreamManager
&
operator
=
(
const
CommandStreamManager
&
other
)
=
delete
;
/**
* @brief Creates a new command stream
*
* @param queue Queue the command buffer will be submitted to
* @param cmdPool Command pool the command buffer will be allocated from
* @return Handle that represents the #CommandStream
*/
CommandStreamHandle
createCommandStream
(
CommandStreamHandle
createCommandStream
(
const
vk
::
Queue
queue
,
const
vk
::
Queue
queue
,
vk
::
CommandPool
cmdPool
);
vk
::
CommandPool
cmdPool
);
/**
* @brief Record vulkan commands to a #CommandStream, using a record function
*
* @param handle Command stream handle
* @param record Function that records the vulkan commands
*/
void
recordCommandsToStream
(
const
CommandStreamHandle
handle
,
const
RecordCommandFunction
record
);
void
recordCommandsToStream
(
const
CommandStreamHandle
handle
,
const
RecordCommandFunction
record
);
/**
* @brief Add a callback to a #CommandStream that is called
* every time the command stream is submitted and finished
*
* @param handle Command stream handle
* @param finish Callback that is called when a command stream submission is finished
*/
void
addFinishCallbackToStream
(
const
CommandStreamHandle
handle
,
const
FinishCommandFunction
finish
);
void
addFinishCallbackToStream
(
const
CommandStreamHandle
handle
,
const
FinishCommandFunction
finish
);
/**
* @brief Submits a #CommandStream to it's queue and returns after execution is finished
*
* @param handle Command stream handle
* @param waitSemaphores Semaphores that are waited upon before executing the recorded commands
* @param signalSemaphores Semaphores that are signaled when execution of the recorded commands is finished
*/
void
submitCommandStreamSynchronous
(
void
submitCommandStreamSynchronous
(
const
CommandStreamHandle
handle
,
const
CommandStreamHandle
handle
,
std
::
vector
<
vk
::
Semaphore
>
&
waitSemaphores
,
std
::
vector
<
vk
::
Semaphore
>
&
waitSemaphores
,
std
::
vector
<
vk
::
Semaphore
>
&
signalSemaphores
);
std
::
vector
<
vk
::
Semaphore
>
&
signalSemaphores
);
/**
* @brief Returns the underlying vulkan handle of a #CommandStream to be used for manual command recording
*
* @param handle Command stream handle
* @return Vulkan handle of the #CommandStream
*/
vk
::
CommandBuffer
getStreamCommandBuffer
(
const
CommandStreamHandle
handle
);
vk
::
CommandBuffer
getStreamCommandBuffer
(
const
CommandStreamHandle
handle
);
};
};
...
...
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