Repository navigation
fix(agc): the stage-A fast path leaves a view of a pending image whose keys were filled to the full lookup - #249
Merged
boykopovar merged 1 commit intoOct 2, 2026
Conversation
…e keys were filled to the full lookup A sampled read through a surface's keys after a uniform key fill with a clear code reads the fill's clear value, not the image's pending results (cachedTexture's clear-through-keys). The stage-A fast path returned the record's view of the pending image without that check, so a read between the fill and the image's next refresh saw the previous results. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 1, 2026
oneandonlydean
added a commit
to oneandonlydean/AnyPS5
that referenced
this pull request
Oct 2, 2026
…opovar#251 execution tests, NGS2/audio boykopovar#236-boykopovar#248, boykopovar#249, boykopovar#292, our boykopovar#246) into astrobot Conflicts: - tests/Recorder.cpp: our boykopovar#246 commit is already on astrobot (3a494ec) along with the later key-fill tests, so ours is kept; every line upstream's boykopovar#246 added is present once. - RdnaOpcode.hpp: upstream's order (SClause before SCbranchCdbg, then the cache and perf-hint no-ops). - SpirvAluEmitterMath.cpp: v_writelane fix landed on both sides with the same semantics; ours kept. - libSceNgs2.native: upstream's NGS2 (system, racks, voices, ATRAC9, tests) replaces astrobot's single-file port. Astro Bot imports no NGS2 functions. Upstream left the Geom and Pan helpers as throwing stubs, so astrobot's working versions move to src/GeomPan.cpp in place of Unimplemented.cpp. libSceNgs2's stub layer and VerboseLog.hpp (used only by the old port) go. - TechnicalDebt.md: both entries kept. boykopovar#143 (NGG passthrough) stays as on astrobot: upstream did not touch its files since the boykopovar#258 revert. The recompile request serialization stays at version 7.
6 tasks done
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
#163's per-read DCC model: after a uniform key fill with a clear code, a sampled read through the surface's keys reads the clear value instead of the image's pending results (
cachedTexture,clearThroughKeys). The stage-A fast path (fastTexture) skipped that check. It returned the record's view of the pending image whenever the scanned keys matched the entry's, so a sampled read between the fill and the image's next refresh read the previous results.The fast path now leaves such a view to the full lookup: when the record's source image has keys filled with a clear code and the read goes through keys (
dccAddress != 0). The full lookup then binds the clear or takes its other branches as before. Once the image is refreshed (uploadresetsfilledKeys), the fast path applies again.GTA V clears its 1280×720 bloom buffer every frame by filling its DCC keys (code 0000). Its composite then samples the buffer through the fast path before the buffer's next refresh, so each frame added onto the last one:
Until now, GTA needed
APS5_KEYS_FILL_CLEAR=1to avoid this.Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.
APS5_KEYS_FILL_CLEAR. I read the scene luminance (the 1×1 R32F the auto-exposure averages into) back from its GPU image every frame:APS5_KEYS_FILL_CLEAR=1.ctest: all tests pass.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🤖 Generated with Claude Code