Skip to content

vk_pipeline_check: match the runtime's device so its cache hits on AMD, with a test (RT-575) - #7501

Open
sennecools wants to merge 2 commits into
ItsNotRexed:mainfrom
sennecools:pipeline-check-device-features
Open

sennecools wants to merge 2 commits into
ItsNotRexed:mainfrom
sennecools:pipeline-check-device-features

Conversation

@sennecools

@sennecools sennecools commented Nov 23, 2026 •

Copy link
Copy Markdown

Claimed in the coordination issue as: RT-575 (claim)

Depends on: #7474. Please merge #7474 first: without its maintenance8 change the new pipeline_cache_seed test fails (it does not skip) on NVIDIA, confirmed by testers on an RTX 3080 Ti, 4060 and 5070 Ti; with both it passes there. On AMD this PR alone is enough. The two apply together cleanly.

What and why

The runtime seeds its pipeline cache from the file vk_pipeline_check saves, but on AMD the seed never hits. Measured on an RX 9070 XT with one synthetic compute shader:

  • robustBufferAccess, scalarBlockLayout and robustImageAccess are each part of the driver's cache key. The checker enabled them; the runtime does not. The checker now leaves them off.
  • New ctest pipeline_cache_seed: the checker writes a cache, then the same pipeline is created on the runtime's device from it and has to report an application-cache hit. It is skipped where the driver reports no hits at all.
  • The executable's file name is in the key as well (its folder is not). The test holds it equal and docs/pipeline_check.md records it. The pipelines stage still writes as vk_pipeline_check.exe; the follow-up for that is make_game: on Windows the pipelines stage runs the checker under the runtime's file name, so its cache hits on AMD #7538.

Tested

Windows 11, MSVC (VS 2022 Build Tools), RX 9070 XT (driver 32.0.32029.2010) and the Radeon gfx1036 iGPU.

AI-assisted: yes

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (no translator rule here)

…cache can hit

On an RX 9070 XT (driver 32.0.32029.2010) robustBufferAccess, scalarBlockLayout
and robustImageAccess are each part of the driver's pipeline cache key. The
runtime's device enables none of them, so the checker's no longer does.

New ctest pipeline_cache_seed: the checker compiles one synthetic compute
shader, then the same pipeline is created on the runtime's device from the
saved cache and the creation feedback has to report a hit.

AI-assisted.
@thehollowedone

Copy link
Copy Markdown

Independent Windows NVIDIA check of c8a102d0, with and without the #7474 checker patch. RTX 3080 Ti, driver 621.35, MSVC 19.44, Vulkan SDK 1.4.363.0.

I rebuilt only the checker for the second run. Both runs used the same shader, runtime test executable and matching executable filenames, with a fresh cache file each time. Vulkan core and synchronization validation reported zero diagnostics in both runs. Synthetic inputs only. AI-assisted.

@ciagnij

ciagnij commented Nov 23, 2026

Copy link
Copy Markdown

Independent native Windows check of #7501 c8a102d0 and #7474 acc4812c2, each applied to upstream 6457efc74. I kept the same pipeline_cache_seed_test runtime and fixture in all four rows and rebuilt only vk_pipeline_check for each checker variant. Windows 11 build 26300, MSVC 19.44 / Windows SDK 10.0.26100, Vulkan Headers 1.4.363.

Checker build AMD Radeon 1002:13c0 (26.1.1) RTX 5070 Ti (621.14)
main miss miss
main + #7474 miss hit
main + #7501 hit miss
main + both hit hit

All eight runs returned decisive results via application-cache feedback, with no skips. This independently confirms the NVIDIA dependency and provides a second AMD driver check.

One build issue from a fresh targeted build: pipeline_cache_seed_test builds without its SPIR-V or the checker executable. A normal full build happens to build both. Commit 19372b10 makes the target pull in both through CMake dependencies, with one shader generation rule shared by the two consumers. From a fresh build directory, building only pipeline_cache_seed_test produced all three artifacts and ctest -R '^pipeline_cache_seed$' passed on both GPUs.

The older counted dispatch shader still reproduces #6162 in its own CTest. I also tried the s4:s5 fixture from #7133 4436e8ce with these cache changes. Both pipeline_cache_seed and d3d12_indirect_dispatch_count then passed on both adapters. The published integration branch contains the tested two-PR stack and the standalone build fix. All fixtures were synthetic.

@boboman-188

Copy link
Copy Markdown

Tested c8a102d0c on a Radeon RX 6700 XT (RDNA2), AMD driver 26.11.2, Windows 11 build 26300.9974, MSVC 19.51 and Ninja RelWithDebInfo.

I used the same synthetic shader and pipeline_cache_seed_test executable for both checker builds. The parent checker (0433058a1) missed 3/3 times. The runtime hit its own cache in all three control runs, so these were confirmed misses. The PR checker produced a driver-reported application-cache hit 3/3 times. The registered pipeline_cache_seed CTest also passed.

Synthetic fixture only. AI-assisted testing.

@chrisx599

Copy link
Copy Markdown

Independent Windows AMD verification of #7501 at c8a102d0 on a Radeon RX 6750 GRE 10GB (RDNA2). AMD 26.11.2 (Windows driver 32.0.21045.29003), Vulkan 1.4.315, Windows 11 25H2 (26200.9974), MSVC 19.44.35230, Windows SDK 10.0.26100, Vulkan-Headers 1.4.363 and glslang 16.6.0.

I ran the PR's pipeline_cache_seed CTest twice per checker variant. Every run used the same runtime test executable, synthetic compute shader and matching executable basenames. I rebuilt only the checker between rows and started each run with a fresh application cache. Implicit Vulkan layers were disabled.

Checker build Application cache hits
PR parent 0433058a1 0/2
Parent + #7474 (acc4812c2) 0/2
#7501 (c8a102d0) 2/2
#7501 + #7474 2/2

The runtime hit its own cache in all four miss cases, so those tests failed with a confirmed miss.

I also reproduced the executable basename effect using the combined checker build. With identical checker bytes, the same directory and the same cache path, pipeline_cache_seed_test.exe hit 2/2 and vk_pipeline_check.exe missed 2/2. Each run generated a fresh cache from the same synthetic input. AI-assisted with Codex.

@Valentinlqx

Copy link
Copy Markdown

Tested c8a102d0c on NVIDIA GeForce RTX 4060 (Ada), driver 617.14, subgroup 32..32, Windows 11 Pro 26200. Merged clean onto main acccd0f1e. MSVC 19.44, Vulkan SDK 1.4.363.0, RelWithDebInfo. No game files. AI-assisted (Claude Code).

This confirms the "Depends on: #7474" note for NVIDIA:

Details: #7474 (comment)

@sennecools

Copy link
Copy Markdown
Author

@ciagnij thank you, that build issue is real and I had missed it because I always did a full build. I cherry-picked your 19372b10 with your authorship; the head is now ffeb250ff (one file, runtime/CMakeLists.txt, +4 −2).

Checked here in two fresh build folders, building only --target pipeline_cache_seed_test:

before (c8a102d0c) after (ffeb250ff)
vk_pipeline_check.exe built no yes
shader .spv built no yes
ctest -R ^pipeline_cache_seed$ fails in the script (shader missing) passes on the RX 9070 XT and the gfx1036

d3d12_indirect_dispatch_count_test, whose sources the commit also touches, still builds, and its ctest fails with the same message as on main.

@Valentinlqx @thehollowedone thanks for the NVIDIA runs; the description now says plainly that #7474 has to merge first. AI-assisted.

@chrisx599

Copy link
Copy Markdown

Follow-up to my earlier RX 6750 GRE check. Tested the exact #7501 head ffeb250ff on a Radeon RX 6750 GRE 10GB, AMD 26.11.2 (Windows driver 32.0.21045.29003), Vulkan 1.4.315, Windows 11 25H2 (26200.9974), MSVC 19.44.35230, Windows SDK 10.0.26100, Vulkan-Headers 1.4.363 and glslang 16.6.0.

I configured an empty Ninja Release build directory. After configure all three artifacts were absent. I requested only cmake --build <build> --target pipeline_cache_seed_test --parallel 6. That command generated vk_pipeline_check.exe, generated/cs_indirect_dispatch_count.spv and pipeline_cache_seed_test.exe automatically.

ctest --test-dir <build> -R '^pipeline_cache_seed$' -V passed 2/2, with Vulkan application-cache feedback confirming a hit on the RX 6750 GRE in both runs. Each run used a fresh application cache. Implicit Vulkan layers were disabled. Synthetic input only. AI-assisted with Codex.

@zsigisti

Copy link
Copy Markdown

Tested ffeb250ff on NVIDIA GeForce RTX 5070 (Blackwell, subgroup 32..32), NVIDIA 615.78.08, Vulkan 1.4.351, Arch Linux (kernel 7.3.0-cachyos), GCC 16.2.1, CMake 4.4.5, llvm-mc 23.1.4, Python 3.14.8: pass, no regression.

pipeline_cache_seed is Windows-only (MSVC flags in its CMake block), so it isn't built on Linux; this run only shows the PR builds and doesn't change anything on NVIDIA Linux. It still needs an AMD/Windows check for the cache-hit part.

No game files. AI-assisted (Claude).

@TheoGegout

Copy link
Copy Markdown

Tested ffeb250ff merged onto main 867d922f0 (merge 86133bc83) on AMD Radeon RX 6800 XT (RDNA2, Navi 21), AMD proprietary driver 26.10.1 (Vulkan 1.4.315), Windows 11 Pro 26300: pass, no change against main.

Standalone tools built with llvm-mingw 20261117 (clang, Ninja, Release, -DLEONIDA_BUILD_WINDOWS_RUNTIME=OFF, so the MSVC-only runtime targets are not built), llvm-mc 23.1.6 (conda-forge), Vulkan SDK 1.4.341.1. Baseline: the same steps on main 867d922f0.

  • GPU: scripts/run_gpu_tests.py, full suite: 223/241 passed, 17 skipped, 1 failed (ms_wave_info_s3), identical to main, result words included.
  • ctest: 67/67 passed, including vk_pipeline_check_cli and vk_pipeline_check_stack.
  • Not covered: the new pipeline_cache_seed test links gta6rt_d3d12_com and is only configured with the MSVC runtime, so this run did not build it. This is a regression check of the checker change only, not a check of the cache hit on RDNA2.

The one GPU failure is on main too, not caused by this PR: ms_wave_info_s3 fails intermittently on this GPU (#6172, SHADER-766).

AI-assisted (Claude Code).

@matheusfermiano-source

Copy link
Copy Markdown

Tested ffeb250ff (the PR's diff applied on main 867d922f0), full python -I scripts/run_gpu_tests.py on both GPUs of one laptop, each compared with main on the same machine, CachyOS Linux: pass.

This PR changes runtime/ C++, so runtime/ was built from the PR's own tree for these runs: ctest: 100% tests passed out of 64 (main: 64/64).

GPU Driver main this PR Difference
AMD Radeon 660M (RDNA2 iGPU, gfx1035, Ryzen 5 7535HS), subgroup 32..64 RADV, Mesa 26.3.1 225/241 passed, 16 skipped 225/241 passed, 16 skipped same results as main
NVIDIA GeForce RTX 3050 Laptop (Ampere), subgroup 32 NVIDIA 620.73.04 192/241 passed, 48 skipped 192/241 passed, 48 skipped fails on main too: ms_wave_info_s3 (#6172)

No game files. AI-assisted (Claude Code).

@rideinstead

Copy link
Copy Markdown

✅ Automated security review: CLEAN (commit ffeb250f)

  • No findings.

Scope: static analysis of added diff lines only; no code was executed. Please review findings manually.

@edubox

edubox commented Nov 23, 2026

Copy link
Copy Markdown

Tested ffeb250ff on Linux x86_64 with the two GPUs here, using the PR's Windows pipeline_cache_seed_test through clang-cl 23.1.5 + xwin SDK 10.0.26100 + Wine 11.22:

cache written by RTX 4080 SUPER (620.73.04) gfx1036 RADV (Mesa 26.2.6)
main 867d922f checker miss, FAIL hit
this PR alone miss, FAIL hit
this PR + #7474 (2029116f) hit hit

The NVIDIA failure is the one described: "vk_pipeline_check's device differs from the runtime's in something the driver makes part of a pipeline's cache key", so the description's "merge #7474 first" is right on Linux too. With both applied the checker reports 1 ok, 0 failed, 0 skipped and the runtime's device reports the application-cache hit on both GPUs.

For RADV the interesting bit is that main's checker already hits: Mesa does not put robustBufferAccess / scalarBlockLayout / robustImageAccess in the cache key, so this part of the change is a no-op there (the Windows AMD driver remains the only place it was measured). No regression on Mesa in any case.

Small environment note: ctest -R '^pipeline_cache_seed$' does not work under Wine here because check_pipeline_cache_seed.cmake passes Unix paths to the .exe (the checker dies before printing). Running the script's two commands by hand with Z:\... paths works, which is what the table above does.

Synthetic shader only, no game data. AI-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.