Repository navigation
Conversation
…recorded before them
10 tasks done
This was referenced Oct 12, 2026
|
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.
|
Contributor
Author
|
Closing in favour of #4554, see my comment there. |
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 sampled texture's DCC keys were read straight from guest memory. That read is
textureClearKeys, which sits behindTextureClearKeys,ProvedClearKeysand the sampled path ofcachedTexture. Recorded work that has not run yet can still write those keys: a title's clear or decompress kernel, or a copy or fill over the key range. A texture sampled later in the same batch then decided its content (clear-code fill or "read as stored") from the keys as they were before that work.textureClearKeysnow reads the keys throughcurrentDccKeys, as render targets already do throughCurrentDccKeys. Under the GPU lock, a key range with a recorded writer is answered in one of two ways:PendingStoreKeys);Recorder::SyncThrough).pendingKeyStoreTestsrecords avkCmdFillBufferthat writes 0001 clear keys (0x40) over a texture's key range, and notes it as a pending write.TextureClearKeysmust then answerClear0001and leave no pending writer. Onmainit answersClear0000from the stale bytes ("a sampled texture read its DCC keys before the recorded GPU write over them landed").pendingKeyStoreTestshad no ctest entry, so it now runs alone asagc_pending_key_stores(--pending-key-stores-only), like the other recorder tests.Related: #1359 (open) makes direct consumers wait for copied writes whose CPU write-back has not happened yet, DCC metadata included. This PR covers keys that recorded GPU work writes in place, which #1359 does not wait for. The two change different functions.
Overlaps with my other open PR; whichever merges second rebases:
textureClearKeys.Tested
Windows 11 Pro 10.0.22631, AMD Ryzen 7 7800X3D, AMD Radeon RX 7900 XTX, WinLibs GCC 15.2.0, Release,
BUILD_TESTING=ON, onmainffa1984. The branch was rebased ontomaind539606 for this pull request and is not yet rebuilt or re-tested there:ctest: 952/952 passed:main's 951 (8 of them skip there too) plus the newagc_pending_key_stores.DccMetadata.cppas onmain,agc_pending_key_storesfails with the message above.tools/check_conventions.py --base origin/mainpasses.[gpu] texture ... has mixed DCC keys ...; its texels are read as storedreports went from 11 and 14 (two runs without this change) to 2 in each of three runs with it. The 6 reported before the level load are gone.mainbab7b32 plus fix(libkernel): restore Windows select build for Demons Souls testing #4021, fix(recompiler): include implicit inputs in relative vector windows #4057, feat(agc): render layered draws into 3D color targets #1077, feat(agc): depth planes sampled as 2D arrays, cubes and integer views #425, fix(libSceAgcDriver): retire a depth surface once another writer covers its memory #454, feat(shader): give reads the masked-select pass keeps the whole pixel ancillary word #4031, fix(libc): alias non-contiguous shared guest views on Windows #2254 and local changes, before perf(libc): remember clean pages once per run in Windows write collects #3864, perf(agc): clear integer-format storage images with DCC code 0000 on the GPU #3865, perf(agc): handle the zero dword fill kernel as a buffer fill #4012, perf(agc): sort guest buffer regions through indices before merging them #4248 and fix(agc): order direct reads after copied writes #1359 were added. It was not measured on this branch alone.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)