Skip to content

GS: Replace separate HW renderers with single shared renderer#5138

Merged
lightningterror merged 6 commits intoPCSX2:masterfrom
TellowKrinkle:SingleGSRenderer
Dec 19, 2021
Merged

GS: Replace separate HW renderers with single shared renderer#5138
lightningterror merged 6 commits intoPCSX2:masterfrom
TellowKrinkle:SingleGSRenderer

Conversation

@TellowKrinkle
Copy link
Copy Markdown
Member

@TellowKrinkle TellowKrinkle commented Dec 12, 2021

Description of Changes

Replaces GSRendererOGL and GSRendererDX11 with one shared GSRendererNew and a new RenderHW virtual method on GSDevice

Rationale behind Changes

  • Less split code
  • New renderers don't have to duplicate all 1500-ish lines of stuff that was in GSRendererOGL/GSRendererDX11. The replacement method in GSDevice is usually about 250 lines and much more straightforward.

Suggested Testing Steps

Please test DX11 and OGL renderers for regressions, I'm sure I accidentally broke stuff

Future Changes

  • Merge GSRendererNew and GSRendererHW (and make GSRendererHW final)

I want to delay this to give time for any existing forks of PCSX2 that have other renderers to migrate to the new interface and PR fixes for any issues that pop up in the process. Any existing GSRendererHW subclasses should continue to work until this is carried out.

@refractionpcsx2
Copy link
Copy Markdown
Member

Code-wise looks fine to me, of course pending testing and bug fixing (if any) :)

@lightningterror lightningterror added this to the Release 1.8 milestone Dec 13, 2021
@lightningterror
Copy link
Copy Markdown
Contributor

lightningterror commented Dec 15, 2021

Sly 2, Mission impossible, Crash twinsanity shadows are broken on gl, I'd check fbmask/colclip interaction.
Dumps.zip

@lightningterror
Copy link
Copy Markdown
Contributor

Channel shuffle on GT4 seems also pretty broken, both renderers.
GT4 - channel shuffle 2019.zip

@lightningterror
Copy link
Copy Markdown
Contributor

CS on terminator too.
terminator3_opaque_wall_1.zip

@TellowKrinkle
Copy link
Copy Markdown
Member Author

OpenGL-only issues should be fixed, it was me not properly incorporating the BlitRect change

I couldn't see any difference for the GT4 one, can you tell me what I'm supposed to be looking for?

@TellowKrinkle
Copy link
Copy Markdown
Member Author

Okay everything's fixed

@lightningterror
Copy link
Copy Markdown
Contributor

Even if DX11 doesn't support all modes we can just use the ones it does support from the enum
Copy link
Copy Markdown
Contributor

@Mrlinkwii Mrlinkwii left a comment

Choose a reason for hiding this comment

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

Works well

Copy link
Copy Markdown
Member

@JordanTheToaster JordanTheToaster left a comment

Choose a reason for hiding this comment

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

All good on my collection.

Copy link
Copy Markdown
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.

Dithering looks a bit wrong on dx11, feels like the dither matrix is wrong that we receive in shader, difference is a bit harder to spot but it's there.

edit: dither matrix is different between renderers so that could also be worth a check.

(rename to .7zip)
Castlevania_shadows.zip

Copy link
Copy Markdown
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.

Aside from the dithering issue, which will be fixed in a follow up commit all other dumps I tested seem fine.
Merge time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants