fix(shader): keep NVIDIA mesh register-window writes coherent #15668
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15668"
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 boykopovar/AnyPS5. Originally posted by HenriksApsitis on 2026-11-04T01:48:26Z.
What
Mark the dedicated NVIDIA mesh vector-window storage buffer Coherent. On the RTX 5070, a relative write that changes a register followed by a relative read and later direct reads can otherwise return stale values. The existing fixture writes the original value back, so it does not catch this case.
Add agc_driver_mesh_vector_window_writes, which changes each relatively addressed value, rereads it, and checks the directly addressed window registers across all four wave64 waves. Preserve the original fixture as the default mode. This is a measured workaround limited to the existing NVIDIA mesh-buffer path, not a change to guest instruction semantics; the responsible driver transformation is not isolated.
This follows the mesh-buffer path introduced by #12233, but does not claim to fix or unblock a retail title. No proprietary inputs were used.
Tested
CachyOS Linux, kernel 7.3.1-1-cachyos, GCC 16.2.1, CMake 4.4.5, SPIRV-Tools enabled. Full-runtime Release configuration; the five relevant execution-test targets and their runtime dependencies built on both revisions.
Base:
1c8c0efc8c41314402e6966da5bef6ea3d639d10. Original renderer-qualified head:af4bd5cf7c9b0bdd53ba31cb4ea19e680dec0a39. The baseline is a separate main worktree with only the new test fixture/CTest registration overlaid, without the production decoration. Its source-built third-party dependencies point to the same checkouts as the candidate; all 26 submodule pins were verified against main.Every run selected the named physical device and loaded VK_LAYER_KHRONOS_validation, with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1. No skipped tests, VUIDs, synchronization hazards, or validation errors were found in either side. NVIDIA driver disk caching was disabled and all caches/TMPDIR were task-owned. The longest observed CTest was 1.72 seconds; CI/lavapipe timing is not claimed.
The unchanged-main regression reports:
The candidate reports:
Focused command on each build, with the environment above:
PATTERN is
^agc_driver_(mesh_vector_window_(waves|writes)|relative_indexing|vector_window_(direct_access|liveness|narrowing))$. Main used --repeat until-pass:3, so the failing new case ran three times; candidate used --repeat until-fail:3. The AMD control selects only the new regression with --repeat until-fail:3.python3 tools/check_conventions.py --base origin/main and git diff --check passed. A prior independent review approved the exact patch; its full-index patch SHA256 remains ff4c1abd6e37a593bb8036013048a30abfbc8f7a18aa46c6681cdf6e67525792 after rebasing.
The full tools/pr_overlap.py gate examined 1831 open PRs and exited 2 because 34 existing PR branches conflict with main in shared files. This is NOT a clean automatic-overlap result. Every reported branch was manually compared at its fetched head against its merge base: none changes the mesh-window buffer annotation, this regression fixture, or this debt entry. The helper-file changes concern integer fragment outputs, descriptor heaps, mesh-as-compute inputs, depth-bounds push data, parameter deduplication, and image modes; debt-file changes are unrelated entries or whitespace. No dependency was identified.
No retail title, Windows, other NVIDIA driver, performance improvement, or full CI-suite result is claimed. Full Linux/Windows PR builds still require a write-access collaborator to dispatch the upstream workflow.
Windows CI dependency update
The sole Windows failure on the original head was
avplayer_http_patched_modules: its CMake wrapper was selected through a guest-client argument, but the host-only owner executable had not been built. This is the existing bug fixed by JJenkx's #15375, not a shader or native Windows compile failure.Integration head:
af7bcf8f98ade011d4cd025fe1a930fe5fd793e3. This head preserves #15375's original commits through a dependency merge. The NVIDIA shader, regression fixture and debt files are unchanged from the previously qualified renderer head. This PR now depends on #15375; no competing wrapper-owner implementation was added.Verified on CachyOS under
/home/hermes:.exewrapper arguments reproduces the missing-ownerCOPY_FILEfailure with the original runner. With the dependency, the owner and its dependencies are built and all three CTests execute and pass. These fixture binaries are native Linux ELF files, not a claim of native Windows execution.avplayer_http_patched_modulesexecutable builds and its HTTP closure test passes 3/3.Windows CI on integration head
af7bcf8f98ade011d4cd025fe1a930fe5fd793e3has now passed: Windows job. All latest checks that ran on this head passed; Linux, register-context, edge-watch and write-watch were skipped and are not claimed as executed. The original failed Windows run remains recorded separately.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)