Skip to content

Commit c5c6088

Browse files
swolchokYIWENX14
authored andcommitted
[ET-VK] Request VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT, not RANDOM (#7615)
* [ET-VK] Request VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT, not RANDOM * fix lint
1 parent eeb4f9d commit c5c6088

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backends/vulkan/runtime/vk_api/memory/Allocator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ VulkanBuffer Allocator::create_staging_buffer(const VkDeviceSize size) {
151151
// Staging buffers are accessed by both the CPU and GPU, so set the
152152
// appropriate flags to indicate that the host device will be accessing
153153
// the data from this buffer.
154-
alloc_create_info.flags |= VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT |
154+
alloc_create_info.flags |=
155+
VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT |
155156
VMA_ALLOCATION_CREATE_MAPPED_BIT;
156157
alloc_create_info.usage = VMA_MEMORY_USAGE_AUTO_PREFER_HOST;
157158
alloc_create_info.requiredFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;

0 commit comments

Comments
 (0)