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.
This commit is contained in:
The412Banner committed 2026-12-04 20:12:24 -05:00
1 parent 83de9e38b4
commit 85bfb69306
1 file changed
+13 -2
+13 -2
View File
@@ -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);