From b50d333f6c0104eb10788f4025db8d99e172239b Mon Sep 17 00:00:00 2001 From: The412Banner Date: Mon, 12 Oct 2026 19:00:06 -0400 Subject: [PATCH] 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. --- tools/dxvk/build.sh | 11 +++++++++++ .../overlay/usr/local/bin/droiddeck-session | 8 +++++--- tools/powervr/release.json | 2 +- tools/tests/test_vk_pending_completion.py | 5 ++++- tools/tests/test_vk_terminal_callers.py | 18 +++++++++++++++++- tools/tests/vk_terminal_callers_test.c | 1 + 6 files changed, 39 insertions(+), 6 deletions(-) diff --git a/tools/dxvk/build.sh b/tools/dxvk/build.sh index 8243ec0fd..d403aa050 100755 --- a/tools/dxvk/build.sh +++ b/tools/dxvk/build.sh @@ -5,6 +5,15 @@ root=$(cd "$(dirname "$0")/../.." && pwd) . "$root/tools/dxvk/source.env" mkdir -p "${1:?output directory required}" out=$(cd "$1" && pwd) +# Refuse to mix a pinned build with prior DLLs or an incomplete previous build. +# Include dotfiles in the check and leave all existing contents untouched. +shopt -s nullglob dotglob +existing=("$out"/*) +if ((${#existing[@]})); then + printf '%s\n' 'output directory must be empty; use a fresh build directory' >&2 + exit 1 +fi +shopt -u nullglob dotglob work=$(mktemp -d) trap 'rm -rf "$work"' EXIT git init -q "$work/source" @@ -17,6 +26,8 @@ for patch in "$root"/tools/dxvk/patches/*.patch; do git -C "$work/source" apply "$patch" done python3 "$root/tools/dxvk/check_present_sync.py" "$work/source/src/dxvk/dxvk_presenter.cpp" +python3 "$root/tools/dxvk/check_hud_storage_format.py" "$work/source/src/dxvk/hud/shaders/hud_frame_time_eval.comp" +python3 "$root/tools/dxvk/check_d3d9_single_sample.py" "$work/source" for arch in 32 64; do meson setup "$work/build$arch" "$work/source" --cross-file "$work/source/build-win$arch.txt" \ --buildtype release --prefix "$out" --bindir "x$arch" --libdir "x$arch" -Db_ndebug=if-release --strip diff --git a/tools/linuxfs/overlay/usr/local/bin/droiddeck-session b/tools/linuxfs/overlay/usr/local/bin/droiddeck-session index deeed96f6..a3424b399 100755 --- a/tools/linuxfs/overlay/usr/local/bin/droiddeck-session +++ b/tools/linuxfs/overlay/usr/local/bin/droiddeck-session @@ -869,6 +869,8 @@ BUSCONF bl_steam_presentation=(-cef-disable-gpu-compositing) echo "== steam: system PowerVR uses OpenGL/DRI3 through Zink with software CEF compositing" fi + # The client's CEF flags for this presentation; the UI choice below may replace them. + _bl_cef=(-cef-force-gpu "${bl_steam_presentation[@]}" -cef-use-gl=angle "-cef-use-angle=$bl_steam_angle") # Decky is optional and session scoped: the app's marker opts in, and this supervisor is # reaped with the client session. Native ARM64 runs directly. A legacy x86_64 asset is used # only when its recorded architecture says so and droiddeck-fex has FEX and its runtime ready. @@ -926,9 +928,9 @@ BUSCONF # desktop's launchers ask for. KDE owns its windows when BL_DESKTOP=1. _bl_ui=(-gamepadui) [ "${BL_STEAM_UI:-}" = desktop ] && _bl_ui=() - # bl_steam_angle / bl_steam_presentation default to the Adreno values (vulkan, none); only - # the system-PowerVR path (BL_STEAM_GL_PRESENT=1) changes them. - _bl_cef=(-cef-force-gpu "${bl_steam_presentation[@]}" -cef-use-gl=angle "-cef-use-angle=$bl_steam_angle") + # bl_steam_angle / bl_steam_presentation (set above) default to the Adreno values (vulkan, + # none); only the system-PowerVR path (BL_STEAM_GL_PRESENT=1) changes them. + _bl_cef=(-cef-force-gpu "${bl_steam_presentation[@]}" -cef-use-gl=angle "-cef-use-angle=${bl_steam_angle:-vulkan}") if [ "${BL_DESKTOP:-}" = 1 ] && [ "${BL_STEAM_UI:-}" = desktop ]; then # KDE uses QPainter/shm on Android. CEF's Vulkan buffers cannot be # presented there; its software path keeps the library and dialogs on KDE. diff --git a/tools/powervr/release.json b/tools/powervr/release.json index dd5496a37..749eb2f73 100644 --- a/tools/powervr/release.json +++ b/tools/powervr/release.json @@ -133,7 +133,7 @@ "repository_commit": "aee0ebd43557ef9964ba7f6a11d7d30efaf983ac" }, "recipe_inputs": { - "tools/dxvk/build.sh": "f37efdc1dbcc511b0399e1027d582dfd09f689bddb434eed31c33d88867460ad", + "tools/dxvk/build.sh": "88b656292a6a8c92974f1c014dd685e104818ef45af5fa4e62b729452c969d6e", "tools/dxvk/check_present_sync.py": "42e2a590e17c1f53e5cd4100ef3d19a5bdcce31a6d7a18fbf9961f4ef27d5063", "tools/dxvk/patches/0001-check-direct3d-bc-formats.patch": "d38fc4d773b7974498dcb377dbaa883c9bba36aefa3235b39bca69d6dd220c77", "tools/dxvk/patches/0002-present-semaphore-per-swapchain-image.patch": "c802789a33099d3efc3413a297e2b752f8eb84c18cbfbdfc04e188f4090410d0", diff --git a/tools/tests/test_vk_pending_completion.py b/tools/tests/test_vk_pending_completion.py index 5f69c820d..d0a4ad594 100644 --- a/tools/tests/test_vk_pending_completion.py +++ b/tools/tests/test_vk_pending_completion.py @@ -62,7 +62,10 @@ static struct { void (*DestroyImage)(uintptr_t, uintptr_t, void *); void (*FreeMemory)(uintptr_t, uintptr_t, void *); } g_vk = {wait_fn, unmap_fn, destroy_fn, free_fn}; -struct vkp_image { uintptr_t image, mem; void *map; }; +typedef struct AHardwareBuffer AHardwareBuffer; +static int released_buffers; +static void AHardwareBuffer_release(AHardwareBuffer *b) { (void)b; ++released_buffers; } +struct vkp_image { uintptr_t image, mem; void *map; AHardwareBuffer *android_buffer; }; static void blendp_forget_image(uintptr_t image) { (void)image; ++forgotten; } /* PRODUCTION_FUNCTIONS */ static struct vkp_image *image(void) { diff --git a/tools/tests/test_vk_terminal_callers.py b/tools/tests/test_vk_terminal_callers.py index 7048f5e1b..5696d9096 100644 --- a/tools/tests/test_vk_terminal_callers.py +++ b/tools/tests/test_vk_terminal_callers.py @@ -49,7 +49,23 @@ int32_t ANativeWindow_getWidth(ANativeWindow *); int32_t ANativeWindow_getHeight(ANativeWindow *); void ANativeWindow_release(ANativeWindow *); ''') - (tmp / 'android/hardware_buffer.h').write_text('#pragma once\ntypedef struct AHardwareBuffer AHardwareBuffer;\n') + (tmp / 'android/hardware_buffer.h').write_text(''' +#pragma once +#include +typedef struct AHardwareBuffer AHardwareBuffer; +typedef struct AHardwareBuffer_Desc { + uint32_t width, height, layers, format; + uint64_t usage; + uint32_t stride, rfu0; + uint64_t rfu1; +} AHardwareBuffer_Desc; +#define AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE (1ULL << 8) +#define AHARDWAREBUFFER_USAGE_PROTECTED_CONTENT (1ULL << 14) +#define AHARDWAREBUFFER_USAGE_GPU_MIPMAP_COMPLETE (1ULL << 26) +static inline void AHardwareBuffer_describe(const AHardwareBuffer *b, AHardwareBuffer_Desc *d) { (void)b; *d = (AHardwareBuffer_Desc){0}; } +static inline void AHardwareBuffer_acquire(AHardwareBuffer *b) { (void)b; } +static inline void AHardwareBuffer_release(AHardwareBuffer *b) { (void)b; } +''') (tmp / 'android/log.h').write_text(''' #pragma once #define ANDROID_LOG_INFO 4 diff --git a/tools/tests/vk_terminal_callers_test.c b/tools/tests/vk_terminal_callers_test.c index d9364e318..49b452b01 100644 --- a/tools/tests/vk_terminal_callers_test.c +++ b/tools/tests/vk_terminal_callers_test.c @@ -83,6 +83,7 @@ void hdrc_forget_image(VkImage i) {} int hdrc_encode(VkCommandBuffer c, VkImage a, VkImage b, VkFormat f, int w, int h, const struct hdrc_params *p) { return -1; } void blendp_bind_device(VkDevice d) {} void blendp_forget_image(VkImage i) {} +void vkp_effects_forget_image(VkImage i) {} void blendp_begin_frame(void) {} int blendp_draw(VkCommandBuffer c, VkImage s, VkFormat sf, int sw, int sh, int sg, VkImage d, VkFormat df, int dw, int dh, const VkImageBlit *b) { return -1; }