mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-25 03:25:16 -10:00
* Android: load custom Vulkan driver packages on Adreno Sideloaded arm64 builds can load a Vulkan driver package (a zip with meta.json and one .so, such as Mesa's Turnip) on Adreno GPUs with Android 9 or later. As libadrenotools does, a private copy of the system Vulkan loader is opened in a linker namespace of its own, where a small hook library hands it the custom driver as its HAL. The new video_vulkan_driver_path setting names the zip; empty is the system driver, and core, content-directory and game overrides carry it. The package is checked and extracted to internal storage once per version. Packages from any vendor are accepted. Only Mesa ones have been tested, so any other vendor logs that it is untested and that its load cannot be confirmed. A Mesa package that leaves the stock Qualcomm driver running, as the hook does when the custom library fails to load, counts as failed. When the custom driver fails to create an instance, a device or the first swapchain, the context is redone on the system driver in the same process. A driver that takes the process down during its init is turned off for that core until it is picked again, and a "Safe start" launcher shortcut starts RetroArch once on the system driver. Play Store, Quest and API 16 builds do not carry any of it. Co-authored-by: lim2222 <[email protected]> * Menu: Custom Vulkan Driver setting Settings > Video > Output gains a Custom Vulkan Driver row on builds and devices that can load one. OK opens a browser for driver zips in <system>/vulkan_drivers, Start goes back to the system driver, and the sublabel says when the chosen driver crashed during its last start and is off for the running core. While RetroArch runs from the Safe start shortcut, the row reads "System (Safe start)" and the sublabel names the driver the next normal start uses. The choice applies at the next Vulkan start; picking a driver never restarts video. Co-authored-by: lim2222 <[email protected]> * archive: a streamed Deflate member writes no more than its size A Deflate member streamed to its file a window at a time is now refused as soon as it inflates past the size its headers give, so no more than that size reaches the disk, as for Deflate64, LZMA, zstd and bzip2. Both the zlib and the built-in inflate paths. Lane: archive_stream_test "inflate bound", a member of stored blocks that holds 1 MiB under a 300 KiB size, counting what the VFS writes. * Vulkan custom driver: merge onto master, ask the GPU once The menu row moves one entry up its table, clear of the manual-scan row master renamed. Whether the device can take a custom driver is asked once and kept, rather than each time the Video settings list is built. * Vulkan custom driver: extract a picked package in a task Picking a driver pushes a task that checks the package and extracts it on a worker, into the dir the next Vulkan start looks in, so that start only maps the library rather than inflating up to 64 MiB while the main thread waits. The task reads only what it was handed. It writes through a .prep dir of its own; a context init that gets there first extracts through its .tmp as before, and whichever finishes second keeps the other's. The once-per-process prune leaves .prep dirs alone while a task runs. A driver set by an override, never picked, is still extracted at its first start. --------- Co-authored-by: lim2222 <[email protected]> Co-authored-by: LibretroAdmin <[email protected]>
20 lines
1.1 KiB
C
20 lines
1.1 KiB
C
/* Single-source definitions: custom Vulkan driver path setting.
|
|
* Grammar identical to settings_def_video_sync.h plus S_FLOAT and
|
|
* the _NS no-sublabel variants; the descriptor argument span
|
|
* matches SDESC_<kind>_ROW; row order is menu display order;
|
|
* h2json.py parses these rows for the Crowdin source upload. */
|
|
|
|
/* Descriptor rows are #ifdef HAVE_VULKAN_CUSTOM_DRIVER; the string tables
|
|
* always carry this row via the strings pass. */
|
|
#if defined(HAVE_VULKAN_CUSTOM_DRIVER) || defined(SETTINGS_DEF_STRINGS_PASS)
|
|
/* configuration.c registers "video_vulkan_driver_path" with a literal
|
|
* row under HAVE_VULKAN_CUSTOM_DRIVER. */
|
|
#ifndef SETTINGS_DEF_CONFIG_PASS
|
|
S_PATH_DS(path_vulkan_driver, VIDEO_VULKAN_DRIVER_PATH,
|
|
"video_vulkan_driver_path",
|
|
directory_system, SD_FLAG_NONE, 0, "zip", setting_get_string_representation_vulkan_driver, 0,
|
|
"Custom Vulkan Driver",
|
|
"Use a Vulkan driver package (.zip) instead of the system driver. The driver runs inside RetroArch: only use packages from a source you trust. Takes effect the next time Vulkan starts. Start: system driver.")
|
|
#endif
|
|
#endif
|