Repository navigation
fix(agc): validate mesh index descriptors on cached draws - #5791
Conversation
|
Linux check of this PR, and one note on how a mismatch is counted. Setup: Bazzite 44, GCC 16.2, Release, RX 7700 XT with RADV (Mesa 26), head
The note: in if (programs[i].binary.stage == ShaderRecompiler::ShaderStage::Mesh && !std::equal(...)) {
if (!anyLayout) outcome = EntryOutcome::Differing;
anyLayout = true;
continue;
}Your dedupe change in |
d41effb to
d1e050d
Compare
|
@YossiYad Thanks for checking this on Linux/RADV and confirming the VLC rendering fix on the RX 7700 XT. I reproduced the statistics issue and corrected it in I extended I rebased onto main AI-assisted: yes. — Codex |
|
Windows/AMD check with VLC (PPSA85300 v0.4, catalog release): Windows 11 (26300), Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), WinLibs GCC 15.2.0, Release. Relinked with
The window title reads 20.0 FPS on
Not tested: the new test against AI-assisted: yes (Claude Code) |
d1e050d to
b3e26ae
Compare
b3e26ae to
ed26cb8
Compare
|
Windows/NVIDIA check with VLC (PPSA85300 v0.4, catalog release).
No stop line in either build. With this PR alone, closing the window still exits Verdict: the missing welcome-page text and buttons are fixed on NVIDIA too, with no AGC test regressions. AI-assisted: yes (Claude Code) |
|
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.
|
|
Checked the three-line change in Built and ran the AgcDriver tests on the PR merged onto current main: all pass except |
…5791) agc_driver_mesh_index_cache aborts on the linux job (lavapipe, LLVM 20.1.2: "LLVM ERROR: Cannot emit physreg copy instruction") on every main push build since the merge (first red: 38777177302). The PR was merged on a windows-only run after a linux-red batch was split. Co-Authored-By: Claude <noreply@anthropic.com>
Revert "fix(agc): validate mesh index descriptors on cached draws" (#5791)
|
Reverted by #6552: |
fix(agc): zero the pending key store block, reapply #5791 with an llvmpipe skip
relocateDrawEntry copied a cached variant field by field and left out meshIndexDescriptor, which the variant gained in #5791 before #4943 merged. lookupDraw compares a mesh stage's descriptor with the draw's index buffer words before validating anything else, and no draw has an all-zero one, so every relocated mesh-path stage was refused as a differing front stage. With no hits the shader set's relocation trial stopped admitting new aliases too. The copy now takes the donor's descriptor, so a relocated mesh stage matches the same index buffer the donor was built for and misses on any other. agc_driver_mesh_draw_relocation draws a mesh-path triangle whose vertex buffer descriptor is loaded through a user-data pointer, at eight addresses with the same contents: the last four now hit the cached draw (before: four differing front stages, no hit). AI-assisted: yes


What
Fixes the missing logo, text and language buttons in VLC PPSA85300 v0.4 (#5731, bring-up #5732). NGG draws can share register and SRT state while their
DRAW_INDEX_2packets select different index ranges. The generated index descriptor is absent from the register key and captured SRT memory, so a cache hit can retain the previous draw's index buffer descriptor.Retain its four words with each mesh stage variant, require them to match before reuse, and include them in variant deduplication. A matching push offset with a different descriptor counts as a differing front stage. The regression checks rendered pixels, count and address changes, miss classification, reuse of each changed descriptor, and return to an earlier descriptor. It shares the existing NGG fixture with the mesh test.
The metadata field and capture sit beside the compiled result, keeping the insertions separate from the relocation fields in #4943 and #5609. Neither PR implements this correction; both merge cleanly with this branch.
Tested
Current head
ed26cb81a, based on maina453108cf. Windows 11 Pro 10.0.26300, WinLibs GCC 15.2.0, NVIDIA GeForce RTX 4070 Ti SUPER, driver 32.0.16.1714 / NVIDIA 617.14.agc_shader_memory,agc_driver_mesh,agc_driver_mesh_index_cache,agc_driver_draw_cache_reuse,agc_driver_draw_cache_reuse_off, andagc_driver_prepared_graphics.84b01f9cd, removing the descriptor match makes it fail at the rendered-pixel assertion when the index count grows from 3 to 6; restoring the match passes again. The subsequent rebase adds only the independent Voice reset-port change.8260e3c44, then 60 s on the final rebased head. I checked the original BMP pixels and enlarged crops. All 129 runtime library copies were hash-verified; the final driver contains no temporary diagnostic flags. This validates the welcome page; media playback and input beyond it were not tested.--windows --registry --windows-fixed-base 0x400000and its bundled libc. Executable ELF SHA-256:eec51934aa2debed99152c3996f39a41be25e17d9ca14de01cee2d17b62d8e3f; the unwrapped payload segments were independently verified.git merge-treesucceeds with perf(agc): find cached draws across moved user-data pointers #49431c72efdc9and perf(agc): reuse cached draw stages when only buffer base addresses moved #5609d6abd5555. Earlier combined-tree validation with their changes passed eight focused tests on maincaee23fd9; that tree was not pushed.Correction to the earlier draft note: I misread the full-frame previews when reporting that the lower three rows were missing. The original BMP files contain all four rows and their labels, including the normal-cache runs. The clean runs above confirm that result; no speculative cache changes or diagnostic code are included.
External validation of earlier rendering-fix heads:
d41effbacon main23be5a02b. The mesh-index and draw-cache reuse cases passed three repetitions; the 48 s VLC run showed all 16 buttons and hints. The Linux conversion used feat(relinker): load Linux executables at a fixed base #4593 for its fixed base. I did not run Linux locally.d1e050d4con main9a3e2ac4d. Both 60 s runs showed the complete welcome page; the mesh and mesh-index cases passed three repetitions. These results are for the stated earlier heads.Window closure still aborts on this rendering branch (
0xc0000409), as in the main control and external Windows runs. That separate fix is in #5843, which depends on #5236. Full Linux/Windows runtime CI requires a write-access collaborator to dispatch it under repository policy.Checklist
main; no other open PR implements the same functionsd41effbac; AMD Radeon 860M, driver 32.0.13058.8001, Windows 11 26300 atd1e050d4c