Repository navigation
fix(agc): size a moved read-only buffer at the render target as its build does - #9050
Merged
oneandonlydean merged 1 commit intoOct 27, 2026
Conversation
…uild does Since boykopovar#8224, a read-only strided buffer that starts below the render target and runs less than one stride into it is bound only up to the target, and the cached build keeps that size. MovedReadOnlyBuffers compared it with the descriptor's whole size, so a hit with the same words took the buffer as moved and rebound all of it, over the render target. MovedReadOnlyBuffers takes the draw's target and cuts a read-only buffer as the build does. The cut lives in ShaderResources::BytesUpToTarget, which addGuestBuffer, CheckBufferAliases and MovedReadOnlyBuffers call; a buffer that runs a whole stride or more into the target is not cut and still fails the alias checks. agc_driver_graphics checks a cached build whose read-only stride-60, 4-record buffer runs 8 bytes into the target: the same words list nothing moved, a buffer moved to run 4 bytes in is listed at 236 bytes, and one moved to run a whole stride in keeps its 240.
Merged
12 tasks done
|
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.
|
Contributor
|
NVIDIA, Windows. GeForce RTX 3080, driver 616.92, Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release,
AI-assisted: yes |
Contributor
Author
|
@gdols, thank you for the RTX 3080 run and the revert check. It's now in Tested. |
12 tasks done
This was referenced Oct 27, 2026
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
A follow-up to #8224. Since #8224, a read-only strided buffer that starts below the render target and runs less than one stride into it is bound only up to the target.
addGuestBufferandCheckBufferAliasesapply that cut.ShaderResources::MovedReadOnlyBuffers, the check a cached build makes before it serves a draw, does not:So, from the code, a cached hit of the Boggle (CUSA03312) draw that #8224 fixed takes its vertex buffer as moved. This wasn't run in the title.
The change:
MovedReadOnlyBufferstakes the draw's target and cuts a read-only buffer as the build does.ShaderResources::BytesUpToTarget, whichaddGuestBuffer,CheckBufferAliasesandMovedReadOnlyBuffersall call, each with the target only for a read-only buffer, as fix(agc): bind a strided buffer's last record only up to the render target it runs into #8224's second commit does.Tested
agc_driver_graphics, after fix(agc): bind a strided buffer's last record only up to the render target it runs into #8224's alias cases: one cached build whose read-only stride-60, 4-record buffer runs 8 bytes into the render target.MovedReadOnlyBuffers' size line put back todescriptor.GetSize(), it fails in 3 of 3 runs on Linux and Windows: "a cached build whose strided buffer runs 8 bytes into the render target took it as moved for the same words and target (1 moved, the first 240 bytes)".agc_driver_graphicspasses 10 runs in a row on Linux and Windows.precise_waittiming test on Linux, which fails withmain's code too.^agc: 815 tests, 0 failed.main80565c5 (with test(agc): align the array window test's texels at run time #8310 to build) and this PR at f65fda5, withANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1.agc_driver_graphicspasses 3 of 3. With onlyMovedReadOnlyBuffers' size line put back todescriptor.GetSize(), it fails 3 of 3 with the red line above.^agc_gave 870 passed, 3 skipped and 3 failed, the same as onmain. They name the three asagc_driver_sample_order*, which they say test(agc): read the sample order tests' depth through a sampled copy #9056 fixes.python3 tools/check_conventions.py --base origin/main: passed.Checklist
main27c88a8, and merges cleanly with currentmain(2abfb1b); 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 (none added).mdfiles or images added to the repository (attach them to this PR)