From 715070e267fe20998b26d1a8eeb89d907c0b4b2c Mon Sep 17 00:00:00 2001 From: itaskaev2 <165683571+itaskaev2@users.noreply.github.com> Date: Thu, 19 Nov 2026 13:42:45 +0100 Subject: [PATCH] The DLSS scaling draw is found again after translator patch 0017 (#1291) Patch 0017 adds two support buffer fields, which every translated shader declares, so the SPIR-V hash of the game's FXAA shader changed (0x5c43ae18948d52cb to 0xde20aef90fea4ce6, with zero_locals 0xaad42238801d31d8 to 0x755964e8dce7f34d). vk_dlaa_skip_draw then no longer skipped the scaling draw DLSS replaces, and on 1.4.3 that draw, sampling DLSS's output-sized picture in place of the scene, stretched the picture's top left over the whole screen in every DLSS mode but dlaa. FXAA_FS gets the two new hashes. Co-Authored-By: Claude Opus 5.5 --- runtime/vk_dlaa.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/runtime/vk_dlaa.c b/runtime/vk_dlaa.c index ecca3058..c24104a9 100644 --- a/runtime/vk_dlaa.c +++ b/runtime/vk_dlaa.c @@ -1609,11 +1609,14 @@ void vk_dlaa_frame(void) { // is always drawn, whatever fxaa says (skipping it would leave the 3D picture out), unless DLSS already wrote that // target this frame. // The stock translator's hash, the one with tools/xlate patch 0010 (PCSS, PR #89) applied, the one with patches 0010 -// and 0011 (the shadow filter spread) applied, and that one with the zero_locals job flag (Mesa, vk_caps.c). -// A scaling draw this list misses still scales DLSS's picture, not -// the jittered scene: after DLSS ran, passes larger than the light target sample DLSS's output (vk_dlaa_swap_img). +// and 0011 (the shadow filter spread) applied, and that one with the zero_locals job flag (Mesa, vk_caps.c). Patch 0017 +// (soft shadows per cascade) adds two support buffer fields, which every translated shader declares, so the last two +// change with it: the two after them. A scaling draw this list misses still scales DLSS's picture, not the jittered +// scene: after DLSS ran, passes larger than the light target sample DLSS's output (vk_dlaa_swap_img). That draw then +// scales an output-sized picture as if it were the scene, and the screen shows the scene's share of it, the top left, +// stretched over the whole screen. static const uint64_t FXAA_FS[] = {0xf450003ebeb3dc52ull, 0x0a12f4bc2a9a4fbeull, 0x5c43ae18948d52cbull, - 0xaad42238801d31d8ull}; + 0xaad42238801d31d8ull, 0xde20aef90fea4ce6ull, 0x755964e8dce7f34dull}; // Chunks of one submission look shaders up side by side: an entry's hash is stored before its shader, and entries are // added under the lock.