Skip to content

GS-HW: Improve Local->Host and preload accuracy. Per channel dirtying targets.#8249

Merged
refractionpcsx2 merged 3 commits intomasterfrom
gs_improvedownloadpreload
Feb 26, 2023
Merged

GS-HW: Improve Local->Host and preload accuracy. Per channel dirtying targets.#8249
refractionpcsx2 merged 3 commits intomasterfrom
gs_improvedownloadpreload

Conversation

@refractionpcsx2
Copy link
Copy Markdown
Member

@refractionpcsx2 refractionpcsx2 commented Feb 25, 2023

Description of Changes

Improves the local memory invalidation skipping, and target selection for invalidation, but also fixes some bugs with preloading memory in to target.

Also support per channel dirtying of target textures.

Rationale behind Changes

This wasn't quite right, there were edge cases and it was a bit fast and loose in some scenarios, this tries to be heuristically more accurate.
Some games also update just alpha channels on a 32bit colour, and previously we'd wipe out the RGB also and load it from local memory, this would of course load in garbage, so now it will attempt to only reload the necessary channels.

Overlap check also needed a fix as if the start and end pixel are within the same page, it's entirely possible due to the PS2 memory swizzling that the start block is higher than the end block, which will cause the validation check to fail, so now I check if they are within a page apart, if so then swap them.

Suggested Testing Steps

Test games with readbacks (From Software games, Dog's Life, Busin 0, Ratchet Gladiator, Chaos Legion, Red Faction 2, SOCOM 2, Final Fantasy X, Kingdom Hearts 2, though I have briefly tested these myself), plus general stuff in terms of the dirtying.

Fixes Dog's Life regression with smell-o-vision (Download invalidation stuff)
Fixes #914 Ratchet & Clank pause screen background (Preload changes)
Fixes RTX Red Rock menu and textures (Dirty channels)
Fixes Driving Emotion Type S overlay properly (Dirty channels) will require further upscaling fixes to make it look good.
Fixes #4086 X-Men Wolverine black bars on the picture (Dirty channels), not 100% right, but good enough.
Fixes #5750 Shadow Hearts 2 flickering cutscenes. Not quite sure which, possibly the GS Download behaviour.
Fixes regression on Kingdom Hearts 2 (Overlap fix)

might fix Eternal Ring textures.

Ratchet & Clank pause screen:
image

Eternal Ring textures:
image

Driving Emotion Type-S:

Master:
image

PR:
image

RTX Red Rock:

Master:
image

PR:
image

Ingame looks good too! :)
image

X-Men Wolverine:

Master:
image

PR:
image

@refractionpcsx2 refractionpcsx2 force-pushed the gs_improvedownloadpreload branch 3 times, most recently from c7246bc to 17f07c1 Compare February 25, 2023 10:24
@refractionpcsx2 refractionpcsx2 changed the title GS-HW: Improve Local->Host and preload accuracy. GS-HW: Improve Local->Host and preload accuracy. Per channel dirtying targets. Feb 25, 2023
@refractionpcsx2 refractionpcsx2 force-pushed the gs_improvedownloadpreload branch from 17f07c1 to 2f750de Compare February 25, 2023 10:50
@refractionpcsx2 refractionpcsx2 force-pushed the gs_improvedownloadpreload branch from 09c48e1 to 1ef7bb4 Compare February 26, 2023 00:04
@refractionpcsx2 refractionpcsx2 merged commit 6bcaef9 into master Feb 26, 2023
@refractionpcsx2 refractionpcsx2 deleted the gs_improvedownloadpreload branch February 26, 2023 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants