pcsx2
pcsx2 copied to clipboard
GS: Single dylib with all ISAs
Fixes one of the blockers on #4100
Note: Requires #4131 and #4658
Needs msbuild implementation, not sure how to set that up. You need to split GSdx into a main piece and the ISA-specific piece, which should be compiled once per isa in ["avx2", "avx", "sse4", "sse2"] and with the added define MULTI_ISA_UNSHARED_COMPILATION
. Finally, combine everything into one massive GSdx dll. In CMake I accomplished this by making static library targets for the ISA specific pieces and linking them with the main GSdx.
Details:
Does the dynamic split at the GSRenderer class, initializes a different GSRenderer depending on the ISA. I had to add an IGSRenderer
virtual-only interface as GSRenderer didn't seem like it would be easy to separate from its implementation details
I went around and rebased this PR to the latest constexpr changes master had EDIT: fixing the rebase as we speak, the pre rebase branch is available at https://github.com/PCSX2/pcsx2/tree/old-SingleGSdx EDIT2: rebase is now working
With the GS merge is this still useful, if so can we get a rebase.
Edit: also won't this be mostly obsoleted by #3579 and #3577.
Yes it's still useful and planned, no those won't make it obsolete, and yes it will be rebased when Tellow gets time, he has a lot of PR's to rebase and update since the merge, so he will get around to it when he can.
With the GS merge is this still useful
Yes, it was made specifically because GS merge was removing our previous method of selecting between SSE4 and AVX2
Edit: also won't this be mostly obsoleted by #3579 and #3577
I'd like to think I'm not dumb enough to PR a fix that's already been obsoleted by another PR that I made
can we get a rebase
This one's waiting for some cmake changes before it can be merged so I probably won't rebase it for a bit. We ended up deciding to use cmake for published builds on Windows to get this working there, which means that we need cmake builds working on Windows first
Now all the requirements are merged on this, maybe we can consider testing this and getting it ready?
Can’t wait for this one. One build!
For anyone wondering about the status of this, it's waiting until we figure out why cmake builds are slower than msbuild builds (even though they're using the same compiler...)
Since it would be pretty pointless to switch to a build that combines SSE4 and AVX2 but is slower than just giving everyone an SSE4 build
You could give a try doing a diff of the vcxproj files generated by cmake and those handcrafted, you should see some differences in the flags (probably due to how cmake interpret by default the Release mode vs how we do).
Which build is supposed to be tested if this combines sse4 and avx2?
Which build is supposed to be tested if this combines sse4 and avx2?
CMake (and compare its performance to an AVX2 build)
if anything i've found this build to be marginally faster. doing all testing with software renderer of course.