update lsvk integration (remove dead code, Improve layer stability and prevent freezes) - #4
Merged
Merged
Conversation
…andling Remove the `AHardwareBuffer` backed image creation path due to its limited compatibility and lack of robust support across various Android ICDs. The layer now exclusively uses `VK_KHR_external_memory_fd` for external memory sharing on Android. Implement filtering for requested device extensions (`VK_KHR_external_memory`, `VK_KHR_external_memory_fd`, `VK_KHR_external_semaphore`, `VK_KHR_external_semaphore_fd`). This prevents device creation failures by only enabling extensions actually supported by the physical device. Update the Android build script to use a consistent `liblsfg-vk-layer.so` filename and recommend installation to `jniLibs/arm64-v8a/` for better Android app integration.
Enhances robustness by: - Replacing unbounded `vkDeviceWaitIdle` with bounded queue drains in external mode to prevent driver deadlocks. - Introducing a present thread watchdog to detect and report stalls in blocking Vulkan operations. - Adding an epoch system to invalidate framegen contexts after config reloads, forcing swapchain recreation. - Serializing access to shared layer state with a mutex to avoid race conditions during concurrent operations. - Ensuring `VkPresentIdKHR` is only passed with real frame presents to prevent game freezes on skipped generated frames. - Parking timed-out acquire semaphores to handle late signals from wrapper ICDs.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chore: update gitignore and android build script
refactor(android): streamline external memory and improve extension handling
Remove the
AHardwareBufferbacked image creation path due to its limited compatibility and lack of robust support across various Android ICDs. The layer now exclusively usesVK_KHR_external_memory_fdfor external memory sharing on Android.Implement filtering for requested device extensions (
VK_KHR_external_memory,VK_KHR_external_memory_fd,VK_KHR_external_semaphore,VK_KHR_external_semaphore_fd). This prevents device creation failures by only enabling extensions actually supported by the physical device.Update the Android build script to use a consistent
liblsfg-vk-layer.sofilename and recommend installation tojniLibs/arm64-v8a/for better Android app integration.fix: Improve layer stability and prevent freezes in external mode
Enhances robustness by:
vkDeviceWaitIdlewith bounded queue drains in external mode to prevent driver deadlocks.VkPresentIdKHRis only passed with real frame presents to prevent game freezes on skipped generated frames.