update lsvk integration (remove dead code, Improve layer stability and prevent freezes)
chore: update gitignore and android build script
refactor(android): streamline external memory and improve extension handling
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.
fix: Improve layer stability and prevent freezes in external mode
Enhances robustness by:
- Replacing unbounded
vkDeviceWaitIdlewith 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
VkPresentIdKHRis 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.