d3d12: stamp compute journal files with the writing build and device-create config; precompile re-checks other writers' files (RT-PIPELINE-JOURNAL-BUILD-ID) #2511
Closed
Tyrannys wants to merge 2 commits from
upstream-pr/2511 into main
pull from: upstream-pr/2511
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
ProjectLeonida/mandy!2511
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2511"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by Tyrannys on 2026-11-27T22:22:03Z.
Claimed in the coordination issue as: RT-PIPELINE-JOURNAL-BUILD-ID (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7229115885)
What and why
From @enlight3d's finding in #1608 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7228721095). Thanks for the measurements.
On NVIDIA 621.40, a compute journal file in
pipeline_cache.dwas measured giving cache hits mostly to the gta6rt build that wrote it. The runtime checks only the blob header (vendor, device, pipeline-cache UUID).gta6rt --precompile-pipelinesskipped any file whose header matched as "journaled already". So after a rebuild it could report a complete journal that the new binary got few hits from.What our code gives the driver. Nothing in it changes from one build to the next:
VkApplicationInfohas only the namegta6rtand API 1.3, with no application or engine version.So there was no per-build input to make stable.
Measured here. A standalone Vulkan program, RTX 4070 SUPER, driver 621.01:
VkPipelineCacheblob written by one executable gave a cache hit (creation feedbackAPPLICATION_PIPELINE_CACHE_HIT, 3-75 ms instead of 2.6-22 s) to all of these:robustBufferAccessorshaderInt64enabled on the device.%LOCALAPPDATA%\NVIDIA\GLCache) did key on the executable. A renamed byte-identical copy got a file of its own there and compiled again (4.7 s) when given an emptyVkPipelineCache.So this driver did not show the effect. What the driver keys on in enlight3d's case is still open. Their same-binary drop (all compute pipelines from the journal at 20:16, 22 at 21:45) also points at something besides the binary.
Device-create config (second commit). A boot A/B on the same RTX 4070 SUPER (621.01), counts only:
LEONIDA_DEVICE_FAULT, boot withLEONIDA_DEVICE_FAULT=1: 10 compiled, 0 from the journal;The NVIDIA diagnostics config (
=1, orLEONIDA_AFTERMATH=1) already names its pipelines apart (since #2098), so such a boot simply had no file for those pipelines, and nothing said why.Change. Whatever the cause, the precompiler should not count a file as done without knowing the driver takes it for this binary.
Stamp (
pipeline_cache_journal.h). Each journal file now starts with 16 bytes:LPJ1and the stamp's size;file_build, computed once per process).read_entry_fileremoves the stamp before the blob goes to the driver.check_entry/entry_usableread the stamp and blob header. The newentry_currentis true only for a file this build wrote. A file without a stamp (an older runtime) is read as before and counts as from another build. An older runtime reading a new file sees a header it does not know and rebuilds that file.Precompile (
d3d12_vulkan_device.cpp). Withskip_journaled, onlyentry_currentfiles are skipped. A file from another build is built against, as at a dispatch:restamp_hits), so the next run skips it;After the existing
done:line (unchanged, so the existingcheck_precompile_skip_listpatterns still match), a second line follows when there were any:N journal file(s) from another gta6rt build or without a build stamp: H still found by the driver (now stamped as this build's), C compiled again.Runtime. The journal's "so far" line also gives
from another build: N, M of them found. A boot after a rebuild then shows directly whether that driver still takes another build's files. The runtime does not restamp, so files from another build keep counting until the precompiler runs.LEONIDA_PIPELINE_JOURNAL_BUILD=<hex>replaces the executable's hash. It is for tests: a second build without a second binary.docs/d3d12_vulkan.mdanddocs/running.mddescribe the stamp and say to run the precompiler again after a rebuild.Device-create config in the stamp (second commit). The stamp grows to 24 bytes: the build, then
device_create_configof theVkDeviceCreateInfo(newsrc/vulkan_device_config.h): the enabled extensions in any order,pEnabledFeatures, and eachpNextstructure by type, with the contents of the core 1.1/1.2/1.3 feature structures, robustness2, device fault and the diagnostics config (features and create info with its flags).entry_currentneeds both to match. A file this build wrote under another config (for exampleLEONIDA_DEVICE_FAULT=2, which adds fault info and checkpoints but keeps the names) is built against again and restamped on a hit, and counted apart from other builds:[precompile] N journal file(s) from this build under another device config (...): H still found by the driver (now stamped with this config), C compiled again, andfrom another device config: N, M of them foundin the runtime's line.The other diagnostics setting. Each build also names the file under the other diagnostics config setting. When the pipeline has no file but that one exists, it is reported once at boot (
<entry> has a journal file only for a device without NVIDIA's diagnostics config ...; run gta6rt --precompile-pipelines with this boot's setting), counted in the runtime's line (only under the other diagnostics config setting: N), and in a closing line of the precompiler (N entries had a journal file only for a device without NVIDIA's diagnostics config: built for this setting).Unchanged: the compile helper's readiness checks and the compile server's idle fill still use
entry_usable(any build). The helper is the same executable as the game, so its files carry the game's stamp.Overlap: #2198 (
--precompile-pipelines --verify), #2179 and #2228 (journal rewrite and stale-file probe), #2307 (pipeline_cache_journal.hguards) and #2392 (make_game pipelines via the runtime) touch the same files on other lines. #2179 matters here: on a seeded miss, NVIDIA returned the seeded data without the new pipeline, so a rewrite could keep a file that misses. With this change, such a file also gets this build's stamp. #2179 fixes the rewrite itself.Tested
Windows 11, MSVC (VS 18), RelWithDebInfo, on
main34e33d3dd. Short GPU runs only.pipeline_cache_journal_test(CPU) gainstest_stamp:entry_currentonly for the writing build, never for build 0;file_buildis the same for a copy under another name, differs for a one-byte change and for one byte fewer, and is 0 for a missing or empty file.check_precompile_skip_list.cmake(gta6rt, real device, two small synthetic modules) gains three checks:LEONIDA_PIPELINE_JOURNAL_BUILD), both files are built again, not counted as journaled already: 2 found in a cache, 0 compiled, and the new line reports 2 from another build;With
main's skip check (entry_usable) restored in this branch, the "another build" step fails on both of its patterns: the files are counted as journaled already and no other-build line is printed.Second commit:
vulkan_device_config_test(CPU): the same create info gives the same value; extension order does not matter, an added extension does; core and chained feature bits (including the last member of the 1.2 and 1.3 structures) count;LEONIDA_DEVICE_FAULT=1and=2(through the runtime'sDeviceFaultFeatures) differ from a plain device and from each other; Aftermath's extra flags count;=1on a device without the config equals=2; never 0.pipeline_cache_journal_test: the config in the stamp,other_configapart fromother_build(an unstamped file counts only as another build),entry_currentfalse for another config, a seed file's config.check_precompile_skip_list.cmakegains steps 6-9, run here (fault info, checkpoints and the diagnostics config are all on this device): withLEONIDA_DEVICE_FAULT=2, both files are reported from another device config (2 still found by the driver), then journaled already on the next run; withLEONIDA_DEVICE_FAULT=1, both are built (no file under the diagnostics names), the new line reports 2 with a file only without the config, the journal holds 4 files, and the next run counts 2 journaled already. Each step falls back to a note on a device without those extensions.entry_current, step 6 fails on both of its patterns.ctest -R "^(pipeline_cache_journal|pipeline_cache_store|pipeline_cache_file|pipeline_cache_seed|compile_helper|d3d12_compute_journal|precompile_skip_list|vulkan_device_config|vulkan_device_fault)$": 9/9 pass.scripts/check_no_game_data.py: clean.Not tested: NVIDIA 621.40 (enlight3d's driver), AMD or Intel, and a game boot with this branch (the A/B counts above are from a boot of
main). A boot after this lands, with a journal from the previous build, would show in the runtime's line how many of that build's files the driver still takes. Files written by the first commit's 16-byte stamp (never merged) read as unstamped.GPUs tested: profile M: NVIDIA GeForce RTX 4070 SUPER, 12 GB, desktop, driver 621.01, Windows 11
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T00:53:29Z.
Independently checked head
4a497c8f1on Windows 11 Pro 26200, MSVC 2022 (19.44.35230.0, RelWithDebInfo, Ninja), Vulkan SDK1.4.363.0, WSLllvm-mc 21.1.8, no game files.Local build & dual-GPU verification:
pipeline_cache_journal_test,vulkan_device_config_test, andd3d12_m4_compute_test(zero warnings in PR files).pipeline_cache_journal_test: PASS (pipeline_cache_journal_test: ok).vulkan_device_config_test: PASS (vulkan_device_config: ok).d3d12_m4_compute_test(LEONIDA_VK_VALIDATION=1): 1924/1924 words matched (error 0) on both NVIDIA GeForce RTX 5080 (616.64) and AMD Radeon(TM) Graphics (25.10.30.02), 0 validation errors.Code review notes:
LPJ1stamp (magic+ size validation, unstamped files still readable as another build, header mismatch clearingdata,check_entrybounds checks, one-time static content hash forfile_build) is clean and backwards-compatible going forward.vulkan_device_config.hproperly sorts/deduplicates enabled extensions, hashespEnabledFeatures(VkBool32fields) and listedpNextstructs from pastpNextto the last member without reading trailing padding, and caps chain traversal at 256 links.docs/running.mdnoting that an older runtime binary reading a newly stamped file will treat it as a header mismatch (harmless cache miss, no crash).VkPhysicalDeviceVulkan14Features(if present inpNext) is currently hashed by sType only, and the hash depends onpNextchain order (at worst a harmless rebuild).Overall looks clean and solid. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T10:36:55Z.
Review: APPROVED
Reviewed
4a497c8f1and tested both CPU unit tests and live Vulkan compute journal / precompile paths.Code audit:
runtime/src/vulkan_device_config.h: cleanly hashes sorted/deduplicated device extensions,pEnabledFeatures, and thepNextchain (using exact member ranges without reading trailing padding; bounded chain traversal; non-zero result).runtime/src/pipeline_cache_journal.h: 24-byteLPJ1stamp (magic,stamp_bytes, executablefile_build,device_create_config) is backward compatible with unstamped files,check_entryreads only stamp + cache header for fast precompile scans, andentry_currentproperly gates precompile skips.runtime/shims/d3d12_vulkan_device.cpp: restamping on hits from another build/config skips immutable seed files, updatesjournal_bytesatomically, and surfaces theother_diagnosticshint cleanly.Verification (Windows 11, MSVC 19.44, Ninja Release,
LEONIDA_VK_VALIDATION=1):pipeline_cache_journal_test,vulkan_device_config_test,d3d12_m4_compute_test, andgta6rt.ctest -R '^(pipeline_cache_journal|vulkan_device_config|d3d12_m4_compute|precompile_skip_list)$': 4/4 passed.python -I scripts/check_no_game_data.py: passed.GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341,
VK_LAYER_KHRONOS_validation1.4.363).AI-assisted (Antigravity, Gemini).
Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-29T01:06:35Z.
Review: COMMENTED
I reviewed head
4a497c8f1against the base code in a static audit. No builds, tests, or GPU runs were performed. I’d request changes before relying on the stamp to skip pipelines.runtime/shims/d3d12_vulkan_device.cpp:11693can make a stale entry current after a fast create with no valid feedback or after a reported miss that exports the old seeded bytes, as described in the PR. Please require a confirmed application-cache hit to promote the original bytes and materialize misses in an empty cache. The next precompile otherwise skips the file even if it still lacks the pipeline.runtime/shims/d3d12_vulkan_device.cpp:11966bypasses the entry lock when the stale file is readable. Two default precompile runs can both build and replace the same entry. Please hold the lock across the recheck and publish, and check currency again after acquiring it.runtime/src/vulkan_device_config.h:78ignores the contents of chained runtime features such asVkPhysicalDeviceShaderClockFeaturesKHR. The two clock bits can change while the extension list and chain types stay the same. Please hash the payloads of the feature structures the runtime emits.runtime/src/pipeline_cache_journal.h:270accepts a stamped file truncated to just the two headers. The write path atruntime/shims/d3d12_vulkan_device.cpp:11698can also produce files 1–24 bytes above the reader’s cap. Please align the read and write bounds and record the expected payload length.runtime/shims/d3d12_vulkan_device.cpp:23684reports a hit as restamped even if publishing failed. Please count successful publishes usingbuild.restampedand report failed attempts.runtime/shims/d3d12_vulkan_device.cpp:11910misses alternate diagnostics files written withLEONIDA_AFTERMATH_SHADER_ERRORS=1when the current boot has Aftermath disabled. Please check the supported flag variants or look them up by the base pipeline key.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T01:39:07Z.
Independently verified head
4a497c8f1bebda53091413442a76d31ff3411c97merged cleanly ontoorigin/main(5825b02ff89bca1a2d1331d982818e3dbb74d597) on Windows 11 (10.0.26200), MSVC19.44.35207(RelWithDebInfo), NVIDIA GeForce RTX 3090 (driver595.79, fault info + buffer markers/checkpoints +VK_NV_device_diagnostics_configall supported), withVK_LAYER_KHRONOS_validation1.4.363.1(LEONIDA_VK_VALIDATION=1). No game files used.Red -> Green Verification
entry_usableskip check restored inbuild_compute_pipeline):ctest -C RelWithDebInfo -R "^precompile_skip_list$": FAILED (rc=8) on bothanother build(LEONIDA_PIPELINE_JOURNAL_BUILD) anddevice fault 2(LEONIDA_DEVICE_FAULT=2) checks (2 journaled alreadyinstead of rebuilding/restamping and reporting the other-build / other-config lines).#2511merged withorigin/main5825b02ff8,LEONIDA_VK_VALIDATION=1on RTX 3090):9/9CTests Passed (15.27 s,0Khronos validation errors):pipeline_cache_file(0.58 s),pipeline_cache_store(0.06 s),pipeline_cache_journal(0.20 s),compile_helper(0.65 s),vulkan_device_fault(0.22 s),vulkan_device_config(0.05 s),d3d12_compute_journal(0.60 s),pipeline_cache_seed, andprecompile_skip_list(10.77 s) — executing all 9 end-to-end steps on RTX 3090 includingLEONIDA_PIPELINE_JOURNAL_BUILDrestamping,LEONIDA_DEVICE_FAULT=2other-config restamping, andLEONIDA_DEVICE_FAULT=1NVIDIA diagnostics-config cross-setting detection (2 entries had a journal file only for a device without NVIDIA's diagnostics config: built for this setting->2 journaled alreadyon repeat).scripts/check_no_game_data.py&18/18doc/CTest checks (test_docs_encoding.py,test_docs_repo_paths.py,test_docs_env_vars.py,test_ctest_registration.py): Passed.Important Cross-PR Interaction Catch with Open PR
#2179(RT-JOURNAL-SEEDED-REWRITE)The PR body notes
#2179touchesJournalCacheon adjacent lines, andgit merge-tree --write-treebetween#2511(4a497c8f1b) and#2179(4212cf5ab3) auto-merges cleanly (rc=0) with zero text conflicts — however, combining them as-is silently disables#2179'srestart_empty()on everyLPJ1-stamped file:#2511'sread_entry_filesetsentry.bytes = sizeto the on-disk file size (stamp_bytes (24) + blob_size, needed byJournalCache::publish()forreplace_bytes(total, file_.bytes, file.size())) and erases the 24-byteLPJ1stamp fromentry.databeforeJournalCache::create()seedsvkCreatePipelineCachewithfile_.data.size()(file_.bytes - 24).#2179'sJournalCache::restart_empty()checkssize != file_.bytesagainstvkGetPipelineCacheData(..., &size, nullptr). On an unchanged seeded miss from anLPJ1-stamped file, the driver returnssize == file_.bytes - 24, sosize != file_.bytesis alwaystrueandrestart_empty()returnsfalse.#2179as well): whichever PR lands second should storeseeded_bytes_ = file_.data.size()inJournalCache::create()and comparesize != seeded_bytes_inJournalCache::restart_empty(), keepingfile_.bytesas the on-disk stamped byte count forpublish().AI-assisted: yes
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-29T02:38:02Z.
CORRECTION to my earlier audit of
4a497c8f1: the hash records the type of every visited pNext structure, but it hashes member values only for the cases inadd_struct. My earlier wording overstated the coverage.On head
4a497c8f1bebda53091413442a76d31ff3411c97merged withmainc8bf0e7b65, two synthetic CPU controls confirmed the corresponding review findings:VkPhysicalDeviceShaderClockFeaturesKHR::shaderSubgroupClockleftdevice_create_configunchanged.entry_currentstill returned true, so a precompile scan can skip that header-only file.Windows 10, MSVC 19.29, Vulkan SDK headers 1.4.363.1, CPU only. These probes do not measure driver cache-hit behavior.
AI-assisted. Codex (GPT-6).
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T05:47:18Z.
Verified by OreoFR — NO RED (tests do not compile on main)
c8bf0e7b6+ this PR (head4a497c8f1) merged with --no-ffvulkan_device_config_testneeds the newsrc/vulkan_device_config.h, andpipeline_cache_journal_testneeds the new journal writer API (94 compile errors on main).precompile_skip_listlaunches gta6rt, so it is excluded here.vulkan_device_configandpipeline_cache_journalpass; ctest (Ninja RelWithDebInfo, all targets, gta6rt launchers excluded) in package p6 = main + #2511 (no shared files): 495 tests, new failures vs main: none (main alone: 494 tests, 5 failures: loader, xs_proxy_mock, xmem_no_write_watch, api_ref_state timeout, xbox_present; xbox_present fails in every package as on main)LEONIDA_CARGO=OFF,LEONIDA_XMA2_DECODER_LIBempty), main + this PR alone; imports vs main: 2 more functions from msvcp140.dll (std::ios_base::bad,std::basic_istream::gcount, from the stamp reader), no new DLL, no WS2_32entry_currentandcheck_entrybounds, and the restamp path. Every journal reader goes throughentry_usableorread_entry_file.AI-assisted (Claude Code, Claude Opus 5.5), run for OreoFR.
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:25:56Z.
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.Pull request closed