Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions impeller/renderer/backend/vulkan/device_buffer_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ bool DeviceBufferVK::OnCopyHostBuffer(const uint8_t* source,
if (source) {
::memmove(dest + offset, source + source_range.offset, source_range.length);
}
::vmaFlushAllocation(allocator_, allocation_, offset, source_range.length);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#ifdef FML_OS_ANDROID?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure? we can't actually test all the devices this will run on, and this will always be safe to call...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should probably just not request coherent memory if we don't need it and add the explict flushes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

It looks like we should be querying vmaGetMemoryProperties to see if the https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceMemoryProperties.html has a VkMemoryType that supports host coherent.


return true;
}
Expand Down