gpu: queue and submit image readbacks at end-of-pipe labels #1928

Closed
github-bot wants to merge 2 commits from gh-pr/1928/head into gh-pr/1928/base
Owner

@⁠MrBigBritches on GitHub · 2026-10-27 01:25 UTC · original
MrBigBritches:readback-signal-order → main · +430 −10 · 5 files · 2 commits · closed without merging

Games read GPU-written images on the CPU after waiting for an end-of-pipe label. UE4 does this for sky-light ambient. It renders the irradiance SH into a small RGBA16F target and reads it back after the frame's label. With --readback-linear-images or --readback-tiled-images, readbacks were only queued at the garbage-collector pass, so the guest read stale data. In Octopath Traveler II, Throné's opening scene was left without ambient light.

With this PR, RELEASE_MEM queues the pending readbacks before its label and submits them at once, so their data reaches guest memory about when the label's GPU work finishes. The label itself is still written at once.

This replaces the earlier version of this PR, which also held each label back until its readbacks landed. That hold made labels reach the guest only after the host GPU had run everything before them, which let games see the host GPU's real speed. Astro Bot then halved its dynamic resolution, and the image looked pixelated with no AA. Testing showed queuing and submitting at the label is enough for Octopath on its own, so the holds are gone.

Before After
image Screenshot 2026-10-26 183451

Commits

  1. Retry readbacks that aren't ready yet. An enrolled image that can't be downloaded yet, for example because a CPU write is newer, stays enrolled for the next garbage-collector pass instead of being dropped. Download-buffer space is committed only after the guest read succeeds. A count of readbacks in flight lets tests see when data is still on its way.
  2. Queue and submit readbacks at end-of-pipe labels.
    • Every RELEASE_MEM queues the pending readbacks and submits them. The GDS path submits them through its existing Finish().
    • Images that can't be downloaded yet are dropped at a label. Their guest memory is already newer than the GPU result, and a retry would land a frame or more later. The garbage collector still keeps them.
    • Interrupts are still priority operations queued after the readbacks, so they're raised once the data has landed.
    • With readbacks off, the only cost is one bool check per label.

Tested

Build Octopath II, Throné's opening Astro Bot AA
main broken lighting correct
earlier version of this PR (holds) correct broken
this PR correct correct

Both readback flags were on for the readback rows.

Tests

  • TextureCacheDownloadRetry: an unready image is kept and copied once it can be, and the in-flight count covers the copy until it lands.
  • TextureCacheDownloadDropAtLabel: an unready image is dropped at a label and never copied later.
  • ReadbackAtLabel:
    • a baseline release with nothing pending submits nothing
    • with a readback pending, the label is written at once, exactly one command buffer is submitted, and the guest still has the old data while the priority thread is parked
    • the data lands afterwards
    • an unready image survives a real garbage-collector pass but is dropped by a label
  • Mutations: each one fails its own check.
    • no queuing at labels
    • queuing without submitting
    • labels keeping unready images
    • the collector dropping them

Known issues

  • Readbacks land after the label, not before it. A guest that reads a readback target straight after seeing the label can still see stale data, and a guest write to it before the readback lands is overwritten. The garbage-collector path had the same race once a frame.
  • More frequent submits. With readbacks on, a frame can now submit once per label that has readbacks pending, instead of once per frame. Not measured.
  • Interrupt order isn't tested. The ordering behind the readbacks follows from the priority thread running operations in order.
**@⁠MrBigBritches** on GitHub · 2026-10-27 01:25 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928) `MrBigBritches:readback-signal-order` → `main` · +430 −10 · 5 files · 2 commits · closed without merging Games read GPU-written images on the CPU after waiting for an end-of-pipe label. UE4 does this for sky-light ambient. It renders the irradiance SH into a small RGBA16F target and reads it back after the frame's label. With `--readback-linear-images` or `--readback-tiled-images`, readbacks were only queued at the garbage-collector pass, so the guest read stale data. In Octopath Traveler II, Throné's opening scene was left without ambient light. With this PR, `RELEASE_MEM` queues the pending readbacks before its label and submits them at once, so their data reaches guest memory about when the label's GPU work finishes. The label itself is still written at once. This replaces the earlier version of this PR, which also held each label back until its readbacks landed. That hold made labels reach the guest only after the host GPU had run everything before them, which let games see the host GPU's real speed. Astro Bot then halved its dynamic resolution, and the image looked pixelated with no AA. Testing showed queuing and submitting at the label is enough for Octopath on its own, so the holds are gone. | Before | After | | :---: | :---: | <img width="2562" height="1479" alt="image" src="https://github.com/user-attachments/assets/4e0d905c-3c21-4778-9d48-8732eabd8e11" />|<img width="2562" height="1479" alt="Screenshot 2026-10-26 183451" src="https://github.com/user-attachments/assets/fdba96e6-09a4-48f5-baf5-4960d8e704da" />| ## Commits 1. **Retry readbacks that aren't ready yet.** An enrolled image that can't be downloaded yet, for example because a CPU write is newer, stays enrolled for the next garbage-collector pass instead of being dropped. Download-buffer space is committed only after the guest read succeeds. A count of readbacks in flight lets tests see when data is still on its way. 2. **Queue and submit readbacks at end-of-pipe labels.** - Every `RELEASE_MEM` queues the pending readbacks and submits them. The GDS path submits them through its existing `Finish()`. - Images that can't be downloaded yet are dropped at a label. Their guest memory is already newer than the GPU result, and a retry would land a frame or more later. The garbage collector still keeps them. - Interrupts are still priority operations queued after the readbacks, so they're raised once the data has landed. - With readbacks off, the only cost is one bool check per label. ## Tested | Build | Octopath II, Throné's opening | Astro Bot AA | |---|---|---| | main | broken lighting | correct | | earlier version of this PR (holds) | correct | broken | | this PR | correct | correct | Both readback flags were on for the readback rows. ## Tests - **`TextureCacheDownloadRetry`:** an unready image is kept and copied once it can be, and the in-flight count covers the copy until it lands. - **`TextureCacheDownloadDropAtLabel`:** an unready image is dropped at a label and never copied later. - **`ReadbackAtLabel`:** - a baseline release with nothing pending submits nothing - with a readback pending, the label is written at once, exactly one command buffer is submitted, and the guest still has the old data while the priority thread is parked - the data lands afterwards - an unready image survives a real garbage-collector pass but is dropped by a label - **Mutations:** each one fails its own check. - no queuing at labels - queuing without submitting - labels keeping unready images - the collector dropping them ## Known issues - **Readbacks land after the label, not before it.** A guest that reads a readback target straight after seeing the label can still see stale data, and a guest write to it before the readback lands is overwritten. The garbage-collector path had the same race once a frame. - **More frequent submits.** With readbacks on, a frame can now submit once per label that has readbacks pending, instead of once per frame. Not measured. - **Interrupt order isn't tested.** The ordering behind the readbacks follows from the priority thread running operations in order.
Count the image readbacks whose guest write has not run yet, so tests can
tell when GPU results are still on their way to guest memory. The count
includes the write-backs of evicted images, even with readbacks off,
because an evicted image's data then exists only in its pending
write-back.

ProcessDownloadImages() now reports whether it queued a copy and keeps an
enrolled image it cannot download yet, for example while a CPU write is
newer than the GPU one, instead of dropping it. Images that can never be
downloaded are still dropped. With readbacks on, such an image's GPU
result can now reach guest memory at a later pass, where before it was
lost. The next commit drops these images at end-of-pipe labels, so the
retry mostly matters between labels.

DownloadImageMemory() commits download-buffer space only after reading
the guest data succeeds, so an image whose read keeps failing does not
use up the buffer on every retry. The new test covers the retry and the
count, but not a failing read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Games read GPU-written images on the CPU after waiting for an end-of-pipe
label. UE4 does this for sky-light ambient: it renders the irradiance SH
into a small RGBA16F target and reads it back after the frame's label.
With --readback-linear-images or --readback-tiled-images, readbacks were
only queued at the garbage-collector pass, so in Octopath Traveler II the
guest read stale data and Throné's opening scene was left without
ambient light.

RELEASE_MEM now queues the pending readbacks before its label and submits
them at once. The GDS path submits them through its existing Finish().
Their data reaches guest memory about when the label's GPU work finishes.
An interrupt is still a priority operation queued after them, so it is
raised once their data has landed.

The label itself is written at once, as before. Holding it back until
the readbacks land made it reach the guest only after the host GPU ran
everything before it, which showed the game the host GPU's real speed.
Astro Bot then halved its dynamic resolution. In Throné's opening scene
the readbacks still land before the game reads them.

At a label, images that cannot be downloaded yet are dropped. Such an
image was written by the CPU after the GPU, so its guest memory is
already newer, and a retry would land a frame or more later. The
garbage collector still keeps them for a retry.

Known limitation: readbacks land after the label, not before it. A guest
that reads a readback target straight after seeing the label can still
see stale data, and a guest write to it before the readback lands is
overwritten. The garbage-collector path had the same race once a frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:09:18 +00:00
github-bot closed this pull request 2026-11-26 10:09:18 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-27 01:31 UTC · original · edited 2026-11-02 06:21 UTC

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 2d515a2daca9049545a7796dce840c780d0ded66 and fc98b0b0b5.

Files selected for processing: 5
  • src/graphics/guest_gpu/command_processor/commandProcessor.h
  • src/graphics/guest_gpu/graphicsRun.cpp
  • src/graphics/host_gpu/renderer/cache/textureCache.cpp
  • src/graphics/host_gpu/renderer/cache/textureCache.h
  • tests/ShaderRecompilerComputeTests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Walkthrough

Texture-cache download processing now reports whether it queued work, retains or drops unavailable images according to an option, and tracks readbacks until guest-memory writes complete. Release-label handling processes eligible readbacks before writing the label, with GDS reads relying on the subsequent Finish(). New tests cover download retries, label-time dropping, and readback completion after a label write.

Suggested reviewers: claxten10

Change: Bug fix

Merge Risk: Minimal · up to fc98b

The change queues image readbacks before end-of-pipe labels without delaying the labels. The author states that this avoids the Astro Bot dynamic-resolution regression. No actionable merge-blocking risk remains after review.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely summarizes the main change: queuing and submitting image readbacks at end-of-pipe labels.
Description check Passed The description directly explains the stale-readback issue, the RELEASE_MEM behavior, implementation details, testing, and known limitations. It is fully related to the changeset.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 10 functions across 4 files. (1 skipped: 1 too large.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
**@⁠coderabbitai[bot]** on GitHub · 2026-10-27 01:31 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928#issuecomment-6431493790) · edited 2026-11-02 06:21 UTC <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/1928?scope=ghh_OusAJGA4HG8ljoOV0wJvVx8NmnZIjc2DdjmxOu0xZWA&amp;cs_source=review_comment"><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg?v=3"><source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg?v=3" alt="Review in Change Stack →" height="32"></picture></a> <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. <details> <summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Recent review info</strong></summary> <dl> <dd> <!-- review_info_content --> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</strong></summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/02b17af3e068241d046f84e60901f1cd90bc2929/.coderabbit.yaml>) - **Commit**: [02b17af](<https://github.com/KytyPS5/KytyPS5/commit/02b17af3e068241d046f84e60901f1cd90bc2929>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `3d1d05f7-7d09-48e2-b743-193d375664e7` </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</strong></summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 2d515a2daca9049545a7796dce840c780d0ded66 and fc98b0b0b5a75ee29e3695ed622dd82400a11b19. </dd> </dl> </details> <details> <summary><strong><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 5</strong></summary> <dl> <dd> * `src/graphics/guest_gpu/command_processor/commandProcessor.h` * `src/graphics/guest_gpu/graphicsRun.cpp` * `src/graphics/host_gpu/renderer/cache/textureCache.cpp` * `src/graphics/host_gpu/renderer/cache/textureCache.h` * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. </dd> </dl> </details> <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary><strong>Walkthrough</strong></summary> <dl> <dd> Texture-cache download processing now reports whether it queued work, retains or drops unavailable images according to an option, and tracks readbacks until guest-memory writes complete. Release-label handling processes eligible readbacks before writing the label, with GDS reads relying on the subsequent `Finish()`. New tests cover download retries, label-time dropping, and readback completion after a label write. **Suggested reviewers:** `claxten10` </dd> </dl> </details> <!-- walkthrough_end --> <!-- change_assessment_start --> <!-- change_assessment_commit:"fc98b0b0b5a75ee29e3695ed622dd82400a11b19" --> <!-- change_assessment_priority:{"version":1,"urgency":"p2","manual":false} --> **Change:** Bug fix <!-- change_assessment_end --> <details> <summary><strong>Merge Risk:</strong> <strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/risk-unassessed-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minimal</strong> · up to <code>fc98b</code></summary> <dl> <dd> <!-- final_review_risk_start --> <!-- final_review_risk_label **Merge Risk:** **⚪ Minimal** · up to `fc98b` --> <!-- final_review_risk_coverage:{"sourceCommitId":"fc98b0b0b5a75ee29e3695ed622dd82400a11b19","coveredCommitId":"fc98b0b0b5a75ee29e3695ed622dd82400a11b19","kind":"reviewed"} --> The change queues image readbacks before end-of-pipe labels without delaying the labels. The author states that this avoids the Astro Bot dynamic-resolution regression. No actionable merge-blocking risk remains after review. <!-- final_review_risk_end --> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_start --> <details> <summary><strong>Pre-merge checks: <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> 4 · <sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-inconclusive-14-v2.svg" width="14" height="14" align="middle" alt="Inconclusive" title="Inconclusive"></picture></sup> 1</strong></summary> <dl> <dd> <strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-failed-14-v2.svg" width="14" height="14" align="middle" alt="Failed" title="Failed"></picture></sup> Failed checks: 1 inconclusive</strong> | Check name | Status | Explanation | Resolution | | :---------------- | :--------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ![Inconclusive](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-inconclusive.svg) | Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary><strong><sup><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-counter-passed-14-v2.svg" width="14" height="14" align="middle" alt="Passed" title="Passed"></picture></sup> Passed checks: 4 passed</strong></summary> <dl> <dd> | Check name | Status | Explanation | | :------------------------ | :--------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The title clearly and concisely summarizes the main change: queuing and submitting image readbacks at end-of-pipe labels. | | Description check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | The description directly explains the stale-readback issue, the RELEASE_MEM behavior, implementation details, testing, and known limitations. It is fully related to the changeset. | | Linked Issues check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ![Passed](https://storage.googleapis.com/coderabbit_public_assets/pre-merge-checks-passed.svg) | Check skipped because no linked issues were found for this pull request. | </dd> </dl> </details> <details> <summary><strong>Full details: Docstring Coverage</strong></summary> <dl> <dd> **Explanation** Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 10 functions across 4 files. (1 skipped: 1 too large.) **Resolution** Write docstrings for the functions missing them to satisfy the coverage threshold. </dd> </dl> </details> </dd> </dl> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=KytyPS5/KytyPS5&utm_content=1928)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary><strong>Share</strong></summary> <dl> <dd> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </dd> </dl> </details> <!-- tips_end -->
@ -2082,3 +2103,3 @@
}
}
m_download_images.clear();
return queued;
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-27 01:31 UTC · original · edited 2026-10-27 02:12 UTC

Major · Data Integrity & Integration · Heavy lift

Supported by static analysis

Script executed:

set -u
printf '%s\n' '--- revision availability ---'
git rev-parse --verify fc4f28d30900334c8426a4a9e324d30c5c7051a3
git rev-parse --verify 986721f5bca49e20d0e3312782882429dd5cfcb6
printf '%s\n' '--- relevant diff ---'
git diff --unified=35 986721f5bca49e20d0e3312782882429dd5cfcb6 fc4f28d30900334c8426a4a9e324d30c5c7051a3 -- src/graphics/host_gpu/renderer/cache/textureCache.cpp
printf '%s\n' '--- symbol locations ---'
rg -n -F -- 'ProcessDownloadImages' src/graphics/host_gpu
rg -n -F -- 'DownloadImageMemory' src/graphics/host_gpu
rg -n -F -- 'ShouldDeferSignal' src/graphics/host_gpu
printf '%s\n' '--- current file surrounding changed implementation ---'
sed -n '1980,2120p' src/graphics/host_gpu/renderer/cache/textureCache.cpp
printf '%s\n' '--- current signal-ordering callers ---'
rg -l -F -- 'ShouldDeferSignal' src/graphics/host_gpu | while read -r file; do
  printf '%s\n' "--- $file ---"
  line=$(rg -n -F -- 'ShouldDeferSignal' "$file" | cut -d: -f1 | head -n1)
  start=$((line-80)); [ "$start" -lt 1 ] && start=1
  end=$((line+100))
  sed -n "${start},${end}p" "$file"
done

Repository: KytyPS5/KytyPS5

Length of output: 10933


Script executed:

set -u
printf '%s\n' '--- all signal-ordering symbols ---'
rg -n -F -- 'ShouldDeferSignal' . || test "$?" -eq 1
rg -n -F -- 'm_readbacks_in_flight' . || test "$?" -eq 1
printf '%s\n' '--- ProcessDownloadImages callers and owner context ---'
rg -n -F -- 'ProcessDownloadImages()' src
sed -n '110,210p' src/graphics/host_gpu/renderer/renderContext.cpp
printf '%s\n' '--- readback enrollment sites ---'
rg -n -F -e 'm_download_images' -e 'ProcessDownloadImages' src/graphics/host_gpu/renderer/cache src/graphics/host_gpu/renderer/renderContext.cpp || test "$?" -eq 1
printf '%s\n' '--- TryReadBacking declarations and definitions ---'
rg -n -F -- 'TryReadBacking' src

Repository: KytyPS5/KytyPS5

Length of output: 8278


Script executed:

set -u
printf '%s\n' '--- command processor readback and signal path ---'
nl -ba src/graphics/guest_gpu/graphicsRun.cpp | sed -n '1080,1185p'
printf '%s\n' '--- signal-related declarations ---'
nl -ba src/graphics/guest_gpu/command_processor/commandProcessor.h | sed -n '115,145p'
printf '%s\n' '--- TryReadBacking implementations ---'
nl -ba src/kernel/memoryAddressSpace.inc | sed -n '205,245p'
nl -ba src/kernel/memoryAddressSpace.inc | sed -n '755,790p'
nl -ba src/kernel/memory.cpp | sed -n '845,865p'
printf '%s\n' '--- readback enrollment/removal and declarations ---'
nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '245,280p'
nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '395,435p'
nl -ba src/graphics/host_gpu/renderer/cache/textureCache.h | sed -n '65,105p'
nl -ba src/graphics/host_gpu/renderer/cache/textureCache.h | sed -n '185,212p'

Repository: KytyPS5/KytyPS5

Length of output: 19792


Script executed:

set -u
printf '%s\n' '--- complete sparse backing read implementation ---'
nl -ba src/kernel/memoryAddressSpace.inc | sed -n '227,285p'
printf '%s\n' '--- address-space map/unmap declarations and implementations ---'
rg -n -F -e 'Map(' -e 'Unmap(' -e 'm_maps' src/kernel/memoryAddressSpace.inc | head -80
nl -ba src/kernel/memoryAddressSpace.inc | sed -n '80,205p'
printf '%s\n' '--- texture image lifecycle around unmap and GPU modification ---'
rg -n -F -e 'UnmapMemory' -e 'MarkGpuWritten' -e 'MarkAsMaybeDirty' -e 'ClearGpuModified' src/graphics/host_gpu/renderer/cache/textureCache.cpp

Repository: KytyPS5/KytyPS5

Length of output: 9513


Script executed:

set -u
printf '%s\n' '--- address-space map and unmap operations ---'
nl -ba src/kernel/memoryAddressSpace.inc | sed -n '285,490p'
printf '%s\n' '--- texture cache unmap and image state paths ---'
nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '730,770p'
nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '1490,1535p'
nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '1945,2005p'

Repository: KytyPS5/KytyPS5

Length of output: 14436


Script executed:

set -u
printf '%s\n' '--- SafeToDownload declaration and definition ---'
rg -n -F -- 'SafeToDownload' src/graphics
printf '%s\n' '--- surrounding image state implementation ---'
rg -n -F -e 'safe_to_download' -e 'gpu_modified' -e 'SafeToDownload' src/graphics/host_gpu/renderer/cache src/graphics/host_gpu/renderer/image || test "$?" -eq 1

Repository: KytyPS5/KytyPS5

Length of output: 3525


Script executed:

set -u
nl -ba src/graphics/host_gpu/renderer/image/image.h | sed -n '98,130p'
nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '1529,1555p'
nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '1788,1815p'

Repository: KytyPS5/KytyPS5

Length of output: 4435


Keep retained readbacks in signal-ordering state.

When DownloadImageMemory() returns false because the image is not yet SafeToDownload(), ProcessDownloadImages() retains the image but returns false if it queued no other readback. The following label can then be written immediately because no readback is queued or in flight. A later retry can write the image to guest memory after that label.

Track retained retryable images as pending ordering work. Retry them before the label lands, or drop them definitively before emitting the label.

✅ Addressed in commit c8bb037

**@⁠coderabbitai[bot]** on GitHub · 2026-10-27 01:31 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928#discussion_r4384255566) · edited 2026-10-27 02:12 UTC <!-- coderabbit-ai-generated:v1 --> **<picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/major-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Major** · **Data Integrity & Integration** · **Heavy lift** <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/review-details-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/review-details.svg" width="16" height="16" align="absmiddle" alt=""></picture> Supported by static analysis</summary> <dl> <dd> Script executed: ```bash set -u printf '%s\n' '--- revision availability ---' git rev-parse --verify fc4f28d30900334c8426a4a9e324d30c5c7051a3 git rev-parse --verify 986721f5bca49e20d0e3312782882429dd5cfcb6 printf '%s\n' '--- relevant diff ---' git diff --unified=35 986721f5bca49e20d0e3312782882429dd5cfcb6 fc4f28d30900334c8426a4a9e324d30c5c7051a3 -- src/graphics/host_gpu/renderer/cache/textureCache.cpp printf '%s\n' '--- symbol locations ---' rg -n -F -- 'ProcessDownloadImages' src/graphics/host_gpu rg -n -F -- 'DownloadImageMemory' src/graphics/host_gpu rg -n -F -- 'ShouldDeferSignal' src/graphics/host_gpu printf '%s\n' '--- current file surrounding changed implementation ---' sed -n '1980,2120p' src/graphics/host_gpu/renderer/cache/textureCache.cpp printf '%s\n' '--- current signal-ordering callers ---' rg -l -F -- 'ShouldDeferSignal' src/graphics/host_gpu | while read -r file; do printf '%s\n' "--- $file ---" line=$(rg -n -F -- 'ShouldDeferSignal' "$file" | cut -d: -f1 | head -n1) start=$((line-80)); [ "$start" -lt 1 ] && start=1 end=$((line+100)) sed -n "${start},${end}p" "$file" done ``` Repository: KytyPS5/KytyPS5 Length of output: 10933 --- Script executed: ```bash set -u printf '%s\n' '--- all signal-ordering symbols ---' rg -n -F -- 'ShouldDeferSignal' . || test "$?" -eq 1 rg -n -F -- 'm_readbacks_in_flight' . || test "$?" -eq 1 printf '%s\n' '--- ProcessDownloadImages callers and owner context ---' rg -n -F -- 'ProcessDownloadImages()' src sed -n '110,210p' src/graphics/host_gpu/renderer/renderContext.cpp printf '%s\n' '--- readback enrollment sites ---' rg -n -F -e 'm_download_images' -e 'ProcessDownloadImages' src/graphics/host_gpu/renderer/cache src/graphics/host_gpu/renderer/renderContext.cpp || test "$?" -eq 1 printf '%s\n' '--- TryReadBacking declarations and definitions ---' rg -n -F -- 'TryReadBacking' src ``` Repository: KytyPS5/KytyPS5 Length of output: 8278 --- Script executed: ```bash set -u printf '%s\n' '--- command processor readback and signal path ---' nl -ba src/graphics/guest_gpu/graphicsRun.cpp | sed -n '1080,1185p' printf '%s\n' '--- signal-related declarations ---' nl -ba src/graphics/guest_gpu/command_processor/commandProcessor.h | sed -n '115,145p' printf '%s\n' '--- TryReadBacking implementations ---' nl -ba src/kernel/memoryAddressSpace.inc | sed -n '205,245p' nl -ba src/kernel/memoryAddressSpace.inc | sed -n '755,790p' nl -ba src/kernel/memory.cpp | sed -n '845,865p' printf '%s\n' '--- readback enrollment/removal and declarations ---' nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '245,280p' nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '395,435p' nl -ba src/graphics/host_gpu/renderer/cache/textureCache.h | sed -n '65,105p' nl -ba src/graphics/host_gpu/renderer/cache/textureCache.h | sed -n '185,212p' ``` Repository: KytyPS5/KytyPS5 Length of output: 19792 --- Script executed: ```bash set -u printf '%s\n' '--- complete sparse backing read implementation ---' nl -ba src/kernel/memoryAddressSpace.inc | sed -n '227,285p' printf '%s\n' '--- address-space map/unmap declarations and implementations ---' rg -n -F -e 'Map(' -e 'Unmap(' -e 'm_maps' src/kernel/memoryAddressSpace.inc | head -80 nl -ba src/kernel/memoryAddressSpace.inc | sed -n '80,205p' printf '%s\n' '--- texture image lifecycle around unmap and GPU modification ---' rg -n -F -e 'UnmapMemory' -e 'MarkGpuWritten' -e 'MarkAsMaybeDirty' -e 'ClearGpuModified' src/graphics/host_gpu/renderer/cache/textureCache.cpp ``` Repository: KytyPS5/KytyPS5 Length of output: 9513 --- Script executed: ```bash set -u printf '%s\n' '--- address-space map and unmap operations ---' nl -ba src/kernel/memoryAddressSpace.inc | sed -n '285,490p' printf '%s\n' '--- texture cache unmap and image state paths ---' nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '730,770p' nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '1490,1535p' nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '1945,2005p' ``` Repository: KytyPS5/KytyPS5 Length of output: 14436 --- Script executed: ```bash set -u printf '%s\n' '--- SafeToDownload declaration and definition ---' rg -n -F -- 'SafeToDownload' src/graphics printf '%s\n' '--- surrounding image state implementation ---' rg -n -F -e 'safe_to_download' -e 'gpu_modified' -e 'SafeToDownload' src/graphics/host_gpu/renderer/cache src/graphics/host_gpu/renderer/image || test "$?" -eq 1 ``` Repository: KytyPS5/KytyPS5 Length of output: 3525 --- Script executed: ```bash set -u nl -ba src/graphics/host_gpu/renderer/image/image.h | sed -n '98,130p' nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '1529,1555p' nl -ba src/graphics/host_gpu/renderer/cache/textureCache.cpp | sed -n '1788,1815p' ``` Repository: KytyPS5/KytyPS5 Length of output: 4435 --- </dd> </dl> </details> **Keep retained readbacks in signal-ordering state.** When `DownloadImageMemory()` returns false because the image is not yet `SafeToDownload()`, `ProcessDownloadImages()` retains the image but returns `false` if it queued no other readback. The following label can then be written immediately because no readback is queued or in flight. A later retry can write the image to guest memory after that label. Track retained retryable images as pending ordering work. Retry them before the label lands, or drop them definitively before emitting the label. <!-- fingerprinting:phantom:poseidon:wombat --> <!-- cr-indicator-types:potential_issue --> <!-- cr-comment:v1:cb2296e595a6b4a6d0f97e67 --> <!-- This is an auto-generated reply by CodeRabbit --> ✅ Addressed in commit c8bb037
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-27 01:31 UTC · original · reviewed

Actionable comments posted: 1


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 986721f5bc and fc4f28d30900334c8426a4a9e324d30c5c7051a3.

Files selected for processing: 8
  • src/graphics/guest_gpu/command_processor/commandProcessor.h
  • src/graphics/guest_gpu/graphicsRun.cpp
  • src/graphics/guest_gpu/graphicsRun.h
  • src/graphics/host_gpu/renderer/cache/textureCache.cpp
  • src/graphics/host_gpu/renderer/cache/textureCache.h
  • src/graphics/host_gpu/renderer/renderContext.cpp
  • src/graphics/host_gpu/renderer/renderContext.h
  • tests/ShaderRecompilerComputeTests.cpp

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-27 01:31 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928#pullrequestreview-5661228948) · **reviewed** <!-- coderabbit-ai-generated:v1 --> **Actionable comments posted: 1** --- <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/986721f5bca49e20d0e3312782882429dd5cfcb6/.coderabbit.yaml>) - **Commit**: [986721f](<https://github.com/KytyPS5/KytyPS5/commit/986721f5bca49e20d0e3312782882429dd5cfcb6>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `0f696807-1ebf-418e-8692-44e0197cf944` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> Reviewing files that changed from the base of the PR and between 986721f5bca49e20d0e3312782882429dd5cfcb6 and fc4f28d30900334c8426a4a9e324d30c5c7051a3. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 8</summary> <dl> <dd> * `src/graphics/guest_gpu/command_processor/commandProcessor.h` * `src/graphics/guest_gpu/graphicsRun.cpp` * `src/graphics/guest_gpu/graphicsRun.h` * `src/graphics/host_gpu/renderer/cache/textureCache.cpp` * `src/graphics/host_gpu/renderer/cache/textureCache.h` * `src/graphics/host_gpu/renderer/renderContext.cpp` * `src/graphics/host_gpu/renderer/renderContext.h` * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. </dd> </dl> </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=068a3e8a-a5f6-490f-8e50-20911a01803d attempt=fcee60b2-bfb2-41c9-bb60-18da8c10ba38 batch=1/1 -->
@ -2082,3 +2103,3 @@
}
}
m_download_images.clear();
return queued;
Author
Owner

@⁠MrBigBritches on GitHub · 2026-10-27 01:58 UTC · original

fixed in c8bb0377

**@⁠MrBigBritches** on GitHub · 2026-10-27 01:58 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928#discussion_r4384384114) fixed in c8bb0377
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-27 02:10 UTC · original · reviewed

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

Minor · Block IT_WRITE_DATA while an earlier deferred signal is pending. · graphicsRun.cpp:1052-1059

src/graphics/guest_gpu/graphicsRun.cpp:1052-1059
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Block IT_WRITE_DATA while an earlier deferred signal is pending.

RELEASE_MEM can defer its label while a readback is in flight, but ProcessPm4 continues to the next packet. IT_WRITE_DATA then writes directly to memory. If the deferred signal lands afterward, it can overwrite that later write.

Before WriteData stores its value, suspend PM4 when m_pending_signals is nonzero. The existing GPU-thread landing and Wake path then retries the write after the deferred label lands.

Suggested fix
 	if (dw_num == 0) {
 		return;
 	}
+	if (m_pending_signals->load(std::memory_order_acquire) != 0) {
+		SuspendPm4();
+		return;
+	}
 
 	// Completion labels can be reused immediately; memcpy may write a destination twice.
 	auto* output = static_cast<volatile uint32_t*>(dst);

Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between fc4f28d30900334c8426a4a9e324d30c5c7051a3 and c8bb0377a75d2daa9b7fda194e3b64d51379e71a.

Files selected for processing: 4
  • src/graphics/guest_gpu/graphicsRun.cpp
  • src/graphics/host_gpu/renderer/cache/textureCache.cpp
  • src/graphics/host_gpu/renderer/cache/textureCache.h
  • tests/ShaderRecompilerComputeTests.cpp
Files skipped from review as they are similar to previous changes: 1
  • src/graphics/host_gpu/renderer/cache/textureCache.h

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-27 02:10 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928#pullrequestreview-5661446760) · **reviewed** <!-- coderabbit-ai-generated:v1 --> > [!CAUTION] > Some comments are outside the diff and can’t be posted inline due to GitHub limitations. > > **⚠️ Outside diff range comments (1)** > > <details> > <summary><strong><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/amber-16.svg" width="16" height="16" align="absmiddle" alt=""></picture> Minor</strong> · Block <code>IT_WRITE_DATA</code> while an earlier deferred signal is pending. · <code>graphicsRun.cpp:1052-1059</code></summary><blockquote> > <dl> > <dd> > > `src/graphics/guest_gpu/graphicsRun.cpp:1052-1059` > **🗄️ Data Integrity & Integration** | **🟡 Minor** | **⚡ Quick win** > > **Block `IT_WRITE_DATA` while an earlier deferred signal is pending.** > > `RELEASE_MEM` can defer its label while a readback is in flight, but `ProcessPm4` continues to the next packet. `IT_WRITE_DATA` then writes directly to memory. If the deferred signal lands afterward, it can overwrite that later write. > > Before `WriteData` stores its value, suspend PM4 when `m_pending_signals` is nonzero. The existing GPU-thread landing and `Wake` path then retries the write after the deferred label lands. > > <details> > <summary>Suggested fix</summary> > <dl> > <dd> > > ```diff > if (dw_num == 0) { > return; > } > + if (m_pending_signals->load(std::memory_order_acquire) != 0) { > + SuspendPm4(); > + return; > + } > > // Completion labels can be reused immediately; memcpy may write a destination twice. > auto* output = static_cast<volatile uint32_t*>(dst); > ``` > > </dd> > </dl> > </details> > > <!-- cr-comment:v1:e3940614d22f0d47fb7764e7 --> > > </dd> > </dl> > </blockquote></details> --- <details> <summary><picture><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/info.svg" width="16" height="16" align="absmiddle" alt=""></picture> Review info</summary> <dl> <dd> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/cog.svg" width="16" height="16" align="absmiddle" alt=""></picture> Run configuration</summary> <dl> <dd> - **Source mode**: Auto - **Repository**: [KytyPS5/KytyPS5](<https://github.com/KytyPS5/KytyPS5>) - **Branch**: [main](<https://github.com/KytyPS5/KytyPS5/tree/main>) - **File**: [.coderabbit.yaml](<https://github.com/KytyPS5/KytyPS5/blob/986721f5bca49e20d0e3312782882429dd5cfcb6/.coderabbit.yaml>) - **Commit**: [986721f](<https://github.com/KytyPS5/KytyPS5/commit/986721f5bca49e20d0e3312782882429dd5cfcb6>) - **Layers**: Repository YAML - **Review profile**: CHILL - **Plan**: Advanced - **Run ID**: `39f6e5ac-3827-419e-b7ab-25d58d88b431` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/git-commit-horizontal.svg" width="16" height="16" align="absmiddle" alt=""></picture> Commits</summary> <dl> <dd> Reviewing files that changed from the base of the PR and between fc4f28d30900334c8426a4a9e324d30c5c7051a3 and c8bb0377a75d2daa9b7fda194e3b64d51379e71a. </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-plus-corner.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files selected for processing: 4</summary> <dl> <dd> * `src/graphics/guest_gpu/graphicsRun.cpp` * `src/graphics/host_gpu/renderer/cache/textureCache.cpp` * `src/graphics/host_gpu/renderer/cache/textureCache.h` * `tests/ShaderRecompilerComputeTests.cpp` </dd> </dl> </details> <details> <summary><picture><source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-similar-dark.svg"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-comment-icons-v1/file-similar.svg" width="16" height="16" align="absmiddle" alt=""></picture> Files skipped from review as they are similar to previous changes: 1</summary> <dl> <dd> * src/graphics/host_gpu/renderer/cache/textureCache.h </dd> </dl> </details> **Included review availability:** This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. </dd> </dl> </details> <!-- This is an auto-generated comment by CodeRabbit for review status --> <!-- coderabbit-review-publication v1 publication=21d9a4dd-c9a5-476d-91f0-80cb85ddfae3 attempt=aa0c63a7-e435-4dfe-96e5-8df54d7d709c batch=1/1 -->
Author
Owner

@⁠MrBigBritches on GitHub · 2026-10-27 03:03 UTC · original

@⁠coderabbitai RDNA2, WRITE_DATA executes when the CP parses it, while RELEASE_MEM's end-of-pipe write lands only after earlier work drains, so a WRITE_DATA right after a RELEASE_MEM can land first on hardware too. Drivers put a WAIT_REG_MEM between them, and that wait blocks here until the held-back label lands. Blocking every WRITE_DATA on the shared pending count would stall unrelated queues and register writes. Kept as the known gap listed in the PR description.

**@⁠MrBigBritches** on GitHub · 2026-10-27 03:03 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928#issuecomment-6432694897) @⁠coderabbitai RDNA2, WRITE_DATA executes when the CP parses it, while RELEASE_MEM's end-of-pipe write lands only after earlier work drains, so a WRITE_DATA right after a RELEASE_MEM can land first on hardware too. Drivers put a WAIT_REG_MEM between them, and that wait blocks here until the held-back label lands. Blocking every WRITE_DATA on the shared pending count would stall unrelated queues and register writes. Kept as the known gap listed in the PR description.
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-10-27 03:03 UTC · original

Tip

For best results, initiate chat on the files or code changes.

@⁠MrBigBritches I couldn't produce a complete response to this request. Please try again.


📝 I couldn't check this conversation for new learnings, so no new learning was saved.

You are interacting with an AI system.

**@⁠coderabbitai[bot]** on GitHub · 2026-10-27 03:03 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928#issuecomment-6432700846) <!-- coderabbit-ai-generated:v1 --> <!-- This is an auto-generated reply by CodeRabbit --> > [!TIP] > For best results, initiate chat on the files or code changes. @⁠MrBigBritches I couldn't produce a complete response to this request. Please try again. --- > 📝 I couldn't check this conversation for new learnings, so no new learning was saved. <sub><i>You are interacting with an AI system.</i></sub>
Author
Owner

@⁠MrBigBritches on GitHub · 2026-11-01 18:55 UTC · original · edited 2026-11-02 06:18 UTC

Solved in fc98b0b

Discovered regression: Astro Bot loses anti-aliasing with this change + readbacks enabled

Root cause: with readbacks on, this change holds end-of-pipe labels and interrupts back 1–5 ms. Astro Bot's dynamic resolution reads that as a slower GPU and halves the render resolution, which looks pixelated with no AA.

**@⁠MrBigBritches** on GitHub · 2026-11-01 18:55 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928#issuecomment-6562393534) · edited 2026-11-02 06:18 UTC Solved in fc98b0b ~~**Discovered regression:** Astro Bot loses anti-aliasing with this change + readbacks enabled~~ ~~**Root cause:** with readbacks on, this change holds end-of-pipe labels and interrupts back 1–5 ms. Astro Bot's dynamic resolution reads that as a slower GPU and halves the render resolution, which looks pixelated with no AA.~~
Author
Owner

@⁠Nmzik on GitHub · 2026-11-07 14:38 UTC · original

@⁠MrBigBritches Credited will be in main

**@⁠Nmzik** on GitHub · 2026-11-07 14:38 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/1928#issuecomment-6708311074) @⁠MrBigBritches Credited will be in main

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.