Repository navigation
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
AMD / Windows run of this PR at 1d45d6b: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release. Test suite only, no title run. Every ctest entry built from the test targets this PR changes passes (1):
AI-assisted: yes (runs made on the device above). |
12 tasks done
JJenkx
force-pushed
the
fix/cache-entry-header-lengths
branch
from
October 18, 2026 02:20
1d45d6b to
626226e
Compare
12 tasks done
CompileShaderUncached compiles one request without the process-lifetime source cache or a resource snapshot, so batch tools can compile shader archives with bounded worker lifetimes. Optional frontend and backend timings report where each compilation spent its time.
EntryKey returns the validated key stored in an encoded cache entry and IsCurrentEntryHeader checks that a file header belongs to this compiler source and format, so offline tooling can group and screen existing cache files without decoding them. Both validate against the aligned payload layout.
EntryKey and IsCurrentEntryHeader round-trip an encoded entry and reject truncated or damaged headers. CompileShaderUncached produces the same encoded entry twice without touching the disk-cache totals.
JJenkx
force-pushed
the
fix/cache-entry-header-lengths
branch
from
October 18, 2026 18:31
626226e to
36b5b8e
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Follow-up to #6296: reject an encoded cache key length before converting it to
size_tand calculating its eight-byte padded payload offset. That PR's sharedparseEntryHeadercurrently accepts a 48-byte header declaringkeyBytes = UINT64_MAX - 47when the payload length matches the file length: the offset calculation wraps to zero. Its full-entry readers then receive an invalid key span. Current main has an earlier key/body check; this regression is in the proposed #6296 refactor, not a reproduced game crash on main.Check the key against both the declared file body and the largest representable padded offset. Keep entry format, valid-entry behavior and shared validation unchanged. Reuse one alignment constant. The regression checks header-only validation,
EntryKeyandDecodeEntry, plus a header whose reported file length isUINT64_MAX, where checking only key/body fit would still let alignment wrap. No large allocation is needed.Depends on #6296, exact head
721af439c96abf6d9e061a75cb2e99eb1e8498eb. Its three commits are carried with original authorship, rebased onto main61d3d3080c372dd0b6adcf4dc13247108495d763, followed by one correction commit. After the dependency merges, retain only the correction. #6032 consumes these helpers; this does not include its archive tool.Tested
Refresh at
36b5b8e1711aa4b86e5450d23660f5eeb5cb5e32on main61d3d3080c372dd0b6adcf4dc13247108495d763: retained main's cache format 38 alongside the dependency's 48-byte header constant. The three dependency commits retain their authorship; the correction is unchanged. Release build of fulllibs,agc_shader_disk_cache_testsandshader_cache_file_read_testspasses with bundled dependencies/SPIRV-Tools. Both focused tests pass, 2/2 in 2.19 s. Conventions and whitespace checks pass. The earlier baseline/negative-control results below were recorded before this refresh. No native-title or speed claim.Arch Linux 7.2.9-arch1-1, GCC 16.2.1, Release, bundled dependencies and SPIRV-Tools enabled. Ryzen 9 7950X.
agc_shader_disk_cacheandshader_cache_file_readpass, 2/2 in 2.07 s.agc_shader_disk_cachefails immediately withan entry header with an overflowing key length is recognized.libs,agc_shader_disk_cache_testsandshader_cache_file_read_testsbuild; both focused tests pass, 2/2 in 2.08 s. Existing cache round trips, corrupt-file rejection, prebuilt-pack checks, uncached-compilation determinism and untouched disk-cache totals remain covered.python3 tools/check_conventions.py --base origin/mainandgit diff --checkpass.No native game or GPU execution test, full CTest suite, macOS test or loading/FPS improvement is claimed. This is a cache-file validation correction.
Additional contributor validation: keravyn-ops reports
agc_shader_disk_cachepassing in 3.79 s at head1d45d6ba0, on Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release, Radeon 780M (RDNA 3), AMD driver 25.10.20.01. This is a CPU cache test on that machine; no title or GPU execution coverage is established.Checklist
main; dependency is explicit