fix(quest): answer a refused KGSL timestamp read from waits

Mesa 27 polls timeline points with CMDSTREAM_READTIMESTAMP_CTXTID and
reports any failure as VK_ERROR_UNKNOWN, so gamescope aborted at start on
Quest with vk.WaitSemaphores result -13. Track each context's submitted
timestamps in the preload and answer a failed read from one millisecond
WAITTIMESTAMP calls. Log refused KGSL ioctls to session.log.
This commit is contained in:
Anuar Lukpanov committed 2026-11-01 10:52:06 +05:00
1 parent 09d170eb22
commit 9fce12730c
5 files changed
+207 -16

No files matched your search

+7
View File
@@ -44,6 +44,13 @@ unchanged. Only `EACCES`/`EPERM` failures retry through `GPUOBJ_ALLOC`,
bundled Turnip binary. Unhandled controller ioctls forward to the next
preload hook rather than skipping it with a raw syscall.
The Ubuntu runtime's Turnip polls timeline points with
`CMDSTREAM_READTIMESTAMP_CTXTID` and reports any failure as `VK_ERROR_UNKNOWN`,
which aborted gamescope with `vk.WaitSemaphores` result -13 on Quest. The Linux
preload (`tools/linuxfs/preload/kgslpoll.c`) answers a failed read from one
millisecond `WAITTIMESTAMP` calls over the context's submitted timestamps, and
logs refused KGSL ioctls to `session.log` as `[QuestKGSL] ioctl 0x.. refused`.
`tools/build_local.sh` and CI build the wrapper from source using the pinned
Android NDK; the normal preload builds include the shared Linux adapter.
Runtime input verification checks the resulting driver archive and invalidates