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
a9686658
Commit
a9686658
authored
3 years ago
by
Lars Hoerttrich
Browse files
Options
Downloads
Patches
Plain Diff
[
#31
] Added function to copy buffer to image
parent
9b6bacff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!32
Resolve "Image-Klasse"
Pipeline
#25268
passed
3 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/vkcv/ImageManager.hpp
+1
-1
1 addition, 1 deletion
include/vkcv/ImageManager.hpp
src/vkcv/ImageManager.cpp
+17
-2
17 additions, 2 deletions
src/vkcv/ImageManager.cpp
with
18 additions
and
3 deletions
include/vkcv/ImageManager.hpp
+
1
−
1
View file @
a9686658
...
...
@@ -31,7 +31,7 @@ namespace vkcv {
ImageManager
&
operator
=
(
ImageManager
&&
other
)
=
delete
;
ImageManager
&
operator
=
(
const
ImageManager
&
other
)
=
delete
;
void
copyBufferToImage
(
vk
::
Buffer
buff
f
er
,
vk
::
Image
image
,
uint32_t
width
,
uint32_t
height
);
void
copyBufferToImage
(
vk
::
Buffer
buffer
,
vk
::
Image
image
,
uint32_t
width
,
uint32_t
height
);
void
switchImageLayout
(
uint64_t
id
,
vk
::
ImageLayout
oldLayout
,
vk
::
ImageLayout
newLayout
);
uint64_t
createImage
(
uint32_t
width
,
uint32_t
height
);
...
...
This diff is collapsed.
Click to expand it.
src/vkcv/ImageManager.cpp
+
17
−
2
View file @
a9686658
...
...
@@ -45,9 +45,24 @@ namespace vkcv {
}
}
void
ImageManager
::
copyBufferToImage
(
vk
::
Buffer
buff
f
er
,
vk
::
Image
image
,
uint32_t
width
,
uint32_t
height
)
void
ImageManager
::
copyBufferToImage
(
vk
::
Buffer
buffer
,
vk
::
Image
image
,
uint32_t
width
,
uint32_t
height
)
{
//TODO
vk
::
BufferImageCopy
copyRegion
(
0
,
width
,
height
);
// possibly add offset etc
SubmitInfo
submitInfo
;
submitInfo
.
queueType
=
QueueType
::
Transfer
;
//not sure
m_core
->
submitCommands
(
submitInfo
,
[
buffer
,
image
,
copyRegion
](
const
vk
::
CommandBuffer
&
commandBuffer
)
{
commandBuffer
.
copyBufferToImage
(
buffer
,
image
,
vk
::
ImageLayout
::
eTransferDstOptimal
,
copyRegion
);
},
[]()
{}
);
}
...
...
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