From 85bfb69306bfd18036d8d9172a115d513efa4c4a Mon Sep 17 00:00:00 2001 From: The412Banner Date: Fri, 4 Dec 2026 20:12:24 -0500 Subject: [PATCH] upscale: test switches for Full FSR 4.1's D3D12 black frame 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. --- tools/upscale/layer/fsr411_full_gpu.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/upscale/layer/fsr411_full_gpu.c b/tools/upscale/layer/fsr411_full_gpu.c index ce4d9ac445..e955a0e4b2 100644 --- a/tools/upscale/layer/fsr411_full_gpu.c +++ b/tools/upscale/layer/fsr411_full_gpu.c @@ -1206,8 +1206,19 @@ int wl_fsr411_full_gpu_dispatch(WlFsr411FullGpu *p, VkCommandBuffer cb, return 0; } + // Test switches for the D3D12-on-Turnip black frame: DROIDDECK_UPSCALE_FULL_DIRECT_OUT=0 writes to Full's own + // image and copies (as Vulkan games get), DROIDDECK_UPSCALE_FULL_AUTO_EXPOSURE=0 skips the pass-00 exposure pass. + static int sw_direct = -1, sw_spd = -1; + if (sw_direct < 0) { + const char *d = dd_upscale_env("FULL_DIRECT_OUT"); + const char *e = dd_upscale_env("FULL_AUTO_EXPOSURE"); + sw_direct = (d && d[0] == '0') ? 0 : 1; + sw_spd = (e && e[0] == '0') ? 0 : 1; + if (!sw_direct || !sw_spd) F411_LOGI("FSR 4.1.1 Full test switches: direct_out=%d auto_exposure=%d", sw_direct, sw_spd); + } + // Tier 1.1: Direct output write from pass-27 straight into game's out_img (skip CmdBlitImage!) - int direct_out = (ow == F411_UW && oh == F411_UH && + int direct_out = sw_direct && (ow == F411_UW && oh == F411_UH && (out_usage & VK_IMAGE_USAGE_STORAGE_BIT) != 0u && f411_fmt_storage_ok(out_fmt) && frame->output.subrect_x == 0u && frame->output.subrect_y == 0u); @@ -1257,7 +1268,7 @@ int wl_fsr411_full_gpu_dispatch(WlFsr411FullGpu *p, VkCommandBuffer cb, int have_ext_exp = !force_auto_exp && (exp_img != VK_NULL_HANDLE && exp_fmt != VK_FORMAT_UNDEFINED); int is_hdr = (frame->flags & WLFSR4_FLAG_HDR) != 0u; int has_custom_pe = (isfinite(frame->pre_exposure) && frame->pre_exposure > 1e-4f && fabsf(frame->pre_exposure - 1.0f) > 1e-3f); - int run_spd = force_auto_exp || !(have_ext_exp || !is_hdr || has_custom_pe); + int run_spd = sw_spd && (force_auto_exp || !(have_ext_exp || !is_hdr || has_custom_pe)); F411Consts k; memset(&k, 0, sizeof k);