Skip to content

Ray Reconstruction: slow first start while the kernels compile on a cold driver cache #35

Open

Description

@phantoslayer21

On the first start, before the driver's shader cache holds Ray Reconstruction's kernels, the frames pass through
undenoised until every kernel of the default frame is ready, which looks like heavy speckle. Discussion #10 reports one
kernel (resolve.fixup) taking minutes through RADV under Proton; later starts are fast. To look at: which kernels take
longest on a cold cache (Windows driver and RADV), whether they can be split or simplified with the same output bits,
and whether the launcher or overlay should say more clearly that Ray Reconstruction is still preparing.

Related: Discussion #10

Activity

  1. added this to the Later milestone on Nov 13, 2026
  2. j0nsh1n commented on Nov 13, 2026

    @j0nsh1n
    Contributor

    Here's what I found on the Linux side.

    Why resolve.fixup takes minutes under Proton: it isn't RADV's compile. It's an old part of dxil-spirv, its control-flow structurizer, which every current Proton ships. dxil-spirv rewrote it upstream in commit 71967a38. With dxil-spirv's command-line tool and #362's commits, resolve.fixup took 124 s at the commit just before the rewrite and 0.44 s at the rewrite.

    vkd3d-proton's own main (5b1089c8) already includes the rewrite. With that build plus #362, the whole cold RR preparation took about 14 s instead of about 2 minutes: 11.3 s preparing, of which resolve.fixup took 6.2 s (that rest is now vkd3d-proton plus RADV). I measured it with the launcher's preparing helper under Wine on empty caches, not in the game. So on Linux the fix comes with a newer Proton, and the kernel itself doesn't need to change for this. None of the 19 Proton versions I checked has the rewrite yet.

    A related launcher point: under Proton the launcher's RR prepare step can't help.

    • A game's compiled kernels live in two caches: vkd3d-proton.cache in the game's working folder, and Mesa's cache in Steam's folder for the game.
    • The helper runs in the launcher's own Wine prefix, so it fills neither.
    • On copies of a game's caches (compiled kernels only, no model data), a start with only one of the two took the full time again. With both, it took under 30 ms.

    I'd suggest that under Wine the launcher treats every game as one that prepares RR at its first start: RrKernelsInGame returns true, the game's page says so, and PrepareRr returns without running the helper. That fits this issue's "say more clearly that RR is still preparing".

    bool RrKernelsInGame(const wstring& exe) {
        if (UnderWine()) return true;   // the helper in the launcher's prefix fills neither of the game's caches
        ...
    }

    I tested it with wg_core_tests under GE-Proton 11-11's Wine: InGame is reported and no helper runs. The check failed with the Wine branch taken out. Not run on Windows. The change with its tests is in PR #105: commit 5094d30, which needs only 677af52 (UnderWine()).

    For your question about which kernels are slow on a cold Windows driver cache: I can't measure that here. Under RADV with the new dxil-spirv, resolve.fixup is still the longest at 6.2 s.

  3. modified the milestones: Later, 0.6.2 on Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: linuxLinux, Wine and Protonarea: ray-reconstructionRay Reconstruction runtime, plugin and kernelsperformanceSpeed of the runtime or kernels

    Projects

    • Status
      Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions