Bright Memory: Infinite (Unreal Engine, D3D12, NVIDIA Streamline) now passed NGX's checks but no
frame reached the layer. Two causes, fixed here:
- The layer recognised the bridge's mailbox by size and the storage bit only, in a 128-entry table;
the game's own 8 KB storage buffers filled it first, so the bridge's doorbells were ignored. It now
matches the exact usage the bridges create them with (mailbox STORAGE|TRANSFER_DST, marker
TRANSFER_DST), keeps 1024 entries and warns once if the table is ever full.
- Streamline (sl.interposer) wraps the devices and command lists it creates; vkd3d-proton and DXVK
do not know the wrappers. wl_streamline.h asks a wrapper for StreamlineRetrieveBaseInterface
(Streamline source/core/sl.interposer/d3d12/d3d12Device.cpp) and the interop calls retry on the
wrapped object: device queries, BeginVkCommandBufferInterop/End, GetVulkanResourceInfo1.
DROIDDECK_UPSCALE_LOG=1 now also logs the NGX bridge's D3D12 attach and first evaluate (seam
ready, images found, command list accepted, dispatch result).
Root cause of the black Full FSR 4.1 frame in D3D12 games on Turnip: vkd3d-proton uses its own
descriptor buffers in the command buffers the upscaler records into. Measured on the Red Magic 12
Pro (Adreno 850) with the XeSS DX12 sample: Full black in 9/9 shots, and still black with the direct
output write off and with the exposure pass off; with VKD3D_DISABLE_EXTENSIONS=VK_EXT_descriptor_buffer
the picture is there (5/6 shots coloured, the sixth caught the triangle off screen, as with the other
engines), with the direct write on.
The layer now hides the extension from the game (vkd3d then uses its classic descriptors) and still
enables it for itself; DROIDDECK_UPSCALE_APP_DESCRIPTOR_BUFFER=1 shows it again. The Lite fallback
now triggers only when the game enabled descriptor buffers anyway (Turnip), not for every D3D12
frame. The FULL_DIRECT_OUT / FULL_AUTO_EXPOSURE test switches are removed.
DROIDDECK_UPSCALE_FULL_DIRECT_OUT=0 makes Full write to its own image and copy into the game's,
as it does for the Vulkan sample (where the picture is right); D3D12 frames are the only ones
that take the direct write (log "Tier 1.1 active ... fmt=97"). DROIDDECK_UPSCALE_FULL_AUTO_EXPOSURE=0
skips the pass-00 exposure pass. Both default to the current behaviour.
Measured on the Red Magic 12 Pro (Adreno 850, Turnip) with the r5 build: Full FSR 4.1 writes a
black frame in the XeSS DX12 sample (0 coloured pixels in 9 of 9 screenshots, GPU and NPU paths)
but shows the picture in the XeSS Vulkan sample, like Lite, SGSR 2, FSR 3 and XeSS. Upstream's
binding-11 change does not fix it, so the opt-in guard from the r5 port was wrong. The check now
sits at dispatch and looks at the frame's API: D3D12 frames on Turnip use FSR 4.1.2 Lite (NPU or
GPU, as chosen); DROIDDECK_UPSCALE_FULL_ON_TURNIP=1 runs Full anyway.
The glibc (PRoot) build has no sys/system_properties.h; the r5 SoC check that needed it is
replaced by DROIDDECK_UPSCALE_NPU. Also check the pacer heartbeat write's result (gcc
-Wunused-result). Both layer builds (APK clang, build-glibc.sh gcc) build without warnings.
Layer and bridges updated from Winlator-NeuralScale 71c140d9 (michaelisomer-cyber, GPL-3.0):
- full FSR 4.1 on the NPU (S8 graph, U8 fallback), compiled on the device per HTP arch
- ghosting fix: blank far depth when a game sends none, binding 11 bound with 62
- FSR 4.1.2 Lite S8/U8 zero-copy graphs
- Snapdragon GSR 2 on the GPU (new engine sgsr2_gpu)
- D3D11 DLSS through DXVK's interop (nvngx D3D11 entry points)
Left out on purpose: upstream's root-only performance/thermal manager, GPU clock floor and
bypass charging. Kept from DroidDeck: NPU detection by the app (DROIDDECK_UPSCALE_NPU, any HTP
generation incl. the phone's own QNN libraries) instead of upstream's SoC list, DD env names and
log tags, Intel XeSS 3 (runtime still fetched from a0ab6b0f, upstream dropped it in cb3ae04e).
FSR 4.0 on the NPU is gone upstream; the engine id becomes fsr4_1_full_npu and saved
fsr4_0_npu choices map to it. The full-FSR-4-on-Turnip guard is now opt-in
(DROIDDECK_UPSCALE_FULL_OFF_ON_TURNIP=1), since upstream's binding-11 fix targets that black frame.
Data files re-pinned to 71c140d9 (81 core + 8 NPU, sha256 checked).
Phones whose vendor offers the QNN HTP libraries to apps (public.libraries.txt)
now run the NPU engines on them, any HTP generation, with nothing downloaded:
the app finds the generation from the vendor's libQnnHtpV<NN>Stub.so and passes
DROIDDECK_UPSCALE_HTP_ARCH; the layer takes the bundled QNN files only for an
arch whose skel came with them, else loads the vendor libraries by name.
Red Magic 12 Pro (SM8975, HTP V85, no root), layer QNN code in a probe:
FSR 4.1.2 Lite INT8 graph compiled on the phone (2.0 s, cached 0.3 s),
1.2 ms per run at perf, 0 failures; arch found without HTP_ARCH.
The FSR 4.1.1 full path (descriptor buffers) runs on Turnip but writes a black frame (Elite, Adreno 830:
5 screenshots, no lit pixel, while the status said ok). FSR 4.1.2 Lite, on classic descriptors, works there,
so the full path now declines on VK_DRIVER_ID_MESA_TURNIP and the pipeline's own fallback runs Lite, with
reason full_black_on_turnip_lite_used in the status. DROIDDECK_UPSCALE_FULL_ON_TURNIP=1 runs it anyway.
- Bridge DLLs: staged from an exact list (24 files) and only reported done when all of them are in
place; the local copy is also read from the app's own external files folder, which needs no storage
permission (Download/ alone could not be listed without it, so nothing was copied while the log said
true). An installed add-on pack is staged again when the rootfs copy is gone.
- "Upscaler files" counts the bridge DLLs, not only the data files.
- FSR 4 / FSR 4 Lite: a render-sized D32 stand-in depth (cleared to the far plane) when the game sends
none, as XeSS allows; both used to fall back to FSR 3.1 for such games.
- droiddeck-game-env writes the live switch file from the game's own settings at every launch, so the
previous game's or the in-game menu's choice no longer wins at start.
- Intel's XeSS runtime goes into every upscaler game's prefix once downloaded (hard link where the file
system allows), so XeSS 3 also works when picked in the in-game menu.
Port of the NeuralScale layer (previous commit) for DroidDeck:
- Layer VK_LAYER_DROIDDECK_upscale, library libVkLayer_droiddeck_upscale.so,
implicit manifest template (DROIDDECK_UPSCALE=1 / DROIDDECK_UPSCALE_DISABLE=1).
- Settings read as DROIDDECK_UPSCALE_<KEY>, then WINLATOR_FSR4_<KEY>.
- No hardcoded com.winlator.cmod data dir; without a dir frames get the blit
fallback.
- Compiled NPU graph caches go to <dir>/<htp arch>/ (v79/v81 from HTP_ARCH,
the SoC properties or the mapped QNN stub) instead of <dir>/v81/.
- The arch stub is loaded from the QNN library search list first, so
NATIVELIB_DIR is enough without LD_LIBRARY_PATH.
- driverID/driverName are only rewritten with GPU_SPOOF word "1";
SPOOF_DLSS=1 alone reports RTX vendor/device IDs.
- APK build via app/src/main/cpp/CMakeLists.txt; glibc build for the PRoot
guest (build-glibc.sh, DD_UPSCALE_NO_ANDROID: QNN stubs, stderr log) in
the runtime recipe, installed to usr/local/lib/droiddeck-upscale-layer/.
- -Bsymbolic so the exported vkGetInstanceProcAddr is not interposed by a
libvulkan in the global scope.
- Pack scripts take their paths as arguments.
Seam protocol, buffer sizes, magic values and backend IDs are unchanged.
Verbatim copy of app/src/main/cpp/fsr4npu/ (C sources, headers, shaders,
weight pack scripts) from michaelisomer-cyber/Winlator-NeuralScale at
a0ab6b0f770e1a6786b4e68def46b4edb8baafd0 (GPL-3.0, fork of
StevenMXZ/Winlator-Ludashi). Not built yet; the DroidDeck port follows.