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
00c6cebc
Commit
00c6cebc
authored
3 years ago
by
Artur Wasmut
Browse files
Options
Downloads
Plain Diff
Merge branch '40-anbindung-von-buffern-an-descriptor-sets' into 'develop'
Resolve "Anbindung von Buffern an Descriptor Sets" Closes
#40
See merge request
!33
parents
68d87f99
e34f54e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!33
Resolve "Anbindung von Buffern an Descriptor Sets"
Pipeline
#25200
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/vkcv/BufferManager.hpp
+21
-0
21 additions, 0 deletions
include/vkcv/BufferManager.hpp
src/vkcv/BufferManager.cpp
+20
-0
20 additions, 0 deletions
src/vkcv/BufferManager.cpp
with
41 additions
and
0 deletions
include/vkcv/BufferManager.hpp
+
21
−
0
View file @
00c6cebc
...
...
@@ -6,6 +6,7 @@
namespace
vkcv
{
enum
class
BufferType
{
INDEX
,
VERTEX
,
UNIFORM
,
STORAGE
,
...
...
@@ -61,6 +62,26 @@ namespace vkcv
*/
uint64_t
createBuffer
(
BufferType
type
,
size_t
size
,
BufferMemoryType
memoryType
);
/**
* Returns the Vulkan buffer handle of a buffer
* represented by a given buffer handle id.
*
* @param id Buffer handle id
* @return Vulkan buffer handle
*/
[[
nodiscard
]]
vk
::
Buffer
getBuffer
(
uint64_t
id
)
const
;
/**
* Returns the Vulkan device memory handle of a buffer
* represented by a given buffer handle id.
*
* @param id Buffer handle id
* @return Vulkan device memory handle
*/
[[
nodiscard
]]
vk
::
DeviceMemory
getDeviceMemory
(
uint64_t
id
)
const
;
/**
* Fills a buffer represented by a given buffer
* handle id with custom data.
...
...
This diff is collapsed.
Click to expand it.
src/vkcv/BufferManager.cpp
+
20
−
0
View file @
00c6cebc
...
...
@@ -178,6 +178,26 @@ namespace vkcv {
);
}
vk
::
Buffer
BufferManager
::
getBuffer
(
uint64_t
id
)
const
{
if
(
id
>=
m_buffers
.
size
())
{
return
nullptr
;
}
auto
&
buffer
=
m_buffers
[
id
];
return
buffer
.
m_handle
;
}
vk
::
DeviceMemory
BufferManager
::
getDeviceMemory
(
uint64_t
id
)
const
{
if
(
id
>=
m_buffers
.
size
())
{
return
nullptr
;
}
auto
&
buffer
=
m_buffers
[
id
];
return
buffer
.
m_memory
;
}
void
BufferManager
::
fillBuffer
(
uint64_t
id
,
void
*
data
,
size_t
size
,
size_t
offset
)
{
if
(
size
==
0
)
{
size
=
SIZE_MAX
;
...
...
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