Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Multi-Layer Reprojection
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Multi-Layer Reprojection
Commits
6a367375
Unverified
Commit
6a367375
authored
4 years ago
by
Lava Block
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #42 from pezcode/buffer-address
Add support for getting buffer address (VK_KHR_buffer_device_address)
parents
36c47577
67d911b7
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
liblava/resource/buffer.cpp
+12
-0
12 additions, 0 deletions
liblava/resource/buffer.cpp
liblava/resource/buffer.hpp
+1
-0
1 addition, 0 deletions
liblava/resource/buffer.hpp
with
13 additions
and
0 deletions
liblava/resource/buffer.cpp
+
12
−
0
View file @
6a367375
...
...
@@ -105,6 +105,18 @@ namespace lava {
device
=
nullptr
;
}
VkDeviceAddress
buffer
::
get_address
()
const
{
if
(
device
->
call
().
vkGetBufferDeviceAddressKHR
)
{
VkBufferDeviceAddressInfoKHR
addr_info
{
.
sType
=
VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO_KHR
,
.
buffer
=
vk_buffer
};
return
device
->
call
().
vkGetBufferDeviceAddressKHR
(
device
->
get
(),
&
addr_info
);
}
else
{
return
0
;
}
}
void
buffer
::
flush
(
VkDeviceSize
offset
,
VkDeviceSize
size
)
{
vmaFlushAllocation
(
device
->
alloc
(),
allocation
,
offset
,
size
);
}
...
...
This diff is collapsed.
Click to expand it.
liblava/resource/buffer.hpp
+
1
−
0
View file @
6a367375
...
...
@@ -45,6 +45,7 @@ namespace lava {
return
get_descriptor
();
}
VkDeviceAddress
get_address
()
const
;
VkDeviceSize
get_size
()
const
{
return
allocation_info
.
size
;
}
...
...
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