From 3733c5090248e0e64f10fbe6decf9cfdf5b88d05 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Thu, 5 Nov 2026 22:06:16 -0500 Subject: [PATCH] feat: non-Adreno graphics stack (Venus, open driver pairs, gamescope patches) (#2029) * Retain compositor resources when GPU completion is unconfirmed * Stop quarantined GPU callers before retries and mapped writes * Support Android hardware-buffer presentation over Wayland * Support PowerVR swapchains and linear image imports in Gamescope * Bundle verified PowerVR graphics components through existing build preparation * Detect and select the system Vulkan backend on PowerVR * Apply PowerVR Steam and game compatibility during normal launches * Show PowerVR support through existing driver and component controls * Update existing hardware guidance for system Vulkan support * Import the shared system Vulkan readiness check * Discover and propagate the actual PowerVR render node * Prune obsolete PowerVR runtimes after guest processes exit * Retain external DMA-BUF ownership after GPU quarantine * Name the PowerVR HAL selection explicitly * Isolate component UI tests from application startup * Cover the inherited FEX preset in PowerVR profile tests * Log test worker failures for CI diagnosis * Remove temporary test logging after diagnostic CI * Prefer system dependencies for the Android Vulkan loader * Capture raw stderr before test worker termination * Remove the temporary test worker crash probe * Import pinned DXVK recipe prerequisite from PowerVR PR570 Copy only the standalone build recipe, source pin, BC-format prerequisite and presentation-sync patch/check from wallentx/DroidDeck at d0f7264ea8e402d30c868779198dc2fd74e7431c. Source: https://github.com/Droid-Deck/DroidDeck/pull/570 Preserve that proposal attribution; no Android app, compositor, managed pack, private data or fork development history is imported. * Add opt-in low32 GPU mapping adapter and integrity probes * Add opt-in D3D9 single-sample workaround and fix HUD texel format * Document verified production game workaround and publication scope * Restrict reset diagnostics and create private output atomically * Target official runtime review and document PR570 prerequisite provenance * Fix runtime tool output isolation, mmap64 chaining and DST ambiguity * Normalize swapchain backbuffers for the opt-in D3D9 single-sample path * Experimental Samsung Xclipse support on the system Vulkan path Detect Samsung's Vulkan HAL (vulkan.samsung.so) and its sgpu render node alongside PowerVR, and run Xclipse through the same libhybris bridge: - VK_LAYER_DROIDDECK_xclipse (tools/linuxfs/xclipse-layer), built with the glibc preloads and enabled only on Xclipse: sets bionic's environ for the driver's shader compiler, avoids immutable YCbCr samplers in compute layouts, forwards the KHR calibrated-timestamp entry points to the EXT ones, and reports textureCompressionBC and BC4/BC5 filtering over the compat layer's BC emulation. - Upstream DXVK 2.6.2, pinned as a tar.gz component and selected on Xclipse: the driver has 128 bytes of push constants, DXVK 3 needs 256. - android_wlegl accepts a zero stride and passes it through unchanged: Samsung's gralloc records none for GPU-only buffers. Tested on a Galaxy A56 (Xclipse 540, driver 24.0.560): Steam Big Picture and PICO PARK (D3D9). * Xclipse layer: copy the device chain and track samplers per device - Clear textureCompressionBC in a copy of the device-create chain (every structure up to the VkPhysicalDeviceFeatures2 that enables it) instead of writing the caller's structure; a chain led by a structure of unknown size is passed on unchanged. - Track YCbCr samplers per device in a growable list, drop them on vkDestroySampler and device teardown, and fail sampler creation rather than leave one untracked when the list cannot grow. - Fail descriptor set layout creation with VK_ERROR_OUT_OF_HOST_MEMORY when a replacement sampler array cannot be allocated, instead of passing the original YCbCr samplers to the driver. * Xclipse layer: copy any device-chain structure the headers define The chain copy that clears the emulated textureCompressionBC only knew a handful of structure sizes, so a valid chain such as VkPhysicalDeviceTimelineSemaphoreFeatures -> VkPhysicalDeviceFeatures2 was passed on unchanged and the compat layer refused the bit. Size every structure that may extend VkDeviceCreateInfo from a table generated from the Vulkan registry (gen_device_chain.py, Vulkan-Headers 1.3.275, the headers the build compiles with), and copy onto the heap instead of a fixed buffer. Only a structure newer than those headers still passes the chain unchanged. Add a regression test that runs the layer between a simulated loader and a mock driver: the timeline-semaphore chain, pEnabledFeatures, an unknown structure, the caller's structures left untouched, per-device YCbCr sampler tracking with handle reuse, and the KHR calibrated-timestamp forwarding. CI installs libvulkan-dev for it. * Mali bridge (#517, by ASEbrahim) on the non-Adreno test branch Squash of Droid-Deck/DroidDeck#517 (ASEbrahim/DroidDeck mali-bridge @ 6b823341): the Vulkan bridge (tools/vkbridge) that runs the guest's Vulkan on the phone's own driver, with BC1-BC7, clip/cull distance, vertex-divisor and depth-clip emulation and dma-heap memory sharing for Mali. All of the bridge is ASEbrahim's work; squashed only to carry it on this test branch. Combined with #570 on this branch, a device draws through exactly one path: - Adreno: Turnip, unchanged (checked first; the bridge setting is ignored there). - PowerVR / Xclipse with the system HAL and a render node: the system-Vulkan path (#570). - Anything else with the Setup toggle on (Mali): the bridge. * Test branch: keep #570's DXVK build recipe so its pinned PowerVR components verify #602 adds output checks to tools/dxvk/build.sh; tools/powervr/fetch.py pins the exact recipe the published PowerVR DXVK was built from, so the branch carries #570's copy. * Test branch: make #570, #602 and #560/#561 pass each other's tests - tools/dxvk/build.sh: #602's copy (its output checks) and the PowerVR pin in tools/powervr/release.json moved to that file's hash; the recipe's outputs are unchanged. - droiddeck-session: the presentation block sets _bl_cef for #570's PowerVR path, and the UI block keeps main's order, defaulting to -cef-use-angle=vulkan when the block has not run. - Compositor test harnesses: AHardwareBuffer stubs for #570's AHB import, and a stub for vkp_effects_forget_image (main #597) that #561's caller harness predates. * Auto drivers for Mali and Xclipse on the non-Adreno test branch Auto now picks an open driver pair for the GPU, the way it does for Adreno: - Mali (no KGSL, /dev/mali0): the GPU's name ("Mali-G720-Immortalis MC12", from the vendor Vulkan driver or kbase's gpuinfo) picks the PanVK build: G52-G78 (Job Manager), G610/G710, G615 or G720. A Mali none of them covers (G925...), or one whose pair is not published yet, draws through the Mali bridge, switched on by Auto. - Xclipse keeps the system-driver path as Auto; the RADV pair is offered as a manual choice. - The pairs come from The412Banner/droiddeck-nonadreno-drivers (one pre-release per driver, each a DriverBundle zip). Only a device without an Adreno reads that repo. - The importers accept PanVK and RADV libraries (libvulkan_panfrost / libvulkan_radeon). - An open driver pair and the Mali bridge are alternatives: a selected pair turns the bridge off. - TU_DEBUG is only set for Turnip, on an Adreno. Every new branch is reached only when the device has no Adreno; an Adreno's detection, release sources, Auto choice and session environment are unchanged. * Auto: the one-binary PanVK kbase build for Mali v9-v13 on Android 15+ The412Banner/droiddeck-nonadreno-drivers adds panvk-mali-kbase: one PanVK build for G57/G68/G77/G78, G610/G710, G615/G715, G720/G725 and G925, whose display half needs Android 15. On Android 15+ Auto prefers it for every Mali it covers; below 15, and whenever its release is not listed, Auto falls back to the GPU generation's own pair. G52/G76 keep the Job Manager build; a G715/G725/G925 below Android 15, or any Mali no pair covers, draws through the bridge. Every pair stays selectable by hand. * Test: the G925 is in the kbase build's family now * Offer faux123's device PanVK builds (RP4 Pro, Ace, RG556) as manual pairs for their Mali * Detailed graphics logs for non-Adreno test reports - graphics-report.txt in every session folder: the graphics path the session draws with and why (Turnip, system Vulkan #570, Mali bridge #517, or an open driver pair with its release), the driver mode and choices, what Auto would pick, the GPU (family, Vulkan device name, kbase gpuinfo, Android, SoC, kernel), the GPU nodes the app can see (access, device numbers, SELinux label; nothing is opened) and the guest's graphics environment. At the end it adds the compositor's driver lines from app.log and the game launches that were logged. - vulkan-summary.txt: the session's own vulkaninfo --summary with the driver as exported, in the background with a 10 s timeout. - Per-game logs under games/