pcsx2 icon indicating copy to clipboard operation
pcsx2 copied to clipboard

GS/HW: Add ROV based blending/colclip/fbmask/afail for DX11/DX12

Open stenzek opened this issue 2 years ago • 15 comments

Description of Changes

Not ready for widespread use, here for testing.

  • [x] Make dx11/dx12 not break if the gpu doesn't support rov
  • [x] Port across to vulkan renderer with fragment shader interlock
  • [ ] Optimization and address all the TODOs I left in comments

Rationale behind Changes

ROV can be pretty fast in some games. Plus AFAIL handling isn't double pass.

Suggested Testing Steps

None yet.

Fixes Hot Shots FORE Golf/Everybody's Golf menus, Fixes #1499 Fixes #3876 Fixes #3350

stenzek avatar Dec 22 '22 13:12 stenzek

Fixes the shadows part of #6839

image

JordanTheToaster avatar Dec 22 '22 13:12 JordanTheToaster

Makes Hot Shots Golf worse, I think the condition/problem has actually been inverted, as you can see from the screenshot, the "blotches" which shouldn't be there, are all that's there lol

DX12: image

Vulkan: image

SW: image

Dump: Hot Shots Golf FORE! ate depth.zip

refractionpcsx2 avatar Dec 22 '22 15:12 refractionpcsx2

This problem from The Suffering was said to be an Alpha test/Depth problem but I can't remember the condition to what's happening, but for prosperity that doesn't work either

DX12: image

SW: image

Dump: SufferingATE.zip

refractionpcsx2 avatar Dec 22 '22 15:12 refractionpcsx2

Slight update, I need to do "Maximum" blending to get Hot shots to work, and it is fixed like that

image

refractionpcsx2 avatar Dec 22 '22 19:12 refractionpcsx2

Slight update, I need to do "Maximum" blending to get Hot shots to work, and it is fixed like that

image

Can you please check the PAL version of Hot Shots Golf Fore! as well?

Single Frame GS-Dump: Everybody's Golf_SCES-52582_20221222213239.zip

GitHub-Khi avatar Dec 22 '22 20:12 GitHub-Khi

image

refractionpcsx2 avatar Dec 22 '22 20:12 refractionpcsx2

This is huge for games like SSX and Black, which need Full blending for proper emulation in HW.

On Vulkan, the fastest renderer for both games in master, SSX goes from 46 to 64 fps (6x native) and Black from 51 to 91 fps (6x native).

DonelBueno avatar Jan 16 '23 21:01 DonelBueno

DX12 crashes with sharpening enabled (non rov gpu), also noticed this in the logs. [ 46.0960] C:\GitHub\master-pcsx2\pcsx2\bin\0(248,32): warning X4000: use of potentially uninitialized variable (FxaaPixelShader)

lightningterror avatar Jan 28 '23 16:01 lightningterror

These are several gsdumps from MGS3 intro first few minutes at default settings showing graphic glitches in Hardware rendering, even at native resolution.

Metal Gear Solid 3 - Snake Eater_SLES-82024_20230513010045.gs.zip Metal Gear Solid 3 - Snake Eater_SLES-82024_20230513010147.gs.zip Metal Gear Solid 3 - Snake Eater_SLES-82024_20230513010203.gs.zip Metal Gear Solid 3 - Snake Eater_SLES-82024_20230513010301.gs.zip Metal Gear Solid 3 - Snake Eater_SLES-82024_20230513010806.gs.zip Metal Gear Solid 3 - Snake Eater_SLES-82024_20230513010937.gs.zip Metal Gear Solid 3 - Snake Eater_SLES-82024_20230513010951.gs.zip

I just tested Vulkan, dx11 and dx12 and they all seem to have the same issues. I took the dumps with Vulkan renderer and switched to software to see the difference.

bigol83 avatar May 12 '23 23:05 bigol83

@stenzek - Do you need more tests with the golf games?

Uzarkis avatar Oct 25 '23 00:10 Uzarkis

No, and please stop posting/bumping PRs.

stenzek avatar Oct 25 '23 00:10 stenzek

With the latest commits there is a big improvement to some graphics issues i noticed in MGS3 but there are still some kind of random red flashes with DX11. DX12 and every other renderer is good.

Metal Gear Solid 3 - Snake Eater_SLES-82024_20240512044023.gs.zip

bigol83 avatar May 12 '24 02:05 bigol83

Not really concerned about DX11, I'll probably drop the ROV path for DX11 prior to merging. It's much slower than DX12.

stenzek avatar May 12 '24 04:05 stenzek

Come to think about it. Why is dx11 still supported? Didn’t windows 10 ship with dx12?

seta-san avatar May 13 '24 13:05 seta-san

Come to think about it. Why is dx11 still supported? Didn’t windows 10 ship with dx12?

Because not everyone has a new enough card to use Vulkan so they have to use DX11 such as every Intel iGPU pre Xe Nvidia Fermi and Kepler and AMD GCN 3 and older.

JordanTheToaster avatar May 13 '24 13:05 JordanTheToaster