GS:SW: Use doubles for Z#6033
Conversation
6507087 to
5fff6c8
Compare
|
Speed losses on games which are fixed by this PR: Random other game speed losses: NFS MW was identical speeds (within margin of error) Potential issues to make note of or test things from Meta: #3692 Individual issues: |
|
This Pull Request works just fine with the majority of games I tested on. However, theoretically, this float->to double approach might not be enough if a game abuse the floating-point arithmetic precision (kind of like what we have on the VUs or the COP1). I have 2 questions regarding that: Does the GS have a wider range of floats and/or follow the IEEE 754 standard for this? And will a soft-float approach, be considered in the future even if, it will likely be very,very slow? |
|
Improves Quake 3 2022-05-08.13-22-17-1.mp4PR: 2022-05-08.13-26-29-1.mp4 |
|
Hasbro Family Game Night is also fixed, the game table does not exhibit weird artifacts as seen in the issue report (#2289): With the PR: hasbro.mp4 |
|
@githubribbon45
Not a scenario that exists (explained below)
The GS doesn't use floats, it's completely integer (using 12.4 FIxed integers at most) (except for Q/ST values), we use floats for speed and convenience of interpolating coordinates. However the Q/ST values are generally within a very small range, unless something has gone very wrong.
No need here because of above. |
|
Sonic Hero's no longer has Z fighting during the opening gameplay. |
|
Ridge Racer 5's shine is back in software mode so #5575 is fixed. |
|
This pr seems to break game "Trapt". Initial screens are not visible in SW mode. Block dump attached. |
|
Trapt should be fixed |
62ab628 to
7bd2314
Compare
|
Yeah, only SW |
|
cool, thanks for the clarification :) |
5e7ed38 to
3ee73df
Compare
a7aecfc to
b92d3fa
Compare
…rrangement Note: Removes zequal. DoubleZ will fix, but until then things will break
By that point, xy is what's being used to advance the scanline and won't be needed as a parameter
Improves compiler optimization





Description of Changes
Makes the SW renderer use doubles for Z
Has a noticeable (~3%) performance hit, so leaving this a draft for now, will only use it for large z values in the futureI think we've gotten performance to an acceptable levelRationale behind Changes
Reduce Z fighting
Suggested Testing Steps
Test KOF, other zequal games / games with z fighting