Skip to content

GS/HW: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets, update manual deswizzle.#13355

Merged
lightningterror merged 2 commits intomasterfrom
gs_merge_targets_src_tar
Oct 7, 2025
Merged

GS/HW: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets, update manual deswizzle.#13355
lightningterror merged 2 commits intomasterfrom
gs_merge_targets_src_tar

Conversation

@lightningterror
Copy link
Copy Markdown
Contributor

@lightningterror lightningterror commented Oct 4, 2025

Description of Changes

GS/TC: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets.

Issue is it was erasing the source which doesn't get passed back to the main draw function, so we should be setting m_from_target to null because it is linked.

GS/HW: Update manual deswizzle detection.
Check if a draw is either a palette or 32bit depth format, also check for swizzle format is 16 or 32bit.
Expand/update quadrant detection, use the quadrant size of what it should be from the page size and compare it to the actual quadrant size from the vertex positions.

Rationale behind Changes

Crash fixes.
Fixes Stolen crashing and swizzle issues.
Fixes #13348

Suggested Testing Steps

Test mentioned games/issues with the dumps provided, test some other random stuff, dump run no issues.
Dump to crash test:
Stolen_SLUS-21099_20250916221711.gs.zip
Enthusia Professional Racing_SLES-53125_20251005045009.gs.zip

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

No.

Stolen comparison:
image

Copy link
Copy Markdown
Contributor

@kamfretoz kamfretoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes crashing on both Enthusia and Stolen dump.

@lightningterror lightningterror force-pushed the gs_merge_targets_src_tar branch from 0e7432c to eca63fb Compare October 5, 2025 03:38
@lightningterror lightningterror changed the title GS/TC: Unset m_from_target if it's also a source in CombineAlignedInsideTargets. GS/TC: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets. Oct 5, 2025
@lightningterror lightningterror changed the title GS/TC: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets. GS/TC: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets, fix swizzle pickup for Stolen. Oct 5, 2025
@lightningterror lightningterror changed the title GS/TC: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets, fix swizzle pickup for Stolen. GS/HW: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets, fix swizzle pickup for Stolen. Oct 5, 2025
…bineAlignedInsideTargets.

Issue is it was erasing the source which doesn't get passed back to the main draw function,
so we should be setting m_from_target to either new target or null because it is linked.
@lightningterror lightningterror force-pushed the gs_merge_targets_src_tar branch from f3b1ddd to 884ef26 Compare October 7, 2025 03:27
@lightningterror lightningterror changed the title GS/HW: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets, fix swizzle pickup for Stolen. GS/HW: Point m_from_target to new target if it's also a source in CombineAlignedInsideTargets, update manual deswizzle. Oct 7, 2025
Check if a draw is either a palette or 32bit depth format, also check for swizzle format is 16 or 32bit.

Expand/update quadrant detection, use the quadrant size of what it should be
from the page size and compare it to the actual quadrant size from the vertex positions.
@lightningterror lightningterror force-pushed the gs_merge_targets_src_tar branch from 884ef26 to 70d8546 Compare October 7, 2025 03:33
Copy link
Copy Markdown
Member

@JordanTheToaster JordanTheToaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes aforementioned crashes and a handful of random games all look okay.

@lightningterror lightningterror merged commit 7ab6c62 into master Oct 7, 2025
22 checks passed
@lightningterror lightningterror deleted the gs_merge_targets_src_tar branch October 7, 2025 09:48
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.

[BUG]: [Vulkan] Crash (SIGSEGV) on Enthusia Professional Racing (Autumn Hill Track)

3 participants