dolphin/Source/Core
Scott Mansell 7128befb39 Fix copy filter clamping regression in Spyro
This fixes horizontal lines in the bloom effect of Spyro: A Hero's Tail,
which is a regression caused by PR #10204

Screenshot of regression:
https://user-images.githubusercontent.com/138484/142030503-90fcd8d5-63d3-4820-874a-72e9be0c4768.png

Fixed:
https://user-images.githubusercontent.com/138484/142031598-b85ff55c-1302-4e4d-bcb2-57848974056b.png

Spyro uses an 640x80 pixel sub-buffer within the EFB to calculate
it's bloom effects, which it places below the main 640x448 buffer.

EFB layout:
https://user-images.githubusercontent.com/138484/142030573-e933b6ae-c37e-4be6-86d4-0bc779b92535.png
Note: Colors are wrong because the main color buffer uses RGBA6,
      while the bloom is calculated in RGB8

This allows it to do bloom without backing up part of the EFB to
main memory, as most games do.

But, since some of the sub-buffers used in the bloom effect are taller
than 80 pixels, they need to be sliced up into smaller sub, sub buffers
which get combined later when copied to main memory.

At one point, a 320x224 buffer is broken up into 320x80, 320x64 and
320x80 slices. These are copied out with the copy filter set to a
vertical blur.

Because there was an off-by-one errror in the clamping coordinates,
the bottom line of the color buffer would be blurred into
the top of each slice.

Final combined EFB copy:
https://user-images.githubusercontent.com/138484/142031360-2c076839-7c96-4b3b-a093-d899d0a2c7ae.png

Fixed version:
https://user-images.githubusercontent.com/138484/142031370-72e41a35-3b3e-4662-a483-79203e357ecc.png

Before #10204 the copy filter wasn't enabled for efb copies, and most
other games don't do this type of slicing.

FIFO CI shows that a few other games are effected, it's always just a minor difference to the top line where there was previously a slight hint of garbage.
2021-11-17 06:12:46 +13:00
..
AudioCommon Merge pull request #10169 from leoetlino/fmt-localtime 2021-11-07 00:08:14 -04:00
Common Merge pull request #10208 from thatSteveFan/patch-1 2021-11-13 15:09:28 +01:00
Core DSP: Reword inappropriate references to Global User Directory 2021-11-14 22:55:50 +01:00
DiscIO Merge pull request #10184 from JosJuice/android-riivolution 2021-10-31 23:44:54 +01:00
DolphinNoGUI Add option for Never Hide Mouse Cursor 2021-10-12 21:04:27 -04:00
DolphinQt msbuild: use /external:anglebrackets 2021-11-15 00:33:51 -08:00
InputCommon Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
MacUpdater treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
UICommon Core, DolphinQt, UICommon: Fix all cases of -Wrange-loop-construct in gcc 11 2021-11-02 13:50:21 +01:00
UpdaterCommon Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
VideoBackends MoltenVK: Use an external project instead of a pre-compiled dylib 2021-11-13 11:43:23 -08:00
VideoCommon Fix copy filter clamping regression in Spyro 2021-11-17 06:12:46 +13:00
WinUpdater treewide: convert GPLv2+ license info to SPDX tags 2021-07-05 04:35:56 +02:00
CMakeLists.txt WinUpdater: Add CMakeLists.txt 2019-05-08 23:59:04 +02:00
DolphinLib.ARM64.props Implement ArmFPURoundMode.cpp 2021-04-25 15:56:19 +02:00
DolphinLib.props Core: Fix a -Wshadow warning in gcc 11 2021-11-02 13:50:21 +01:00
DolphinLib.vcxproj msbuild: Move DivUtils to DolphinLib.props 2021-08-31 22:48:07 -07:00
DolphinLib.vcxproj.user msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
DolphinLib.x64.props msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00