graphics: unmark render targets dropped for a sample-count mismatch #2416
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2416
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2416"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@user9517 on GitHub · 2026-11-19 19:06 UTC · original
user9517:fix/ppsa24156-dropped-target-layout→main· +20 −1 · 1 files · 1 commits · openFixes a crash in My First Gran Turismo (PPSA24156): about 160 s into the first race the emulator stops at
descriptors.cpp:978.Problem: about 160 s into the first race the emulator stops at
descriptors.cpp:978(layout == eUndefined). Some draws mix attachment sample counts, andPrepareDrawRenderStatedrops the attachments whose count differs from the raster's. By then, resolving had already marked themis_target. A later stage that sampled one of them expected an attachment layout thatAcquireRenderTargetsnever set.Change: after the drop, clear
is_targeton every dropped image that no kept attachment uses.Testing
--amd-cpu).descriptors.cpp:978reproduced in the first race. After: the game runs past that point; I played through the tutorial and kept driving for a 15-minute session.mainand smoke-tested with all three fixes together: a 5-minute unattended run reached in-race rendering with no crash or GPU fault.ctest --preset win-release).AI use
I made this change with Claude Code (Claude Opus 5.5). It wrote the investigation tooling (pipeline capture and replay, a crash-dump handler, per-second counters) and drafted the code change and this description.
What I did: I reviewed the diff, and I ran the game sessions listed under Testing.
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-11-19 19:09 UTC · original
No actionable comments were generated in the recent review.
Walkthrough
When color or depth attachments have sample counts that differ from the raster sample count,
PrepareDrawRenderStaterecords their image IDs as it filters them. It clearsis_targetfor recorded images that are not retained as color or depth attachments.Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
Minimal · up to
f33f0This change prevents a crash caused by a stale render-target layout when attachments are dropped for a sample-count mismatch. It is narrowly scoped and has no identified regressions, so it is ready to merge.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the main change: render targets dropped for a sample-count mismatch are unmarked. The raw summary and objectives both describe clearing is_target on dropped attachments that no kept attachment uses, so the title matches the changeset.
Full details: Description check
Explanation
The description states the crash in My First Gran Turismo, the cause (dropped attachments already marked is_target), the fix (clear is_target on dropped images no kept attachment uses), and testing details. It is directly related to the changeset.
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
d8a9dff3-42c2-4d6f-b8ca-65b9d11ac41eReviewing files that changed from the base of the PR and between
5ad27cdd1aandf33f0754e5.src/graphics/host_gpu/renderer/renderDraw.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.