pcsx2 icon indicating copy to clipboard operation
pcsx2 copied to clipboard

GS: Add slow path for odd width 4bpp host->local transfers

Open refractionpcsx2 opened this issue 2 years ago • 3 comments

Description of Changes

Adds a slow transfer path for 4BPP transfers which are misaligned,

Rationale behind Changes

The transfer systems in place in PCSX2 are designed to be fast, but work on aligned data. The main problem being, with 4bpp transfers, the smallest we can represent in C++ is 8bits, so each 8bit contains 2 pixels, so when the transfer width is an odd number, that means the end of a line and the start of the next are contained in the same 8bits, and this means the fast path will throw the order out, causing the data to drift.

This PR adds a slow path which does the transfer pixel by pixel, but only when the widths are misaligned, since it's faster the other way, if we can.

Suggested Testing Steps

If you know any games with weirdly misshapen textures (kinda like a rhombus), then this will probably fix it.

Known to fix the GT3 Demo. Fixes #3228 Fixes Jak 2 Renegate Japanese subtitles. Fixes #6581 Fixes Baldur's Gate: Dark Alliance messed up minimap.

refractionpcsx2 avatar Aug 09 '22 21:08 refractionpcsx2

Jak 2 Renegade:

Before

image

After:

image

GT3 Demo:

Before: image

After: image

refractionpcsx2 avatar Aug 09 '22 21:08 refractionpcsx2

Baldur's Gate: Dark Alliance: Fixes skewed minimap in certain areas.

Before: BGDA-Map1-Master

After: BGDA-Map1-PR

Before: BGDA-Map2-Master

After: BGDA-Map2-PR

Dreadmoth avatar Aug 10 '22 06:08 Dreadmoth

Oh wow, I didn't even know that was a problem! Thanks! :D

refractionpcsx2 avatar Aug 10 '22 06:08 refractionpcsx2

Known to fix the GT3 Demo. Fixes #3228

It's GREAT to see the oldest issues being fixed. Keep it up. :+1:

Felipefpl avatar Aug 10 '22 14:08 Felipefpl