From 9840a96aa69f904106be86159443e6fd42d04d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berkay=20K=C3=B6sebay?= Date: Sun, 22 Nov 2026 15:06:03 +0100 Subject: [PATCH] GPU desktop: Qt Quick without depth and stencil buffers On the GPU desktop the shell and every Qt app now run with QSG_NO_DEPTH_BUFFER=1 and QSG_NO_STENCIL_BUFFER=1. A 2D interface never reads its depth or stencil buffer, but on a tile-based GPU each window and each layer still keeps a full-size depth/stencil buffer in memory. iOS draws its interface without one; Qt Quick then sorts opaque content itself. Measured on an iPod touch 6 (A8, 1 GB of RAM): the shell's GPU memory went from 140 MB to 88 MB, Files' from 40 MB to 22 MB, and the system's GPU buffers from 211 MB to 145 MB. The shell, its popups, the control center and Qt apps draw as before. Assisted-by: LLM --- CHANGELOG.md | 3 +++ desktop/configuration/login-session | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93431c3..f1fa6cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ is missing or empty. ### Desktop +- On the GPU desktop, the shell and Qt apps draw without depth and stencil + buffers, as iOS draws its interface. On the iPod touch 6 the shell uses + about 50 MB less memory, and every Qt app about 18 MB less. - Every iPad, iPhone and iPod touch screen now starts at the size it has under iOS. Before, only the iPad 6, iPad 7 and iPhone 7 did; on the others, such as the iPod touch 6, everything was drawn at half size. diff --git a/desktop/configuration/login-session b/desktop/configuration/login-session index 8661ddb..0d86da7 100644 --- a/desktop/configuration/login-session +++ b/desktop/configuration/login-session @@ -73,6 +73,11 @@ if [[ -n $gpu ]]; then export "${gpu_desktop[@]}" # The shell (and every app) draws on the GPU too, not Qt's software renderer. unset LIBGL_ALWAYS_SOFTWARE QT_QUICK_BACKEND + # Qt Quick draws without a depth or stencil buffer, as iOS draws its 2D + # UI: on these tile-based GPUs each window and each layer otherwise + # keeps a full-size depth/stencil buffer in memory that the UI never + # reads (on the iPod touch 6 that is about 50 MB in the shell alone). + export QSG_NO_DEPTH_BUFFER=1 QSG_NO_STENCIL_BUFFER=1 else gpu_verdict="software desktop: ${gpu_detail:-the GPU probe failed}" fi