Skip to content

GS/TC: Break LookupTarget() into 3 functions.#14262

Open
TJnotJT wants to merge 1 commit intoPCSX2:masterfrom
TJnotJT:gs-tc-cleanup-lookup-target
Open

GS/TC: Break LookupTarget() into 3 functions.#14262
TJnotJT wants to merge 1 commit intoPCSX2:masterfrom
TJnotJT:gs-tc-cleanup-lookup-target

Conversation

@TJnotJT
Copy link
Copy Markdown
Contributor

@TJnotJT TJnotJT commented Apr 5, 2026

Description of Changes

Separate draw lookup from frame lookup. Put common code in another processing function.

Replaced a lambda + captures with a helper class, since it was being used like that.

Rationale behind Changes

There was a comment in LookupTarget() indicating this could be useful, and LookupTarget() is ~1000 lines long.

Suggested Testing Steps

Testing any game on any HW renderer. So far tested with a dump run.

Did you use AI to help find, test, or implement this issue or feature?

No.

@Mrlinkwii Mrlinkwii added this to the Release 2.8 milestone Apr 5, 2026
@TJnotJT TJnotJT force-pushed the gs-tc-cleanup-lookup-target branch from 242cb63 to 616f1b7 Compare April 11, 2026 22:11
@TJnotJT TJnotJT marked this pull request as draft April 11, 2026 22:17
Separate draw lookup from frame lookup. Put common code in another processing function.
@TJnotJT TJnotJT force-pushed the gs-tc-cleanup-lookup-target branch from 616f1b7 to 6b68541 Compare April 13, 2026 21:31
@TJnotJT TJnotJT marked this pull request as ready for review April 13, 2026 21:32
@TJnotJT
Copy link
Copy Markdown
Contributor Author

TJnotJT commented Apr 13, 2026

Refactored and simplied the call hierarchy a bit more.

We already has a function named LookupDisplayTarget() (for frames) so it seemed more consistent to rename the function for RT lookup to LookupDrawTarget().

Did dump runs on both native and 2x, since the scaling helper class is more relevant to upscaling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants