mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-12 11:31:08 +00:00
On some Adreno devices (the Retroid Pocket Duo) SELinux hides kgsl's sysfs nodes from apps, so the HUD showed no GPU % and no GPU clock. Devices whose nodes are readable keep using them; nothing changes there or on GPUs without kgsl. Where the nodes are blocked: - GPU %: a native reader maps kgsl's memstore read-only (any kgsl client may) and samples the ringbuffer start/end timestamps once a millisecond while a HUD is shown. That covers all GPU work, Android's own composition included. - Backup for GPU %: an implicit Vulkan layer in the guest (tools/gpuload) and the compositor time their own GPU work with timestamp queries. It runs until the memstore stamps are seen moving, and for the whole session if they never move. - GPU clock: a small GPU job of our own reads the always-on and RBBM cycle counters (libgpuclock). The HUD diagnostics export lists which source each GPU value came from. tools/gpuload/build.sh takes the Vulkan headers from build_local.sh's NDK first and keeps NDK paths with spaces intact.
21 lines
748 B
JSON
21 lines
748 B
JSON
{
|
|
"file_format_version": "1.2.0",
|
|
"layer": {
|
|
"name": "VK_LAYER_DROIDDECK_gpu_load",
|
|
"type": "GLOBAL",
|
|
"library_path": "/usr/local/lib/droiddeck-gpuload/libVkLayer_droiddeck_gpuload.so",
|
|
"api_version": "1.3.0",
|
|
"implementation_version": "1",
|
|
"description": "Times this process's GPU work for DroidDeck's HUD where Android hides the GPU load; idle unless a HUD is shown",
|
|
"functions": {
|
|
"vkNegotiateLoaderLayerInterfaceVersion": "DroidDeckGpuLoad_NegotiateLoaderLayerInterfaceVersion"
|
|
},
|
|
"enable_environment": {
|
|
"DROIDDECK_GPU_LOAD": "1"
|
|
},
|
|
"disable_environment": {
|
|
"DROIDDECK_GPU_LOAD_DISABLE": "1"
|
|
}
|
|
}
|
|
}
|