VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT usage
@SaschaWillems is already working on this.
Since Jan 8, 2026.
Assessment
This issue has not been assessed yet.
Description
Quote from https://howtovulkan.com/:
The specific flags combination of
VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BITandVMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BITused here make sure we get a memory type that's located on the GPU (in VRAM) and accessible by the host.
Meanwhile, quote from VMA / vk_mem_alloc.h:
Together with
VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BITorVMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT,
it says that despite request for host access, a not-HOST_VISIBLEmemory type can be selected if it may improve performance.By using this flag, you declare that you will check if the allocation ended up in a
HOST_VISIBLEmemory type (e.g. using vmaGetAllocationMemoryProperties()) and if not, you will create some "staging" buffer and issue an explicit transfer to write/read your data.To prepare for this possibility, don't forget to add appropriate flags like
VK_BUFFER_USAGE_TRANSFER_DST_BIT,VK_BUFFER_USAGE_TRANSFER_SRC_BITto the parameters of created buffer or image.
To me it seems VMA_ALLOCATION_CREATE_HOST_ACCESS_ALLOW_TRANSFER_INSTEAD_BIT might not be used correctly in this sample. I believe either the bit should be dropped, or else the sample would need to check if the memory ends up host visible and deal with the case when it is not.
- Dominant language
- C++
- Stars
- 681
- Forks
- 63
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SaschaWillems/HowToVulkan
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
SaschaWillems/HowToVulkan#40 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
SaschaWillems/HowToVulkan#44 · 2 reactions ·
-
Difficulty 4/5 1-2 days Newbie friendliness 35/100
SaschaWillems/HowToVulkan#43 · 1 comment ·
-
Bad handling of VK_ERROR_OUT_OF_DATE_KHR returned from vkAcquireNextImageKHRMay be free again @SaschaWillems claimed this 174 days ago, and no pull request is open. Openbug
SaschaWillems/HowToVulkan#30 · 2 comments · 1 assignee ·
All issues in SaschaWillems/HowToVulkan
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
[BUG] Segfault when all runs of a Complexity() benchmark are skippedPossibly taken @nitanshnagpal claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Code: Performance
Difficulty 1/5 Under an hour Newbie friendliness 88/100
CrimsonCrossBunker/Cataclysm-Cleanwater-Bomb#1167 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
meshcore-dev/MeshCore#3760 · 1 comment ·
Maintainers usually reply within 1 day