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.
|
|
I ran this on Linux with the official SPIRV-Tools pin and the full test suite, the two things your Tested section lists as not covered. Setup: head The one failure, With SPIRV-Tools OFF (the CMake default), full I did not test Windows. Written with AI assistance (Claude Code). I ran the builds and tests above on my machine. |
What
A raw shader read behind a queued write to the same code can return the old program. Queue-0 draw commits now run through
DrawPipeline, butReadRawShaderonly flushes work already recorded by the GPU recorder. A pending pipeline commit is not yet visible to that flush. Both a cached-code comparison and a first-time code read can therefore get ahead of the write.Drain overlapping queued writes before comparing a cached raw snapshot and before reading each new code span. The drain runs outside the raw-shader cache mutex. Reads outside the queue-0 pipeline, and reads with no overlapping pending write, retain the existing path. No shader instruction semantics, registration policy, or cache format changes.
The CPU-only
agc_driver_queued_raw_shaderregression exercises cached and fresh reads through the real pipeline committer and guest-memory write path. The queued writer waits until the read returns or its bounded delay expires; the read must observe the replacement program. The cases also run separately asagc_driver_queued_raw_shader_tests cachedand... fresh. No PS5 assets or GPU are required by this regression.This is independent of #6188 and needs no commits from it. #5751 changes registration/range bookkeeping in the same source file; this PR changes ordering of code reads and does not replace that work.
Tested
Based on main
341613ab62b979e429daa1be5ac2fe524a737df6, public head6cd8b7240. Linux x86-64 GCC Release, renderer SPIRV-Tools enabled: full runtime libraries and all selected executables build. All 10 selected CTest cases pass without skips on both Radeon RX 6650 XT / RADV Mesa 26.2.4 and lavapipe (6.47 s / 6.58 s). Besides the new CPU regression, these cover draw-cache reuse with GPL on/off, validation and inline modes, draw-write ranges, pipelined DMA/fills and predication. Conventions and whitespace pass.Negative controls replace only
ShaderRegistry.cppwith main's version. Both selectors exit 1 withcached raw shader read ignored a queued write to its code/fresh raw shader read ignored a queued write to its code. The executable SHA-256 stays4f87301733885662f3e6422eb053b95aab8d53372269a63dcb1c18a6f4189bbdthrough these controls and the restored-source build. The fix is restored and the full libraries rebuilt before the final passing tests.The local validation tree differs from the public head only by a private SPIRV-Tools teardown-repair gitlink, excluded from this PR. These local results do not independently validate the official dependency pin. Contributor-reported official-pin and full-suite results are recorded below; Windows validation remains pending. No title unblock or FPS improvement is claimed.
Contributor-reported validation by Dextroid17: head
6cd8b7240cleanly merged onto main84b0d2f24, CachyOS Linux 7.2.9, GCC 16.2.1, Release, lavapipe,ANYPS5_REQUIRE_VULKAN=1,ctest -j16.7f2d9ee92, cached and fresh selectors each pass 25/25 with this fix and fail 25/25 with onlyShaderRegistry.cpprestored from main; restoring the fix and rebuilding passes another 25/25 each.agc_compute_pipeline_replayfails withreplay did not export a pipeline cache header; the contributor reproduces that failure with main'sShaderRegistry.cppas well. These are not all-green full-suite results.ShaderRegistry.cpp. Conventions pass on the merged tree.These results were reported by the contributor, whose testing was AI-assisted with Claude Code; they were not reproduced locally. No Windows testing was reported.
Checklist
main; no other open PR implements the same ordering fix