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
!38
Resolve "Consistent handles"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Consistent handles"
49-consistent-handles
into
develop
Overview
0
Commits
1
Pipelines
2
Changes
7
Merged
Tobias Frisch
requested to merge
49-consistent-handles
into
develop
3 years ago
Overview
0
Commits
1
Pipelines
2
Changes
7
Expand
Closes
#49 (closed)
Edited
3 years ago
by
Tobias Frisch
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
5d9f0972
1 commit,
3 years ago
7 files
+
120
−
37
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
include/vkcv/Handles.hpp
+
55
−
5
Options
@@ -5,13 +5,63 @@
@@ -5,13 +5,63 @@
* @brief Central header file for all possible handles that the framework will hand out.
* @brief Central header file for all possible handles that the framework will hand out.
*/
*/
#include
<
cstdint
>
#include
<
iostream
>
namespace
vkcv
namespace
vkcv
{
{
class
Handle
{
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Handle
&
handle
);
private:
uint64_t
m_id
;
protected:
Handle
();
explicit
Handle
(
uint64_t
id
);
[[
nodiscard
]]
uint64_t
getId
()
const
;
public:
virtual
~
Handle
()
=
default
;
Handle
(
const
Handle
&
other
)
=
default
;
Handle
(
Handle
&&
other
)
=
default
;
Handle
&
operator
=
(
const
Handle
&
other
)
=
default
;
Handle
&
operator
=
(
Handle
&&
other
)
=
default
;
explicit
operator
bool
()
const
;
bool
operator
!
()
const
;
};
std
::
ostream
&
operator
<<
(
std
::
ostream
&
out
,
const
Handle
&
handle
);
// Handle returned for any buffer created with the core/context objects
// Handle returned for any buffer created with the core/context objects
struct
BufferHandle
{
uint64_t
id
;};
class
BufferHandle
:
public
Handle
{
struct
PassHandle
{
uint64_t
id
;};
friend
class
BufferManager
;
struct
PipelineHandle
{
uint64_t
id
;};
private:
struct
ResourcesHandle
{
uint64_t
id
;};
using
Handle
::
Handle
;
};
class
PassHandle
:
public
Handle
{
friend
class
PassManager
;
private:
using
Handle
::
Handle
;
};
class
PipelineHandle
:
public
Handle
{
friend
class
PipelineManager
;
private:
using
Handle
::
Handle
;
};
class
ResourcesHandle
:
public
Handle
{
friend
class
DescriptorManager
;
private:
using
Handle
::
Handle
;
};
}
}
Loading