Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GS: Add optimisations for common GIF transfer sequences #10030

Closed
wants to merge 1 commit into from

Conversation

refractionpcsx2
Copy link
Member

@refractionpcsx2 refractionpcsx2 commented Sep 25, 2023

Description of Changes

Attempt to optimise the flow of incoming data for the GS

Rationale behind Changes

Doing this in a custom fashion is in theory faster than doing it one by one. Not all paths covered but some common ones.

Suggested Testing Steps

Benchmark random games, see if there's any performance difference over a few runs.

@Danke-Boi
Copy link

Still want testing? And any idea what games would be significantly affected by this pr?

@refractionpcsx2
Copy link
Member Author

Still want testing? And any idea what games would be significantly affected by this pr?

Thanks, I'm just not sure at the moment, it still has this weird performance problem, and I'm not sure why at the moment. I should probably set this to draft.

@refractionpcsx2 refractionpcsx2 marked this pull request as draft September 27, 2023 17:35
@refractionpcsx2 refractionpcsx2 marked this pull request as ready for review October 3, 2023 01:35
@refractionpcsx2
Copy link
Member Author

refractionpcsx2 commented Oct 3, 2023

This is no longer slower than master, is consistently the same or faster by a 0-15fps, depending on local testing.

pcsx2/GS/GSRegs.h Outdated Show resolved Hide resolved
pcsx2/GS/GSRegs.h Outdated Show resolved Hide resolved
pcsx2/GS/GSState.cpp Outdated Show resolved Hide resolved
@refractionpcsx2 refractionpcsx2 force-pushed the gs_transferopts branch 4 times, most recently from 7b97251 to 04cfb77 Compare October 3, 2023 09:58
@refractionpcsx2
Copy link
Member Author

I have done some other small optimisations here, be aware this will likely only improve games where you are GS limited, so probably easier to tell with GS dumps

@bigol83
Copy link

bigol83 commented Oct 3, 2023

Did a couple of tests with MGS3 and Jak 1 main menu demo.

MGS3 intro is more or less the same speed, while Jak 1 is quite a bit slower with PR compared to Master. This test has been done with 3x resolution.

jak

@refractionpcsx2
Copy link
Member Author

can you make sure you do a couple of runs, as there seems to be some variance in my tests :/

@bigol83
Copy link

bigol83 commented Oct 3, 2023

Will do later during the day.

@refractionpcsx2
Copy link
Member Author

Thanks, appreciate it

@bigol83
Copy link

bigol83 commented Oct 3, 2023

Three runs of the same Jak 1 main menu demo

First run
first pass

Second run
second pass

Third run
third pass

All three times PR is slower than Master

@refractionpcsx2
Copy link
Member Author

Can you try it again once the build finishes? there was some minor changes, not sure how it will affect it.. one run is fine. if you can upload a GS dump if it is still worse, then I can test it on my end

@bigol83
Copy link

bigol83 commented Oct 3, 2023

No problem, will do.

@refractionpcsx2
Copy link
Member Author

One nice boost from the last commit

image
image

@bigol83
Copy link

bigol83 commented Oct 3, 2023

These are the results with the latest commits

jak

It's better now, but still a bit slower with PR compared to latest Master.

MGS3 is now slightly faster on PR compared to Master
mgs3

Copy link
Contributor

@lightningterror lightningterror left a comment

Choose a reason for hiding this comment

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

A few new compiler warnings that can be taken care of as well
https://github.com/PCSX2/pcsx2/actions/runs/6394096438/job/17354760340?pr=10030#step:12:692

@refractionpcsx2 refractionpcsx2 marked this pull request as draft October 7, 2023 11:03
@refractionpcsx2 refractionpcsx2 force-pushed the gs_transferopts branch 2 times, most recently from 1688c8f to b2a1f62 Compare October 7, 2023 11:34
@refractionpcsx2 refractionpcsx2 marked this pull request as ready for review October 8, 2023 15:32
Copy link
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.

Some Benchmark results as of v1.7.5095 as the point of comparison:
Tested at Native.

Crash Twinsanity

CapFrameX_KEbqyhpf52

Spongebob - Creature From the Krusty Krab

CapFrameX_ja1ISy1iRN

Pac-Man World Rally

CapFrameX_0fuRFl5W33

Keroro Gunso - Mero Mero Battle Royale

CapFrameX_57eLKOMdwb

GTA - Liberty City Stories

CapFrameX_d5SKDJFE8W

Crash - Wrath of Cortex

CapFrameX_HTrPR4kPTg

WALL - E

CapFrameX_OjZV2BRgWm

Downhill Domination

CapFrameX_H7Ppb1FGsv

Copy link
Contributor

@lightningterror lightningterror left a comment

Choose a reason for hiding this comment

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

Looks clean now, didn't test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants