mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 14:26:00 +00:00
cleanup (#764)
This commit is contained in:
1 parent
4163b31b02
commit
83ec5708ed
852 files changed
+4844
-46144
No files matched your search
@@ -1,19 +1,3 @@
|
||||
/*
|
||||
* A zero-timeout KGSL timestamp wait answered as the poll it was meant to be.
|
||||
*
|
||||
* Turnip's KGSL backend emulates timeline semaphores with timestamps, and asks "has this one
|
||||
* retired yet?" by waiting on it with IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID and a timeout of 0.
|
||||
* KGSL reads a timeout of 0 as no timeout at all, so the poll blocks until the GPU gets there.
|
||||
* Mesa's timeline bookkeeping polls like that under a lock on every signalling submit, which put
|
||||
* vkd3d-proton, DXVK, gamescope and Zink in lock-step with the GPU: one frame queued, never two.
|
||||
* Found and measured by Bannerlator (PROGRESS_LOG 2026-09-29: a D3D12 demo went from 614 to
|
||||
* 4335 fps with the same answer given in its Vulkan adapter); the driver-side fix is on
|
||||
* Banners-Turnip, and this covers the drivers that do not carry it yet.
|
||||
*
|
||||
* The answer comes from the context's retired timestamp, compared the way KGSL compares them
|
||||
* (with wrap-around). Anything the read does not answer - an unknown context, a device that is not
|
||||
* KGSL - goes to the kernel as before. BL_NO_KGSL_POLL_FIX=1 turns it off.
|
||||
*/
|
||||
#define _GNU_SOURCE
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
@@ -50,7 +34,6 @@ static int enabled(void) {
|
||||
return cached;
|
||||
}
|
||||
|
||||
/* True when the call was answered here, with its result in *rc (and errno set on failure). */
|
||||
__attribute__((visibility("hidden"))) int bl_kgsl_poll(int (*real)(int, unsigned long, void *),
|
||||
int fd, unsigned long request, void *arg,
|
||||
int *rc) {
|
||||
|
||||
Reference in new issue
Block a user