-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Description
This is a proposal to replace the current TexIsFB system with a TexIsFB w/offset type system.
Reason
How it works currently
In the case of there being a channel/texture shuffle and the source is the same as the render target, PCSX2 will enable the TexIsFB feature, which basically forces the way it works to read and write to the exact same pixel, no questions asked, no exceptions, I believe this is a feature available in API's and it is a great application here.
The problem with this
However the drawback in this system is when the source position on said target is not the same as the destination, which is the case for games like Hitman Blood Money/Contracts, Death by Degrees, Stolen, Ghost in the Shell and possibly others, where they use the same target, but they've stuffed the data they want in the top left corner, or they have an image offset to the bottom right. In these cases we have to make a temp target, copy the data the draw wants, and offset it to match the position of the draw, which is slow, inefficient, and just a workaround for this problem (which I introduced admittedly with RT in RT support, I had enough on my plate).
What I'm proposing
Adding/replacing TexIsFB with a TexIsFB-like system which still does the lookup based on the current XY drawing position, but also providing an XY offset, be it negative, or positive. We already provide an offset for Tex in RT conditions, so we could reuse the same offset information for this. In theory this should work in basically the same way as TexIsFB but provides an amount of flexibility.
It might be that TexIsFB (as it is) is faster, so this might be an idea as an additional mode, rather than a replacement, that kind of thing would need to be benchmarked, especially for games like Jak and Daxter, which it was implemented for.
It may be that it's not actually using the TexIsFB feature, so it might be just a case of ripping out the RT in RT changes for shuffles that were added to the hazard checking and replacing it with an offset.
Examples
Example games I know which would benefit are
Death by Degrees
Ghost in the Shell (maybe)
Hitman Blood Money
Hitman Contracts
Stolen