Merge branch 'PCSX2:master' into master

pull/11/head
987123879113 1 year ago committed by GitHub
commit e2d77dbdd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      .github/workflows/windows_build_qt.yml
  2. 8
      .github/workflows/windows_build_wx.yml
  3. 3
      README.md
  4. 150
      bin/resources/GameIndex.yaml
  5. 2
      bin/resources/game_controller_db.txt
  6. 2412
      bin/resources/shaders/common/ffx_a.h
  7. 1476
      bin/resources/shaders/common/ffx_cas.h
  8. 75
      bin/resources/shaders/dx11/cas.hlsl
  9. 64
      bin/resources/shaders/opengl/cas.glsl
  10. 71
      bin/resources/shaders/vulkan/cas.glsl
  11. 2
      cmake/SearchForStuff.cmake
  12. 50
      common/D3D12/Builders.cpp
  13. 22
      common/D3D12/Builders.h
  14. 86
      common/D3D12/ShaderCache.cpp
  15. 6
      common/D3D12/ShaderCache.h
  16. 127
      common/D3D12/Texture.cpp
  17. 15
      common/D3D12/Texture.h
  18. 11
      common/GL/Program.cpp
  19. 2
      common/GL/Program.h
  20. 175
      common/GL/ShaderCache.cpp
  21. 8
      common/GL/ShaderCache.h
  22. 4
      common/HTTPDownloaderWinHTTP.cpp
  23. 59
      common/Vulkan/Builders.cpp
  24. 31
      common/Vulkan/Builders.h
  25. 5
      common/Vulkan/Context.cpp
  26. 15
      common/Windows/WinMisc.cpp
  27. 6
      common/vsprops/QtCompile.props
  28. 31
      pcsx2-qt/MainWindow.cpp
  29. 5
      pcsx2-qt/MainWindow.h
  30. 17
      pcsx2-qt/QtHost.cpp
  31. 28
      pcsx2-qt/Settings/BIOSSettingsWidget.cpp
  32. 9
      pcsx2-qt/Settings/EmulationSettingsWidget.cpp
  33. 94
      pcsx2-qt/Settings/GraphicsSettingsWidget.cpp
  34. 1
      pcsx2-qt/Settings/GraphicsSettingsWidget.h
  35. 589
      pcsx2-qt/Settings/GraphicsSettingsWidget.ui
  36. 23
      pcsx2/CDVD/CDVD_internal.h
  37. 2
      pcsx2/CDVD/CDVDcommon.cpp
  38. 1
      pcsx2/CMakeLists.txt
  39. 22
      pcsx2/Config.h
  40. 2
      pcsx2/Frontend/Achievements.cpp
  41. 21
      pcsx2/Frontend/CommonHotkeys.cpp
  42. 4
      pcsx2/Frontend/D3D12HostDisplay.cpp
  43. 42
      pcsx2/Frontend/FullscreenUI.cpp
  44. 36
      pcsx2/Frontend/GameList.cpp
  45. 1
      pcsx2/Frontend/GameList.h
  46. 2
      pcsx2/Frontend/ImGuiFullscreen.cpp
  47. 65
      pcsx2/GS/GS.cpp
  48. 2
      pcsx2/GS/GS.h
  49. 10
      pcsx2/GS/GSState.cpp
  50. 3
      pcsx2/GS/GSState.h
  51. 113
      pcsx2/GS/Renderers/Common/GSDevice.cpp
  52. 21
      pcsx2/GS/Renderers/Common/GSDevice.h
  53. 95
      pcsx2/GS/Renderers/Common/GSRenderer.cpp
  54. 1
      pcsx2/GS/Renderers/Common/GSTexture.h
  55. 58
      pcsx2/GS/Renderers/DX11/GSDevice11.cpp
  56. 12
      pcsx2/GS/Renderers/DX11/GSDevice11.h
  57. 8
      pcsx2/GS/Renderers/DX11/GSTexture11.cpp
  58. 2
      pcsx2/GS/Renderers/DX11/GSTexture11.h
  59. 77
      pcsx2/GS/Renderers/DX12/GSDevice12.cpp
  60. 11
      pcsx2/GS/Renderers/DX12/GSDevice12.h
  61. 19
      pcsx2/GS/Renderers/DX12/GSTexture12.cpp
  62. 2
      pcsx2/GS/Renderers/DX12/GSTexture12.h
  63. 60
      pcsx2/GS/Renderers/HW/GSRendererHW.cpp
  64. 5
      pcsx2/GS/Renderers/HW/GSRendererHW.h
  65. 91
      pcsx2/GS/Renderers/HW/GSTextureCache.cpp
  66. 5
      pcsx2/GS/Renderers/HW/GSTextureCache.h
  67. 7
      pcsx2/GS/Renderers/Metal/GSDeviceMTL.h
  68. 62
      pcsx2/GS/Renderers/Metal/GSDeviceMTL.mm
  69. 1
      pcsx2/GS/Renderers/Metal/GSMTLDeviceInfo.h
  70. 4
      pcsx2/GS/Renderers/Metal/GSMTLDeviceInfo.mm
  71. 8
      pcsx2/GS/Renderers/Metal/GSMTLSharedHeader.h
  72. 112
      pcsx2/GS/Renderers/Metal/cas.metal
  73. 96
      pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp
  74. 13
      pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.h
  75. 4
      pcsx2/GS/Renderers/SW/GSRendererSW.cpp
  76. 3
      pcsx2/GS/Renderers/SW/GSRendererSW.h
  77. 125
      pcsx2/GS/Renderers/Vulkan/GSDeviceVK.cpp
  78. 9
      pcsx2/GS/Renderers/Vulkan/GSDeviceVK.h
  79. 18
      pcsx2/GS/Renderers/Vulkan/GSTextureVK.cpp
  80. 48
      pcsx2/GS/Window/GSwxDialog.cpp
  81. 2
      pcsx2/GameDatabase.cpp
  82. 7
      pcsx2/Host.h
  83. 5
      pcsx2/MTGS.cpp
  84. 1
      pcsx2/MTVU.h
  85. 13
      pcsx2/MemoryCardFile.cpp
  86. 6
      pcsx2/MemoryCardFolder.cpp
  87. 2
      pcsx2/PAD/Host/PAD.h
  88. 12
      pcsx2/Pcsx2Config.cpp
  89. 35
      pcsx2/SaveState.h
  90. 73
      pcsx2/Sio.cpp
  91. 5
      pcsx2/Sio.h
  92. 5
      pcsx2/System.cpp
  93. 34
      pcsx2/VMManager.cpp
  94. 32
      pcsx2/ps2/BiosTools.cpp
  95. 3
      pcsx2/x86/microVU.cpp

@ -9,7 +9,7 @@ on:
os:
required: false
type: string
default: windows-2019
default: windows-2022
platform:
required: false
type: string
@ -28,11 +28,11 @@ on:
qt_binary_url:
required: false
type: string
default: https://github.com/PCSX2/pcsx2-windows-dependencies/releases/download/2022-07-24/qt-6.3.1-x64.7z
default: https://github.com/PCSX2/pcsx2-windows-dependencies/releases/download/2022-11-20/qt-6.4.0-x64.7z
qt_dir:
required: false
type: string
default: 3rdparty\qt\6.3.1\msvc2022_64
default: 3rdparty\qt\6.4.0\msvc2022_64
cheats_url:
required: false
type: string
@ -91,14 +91,14 @@ jobs:
id: cmake
shell: cmd
run: |
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake . -B build "-DCMAKE_PREFIX_PATH=%cd%\${{ inputs.qt_dir }}" -DQT_BUILD=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -G Ninja
- name: Build PCSX2
shell: cmd
run: |
if "${{ inputs.configuration }}"=="CMake" (
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake --build build --config Release || exit /b
cmake --install build --config Release || exit /b
) else (

@ -9,7 +9,7 @@ on:
os:
required: false
type: string
default: windows-2019
default: windows-2022
platform:
required: false
type: string
@ -76,7 +76,7 @@ jobs:
shell: cmd
run: |
if "${{ inputs.platform }}"=="Win32" (SET vcvars=vcvarsamd64_x86.bat) else (SET vcvars=vcvars64.bat)
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\%vcvars%"
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\%vcvars%"
echo vcvars=%vcvars%>> %GITHUB_OUTPUT%
cmake . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -G Ninja
@ -84,7 +84,7 @@ jobs:
shell: cmd
run: |
if "${{ inputs.configuration }}"=="CMake" (
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
cmake --build build --config Release || exit /b
cp build/pcsx2/pcsx2* bin/
) else (
@ -95,7 +95,7 @@ jobs:
if: inputs.configuration == 'CMake'
shell: cmd
run: |
call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\${{ steps.cmake.outputs.vcvars }}"
cmake --build build --config Release --target unittests
- name: Upload artifact

@ -38,9 +38,8 @@ _Note: Recommended GPU is based on 3x Internal, ~1080p resolution requirements.
- You need the [Visual C++ 2019 x64 Redistributables](https://support.microsoft.com/en-us/help/2977003/) to run PCSX2.
- Windows XP and Direct3D9 support was dropped after stable release 1.4.0.
- Windows 7 and Windows 8.0 support was dropped after stable release 1.6.0.
- Windows 7, Windows 8.0, and Windows 8.1 support was dropped after stable release 1.6.0.
- 32-bit support was dropped after stable release 1.6.0.
- The Qt version is only supported on Windows 10 or newer, Ubuntu/Debian 20.04 or equivalent and newer.
- Make sure to update your operating system and drivers to ensure you have the best experience possible. Having a newer GPU is also recommended so you have the latest supported drivers.
- Because of copyright issues, and the complexity of trying to work around it, you need a BIOS dump extracted from a legitimately-owned PS2 console to use the emulator. For more information about the BIOS and how to get it from your console, visit [this page](pcsx2/Docs/PCSX2_FAQ.md#question-13-where-do-i-get-a-ps2-bios).
- PCSX2 uses two CPU cores for emulation by default. A third core can be used via the MTVU speed hack, which is compatible with most games. This can be a significant speedup on CPUs with 3+ cores, but it may be a slowdown on GS-limited games (or on CPUs with fewer than 2 cores). Software renderers will then additionally use however many rendering threads it is set to and will need higher core counts to run efficiently.

@ -172,7 +172,6 @@ PAPX-90517:
region: "NTSC-J"
gsHWFixes:
autoFlush: 1 # Reduces post-processing misalignment.
roundSprite: 2 # Reduces post-processing misalignment.
PBGP-0061:
name: "Suika A.S+ Eternal Name [First Press Limited Edition]"
region: "NTSC-J"
@ -1240,6 +1239,9 @@ SCAJ-20158:
region: "NTSC-Unk"
gameFixes:
- VIF1StallHack # Fixes black screen on boot.
gsHWFixes:
autoFlush: 1 # Fixes missing bloom effects.
halfPixelOffset: 2 # Fixes misaligned lighting and bloom.
SCAJ-20159:
name: "Soul Calibur III"
region: "NTSC-Ch"
@ -1801,6 +1803,7 @@ SCED-50642:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SCED-50675:
name: "Official PlayStation 2 Magazine Demo 16"
region: "PAL-M5"
@ -1870,6 +1873,7 @@ SCED-50907:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SCED-50945:
name: "Official PlayStation 2 Magazine Demo 20"
region: "PAL-M5"
@ -2893,6 +2897,7 @@ SCES-50490:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SCES-50491:
name: "Final Fantasy X"
region: "PAL-F"
@ -2900,6 +2905,7 @@ SCES-50491:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SCES-50492:
name: "Final Fantasy X"
region: "PAL-G"
@ -2908,6 +2914,7 @@ SCES-50492:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters..
SCES-50493:
name: "Final Fantasy X"
region: "PAL-I"
@ -2915,6 +2922,7 @@ SCES-50493:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SCES-50494:
name: "Final Fantasy X"
region: "PAL-S"
@ -2922,6 +2930,7 @@ SCES-50494:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SCES-50499:
name: "Ecco the Dolphin - Defender of the Future"
region: "PAL-M5"
@ -5762,7 +5771,6 @@ SCPS-15066:
region: "NTSC-J"
gsHWFixes:
autoFlush: 1 # Reduces post-processing misalignment.
roundSprite: 2 # Reduces post-processing misalignment.
SCPS-15067:
name: "Dokodemo Issyo - Toro to Nagare Boshi"
region: "NTSC-J"
@ -7005,6 +7013,8 @@ SCUS-97132:
name: "Kinetica"
region: "NTSC-U"
compat: 5
gsHWFixes:
roundSprite: 1 # Fixes vertical lines and minor ghosting.
SCUS-97133:
name: "Getaway, The"
region: "NTSC-U"
@ -7123,6 +7133,8 @@ SCUS-97160:
SCUS-97161:
name: "Kinetica [Demo]"
region: "NTSC-U"
gsHWFixes:
roundSprite: 1 # Fixes vertical lines and minor ghosting.
SCUS-97163:
name: "Jampack Demo Disc - Winter 2001"
region: "NTSC-U"
@ -7865,6 +7877,8 @@ SCUS-97405:
name: "ATV Offroad Fury 3"
region: "NTSC-U"
compat: 5
speedHacks:
MTVUSpeedHack: 0 # Increases FPS drastically.
SCUS-97406:
name: "Jampack Demo Disc Vol.10 - Summer 2004 [M-Rated]"
region: "NTSC-U"
@ -8016,6 +8030,8 @@ SCUS-97436:
SCUS-97437:
name: "ATV Offroad Fury 3 [Demo]"
region: "NTSC-U"
speedHacks:
MTVUSpeedHack: 0 # Increases FPS drastically.
SCUS-97438:
name: "EyeToy - Antigrav [Demo]"
region: "NTSC-U"
@ -8378,6 +8394,8 @@ SCUS-97513:
SCUS-97514:
name: "ATV Offroad Fury 3 [Greatest Hits]"
region: "NTSC-U"
speedHacks:
MTVUSpeedHack: 0 # Increases FPS drastically.
SCUS-97515:
name: "Hot Shots Golf FORE! [Greatest Hits]"
region: "NTSC-U"
@ -9064,6 +9082,9 @@ SLED-51225:
SLED-51281:
name: "Haven - Call of the King [Demo]"
region: "PAL-E"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLED-51342:
name: "FIFA Soccer 2003 [Demo]"
region: "PAL-E"
@ -9135,6 +9156,7 @@ SLED-52852:
vuClampMode: 3 # Removes occasional SPS where the head goes into nightmare fuel.
gsHWFixes:
halfPixelOffset: 1 # Reduces ghosting.
roundSprite: 1 # Reduces ghosting even more.
SLED-52875:
name: "Sega Superstars [Demo]"
region: "PAL-E"
@ -9163,6 +9185,11 @@ SLED-53083:
region: "PAL-M5"
clampModes:
vuClampMode: 3 # Fixes lighting on character models as caves and other locations don't turn mobs into glow-in-the-dark creatures by themselves.
SLED-53097:
name: "Worms 4 - Mayhem [Demo]"
region: "PAL-M5"
gameFixes:
- BlitInternalFPSHack # Fixes internal FPS detection.
SLED-53109:
name: "Juiced [Demo]"
region: "PAL-M5"
@ -10555,6 +10582,9 @@ SLES-50591:
SLES-50592:
name: "No One Lives Forever"
region: "PAL-M5"
gsHWFixes:
mipmap: 2 # Fixes miptrick texture effects.
trilinearFiltering: 1 # Fixes miptrick blending and also needs Full Blending to fix the lighting.
SLES-50606:
name: "State of Emergency"
region: "PAL-M4"
@ -11894,6 +11924,9 @@ SLES-51209:
name: "Haven - Call of the King"
region: "PAL-M5"
compat: 5
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-51214:
name: "Harry Potter og Hemmelighedernes Kammer"
region: "PAL-D"
@ -12991,6 +13024,7 @@ SLES-51755:
name: "Disney-Pixar's Finding Nemo"
region: "PAL-E"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-51756:
name: "Batman - Rise of Sin Tzu"
@ -13276,17 +13310,20 @@ SLES-51870:
name: "Disney-Pixar's Finding Nemo"
region: "PAL-FI-S"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-51871:
name: "Disney-Pixar's Finding Nemo"
region: "PAL-F-G"
compat: 5
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-51872:
name: "Disney-Pixar's Finding Nemo"
region: "PAL-M3"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-51873:
name: "Medal of Honor - Rising Sun"
@ -13360,6 +13397,9 @@ SLES-51906:
SLES-51907:
name: "Disney-Pixar Alla Ricerca di Nemo"
region: "PAL-I"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-51908:
name: "Van Helsing"
region: "PAL-M5"
@ -13411,7 +13451,6 @@ SLES-51918:
compat: 5
gsHWFixes:
autoFlush: 1 # Reduces post-processing misalignment.
roundSprite: 2 # Reduces post-processing misalignment.
SLES-51924:
name: "World War Zero - Ironstorm"
region: "PAL-M5"
@ -13499,12 +13538,14 @@ SLES-51959:
SLES-51960:
name: "Disney-Pixar À Procura de Nemo"
region: "PAL-P"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLES-51961:
name: "Prince of Persia - The Sands of Time" # Pre-order Demo
region: "PAL-E"
gsHWFixes:
autoFlush: 1 # Reduces post-processing misalignment.
roundSprite: 2 # Reduces post-processing misalignment.
SLES-51963:
name: "FIFA 2004"
region: "PAL-F-G"
@ -14637,6 +14678,10 @@ SLES-52533:
SLES-52534:
name: "Crimson Tears"
region: "PAL-M3"
gsHWFixes:
wildArmsHack: 1 # Fixes blurriness.
roundSprite: 2 # Reduces misalignment bloom effects.
# deinterlace: 6 # Game requires blend tff deinterlacing when auto for 'fixing' shimmer on character models and more flickering or half weaved, though the game suffers from the field order.
SLES-52535:
name: "Rumble Roses"
region: "PAL-M5"
@ -15039,6 +15084,7 @@ SLES-52669:
vuClampMode: 3 # Removes occasional SPS where the head goes into nightmare fuel.
gsHWFixes:
halfPixelOffset: 1 # Reduces ghosting.
roundSprite: 1 # Reduces ghosting even more.
SLES-52670:
name: "Second Sight"
region: "PAL-M5"
@ -16108,6 +16154,8 @@ SLES-53096:
name: "Worms 4 - Mayhem"
region: "PAL-M5"
compat: 5
gameFixes:
- BlitInternalFPSHack # Fixes internal FPS detection.
SLES-53098:
name: "Conspiracy - Weapons of Mass Destruction"
region: "PAL-M5"
@ -16890,6 +16938,8 @@ SLES-53484:
SLES-53485:
name: "Car Racing Challenge"
region: "PAL-E"
gameFixes:
- XGKickHack # Fixes distant car textures.
SLES-53487:
name: "Forty 4 Party"
region: "PAL-E"
@ -17757,6 +17807,8 @@ SLES-53753:
SLES-53754:
name: "ATV Offroad Fury 3"
region: "PAL-M6"
speedHacks:
MTVUSpeedHack: 0 # Increases FPS drastically.
SLES-53755:
name: "Castlevania - Curse of Darkness"
region: "PAL-M5"
@ -18968,6 +19020,9 @@ SLES-54305:
compat: 5
gameFixes:
- VIF1StallHack # Fixes black screen on boot.
gsHWFixes:
autoFlush: 1 # Fixes missing bloom effects.
halfPixelOffset: 2 # Fixes misaligned lighting and bloom.
SLES-54306:
name: "Cartoon Network Racing"
region: "PAL-E"
@ -19380,8 +19435,9 @@ SLES-54455:
region: "PAL-E"
gsHWFixes:
halfPixelOffset: 1 # Fixes misaligned bloom effects.
mergeSprite: 1 # Fixes blurriness but removes bloom.
mergeSprite: 1 # Fixes blurriness but removes bloom + Recommended to use Shadeboost brightness 80.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLES-54456:
name: "Beverly Hills Cop"
region: "PAL-M11"
@ -19547,6 +19603,7 @@ SLES-54516:
halfPixelOffset: 1 # Fixes misaligned bloom effects.
mergeSprite: 1 # Fixes blurriness but removes bloom + Recommended to use Shadeboost brightness 80.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLES-54517:
name: "Thrillville"
region: "PAL-M3"
@ -19554,6 +19611,7 @@ SLES-54517:
halfPixelOffset: 1 # Fixes misaligned bloom effects.
mergeSprite: 1 # Fixes blurriness but removes bloom + Recommended to use Shadeboost brightness 80.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLES-54518:
name: "Clumsy Shumsy"
region: "PAL-E"
@ -20273,12 +20331,14 @@ SLES-54806:
gsHWFixes:
halfPixelOffset: 2 # Fixes misaligned bloom effects, 1 is technically more correct compared to software but looks worse.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLES-54807:
name: "Thrillville - Off the Rails"
region: "PAL-F"
gsHWFixes:
halfPixelOffset: 2 # Fixes misaligned bloom effects, 1 is technically more correct compared to software but looks worse.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLES-54809:
name: "Charlotte's Web"
region: "PAL-A"
@ -20489,8 +20549,9 @@ SLES-54887:
name: "Thrillville - Verrückte Achterbahn"
region: "PAL-G"
gsHWFixes:
halfPixelOffset: 2 # Fixes misaligned bloom effects.
halfPixelOffset: 2 # Fixes misaligned bloom effects, 1 is technically more correct compared to software but looks worse.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLES-54888:
name: "Pro Biker 2"
region: "PAL-E"
@ -20844,14 +20905,16 @@ SLES-55010:
name: "Thrillville - Fuori dai Binari"
region: "PAL-I"
gsHWFixes:
halfPixelOffset: 2 # Fixes misaligned bloom effects.
halfPixelOffset: 2 # Fixes misaligned bloom effects, 1 is technically more correct compared to software but looks worse.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLES-55011:
name: "Thrillville - Fuera de Control"
region: "PAL-S"
gsHWFixes:
halfPixelOffset: 2 # Fixes misaligned bloom effects.
halfPixelOffset: 2 # Fixes misaligned bloom effects, 1 is technically more correct compared to software but looks worse.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLES-55012:
name: "Golden Compass, The"
region: "PAL-M5"
@ -22040,7 +22103,7 @@ SLES-55579:
clampModes:
vuClampMode: 0
gsHWFixes:
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing when auto for the FMVs.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the FMVs.
SLES-55581:
name: "FIFA 10"
region: "PAL-M5"
@ -22716,6 +22779,7 @@ SLKA-25056:
name: "Finding Nemo"
region: "NTSC-K"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLKA-25060:
name: "I.Q. Remix+ - Intelligent Qube"
@ -22893,7 +22957,6 @@ SLKA-25120:
region: "NTSC-K"
gsHWFixes:
autoFlush: 1 # Reduces post-processing misalignment.
roundSprite: 2 # Reduces post-processing misalignment.
SLKA-25122:
name: "Sonic Heroes"
region: "NTSC-K"
@ -23148,6 +23211,7 @@ SLKA-25214:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SLKA-25215:
name: "Shining Wind"
region: "NTSC-K"
@ -23248,6 +23312,7 @@ SLKA-25252:
vuClampMode: 3 # Removes occasional SPS where the head goes into nightmare fuel.
gsHWFixes:
halfPixelOffset: 1 # Reduces ghosting.
roundSprite: 1 # Reduces ghosting even more.
SLKA-25254:
name: "Digimon Rumble Arena 2"
region: "NTSC-K"
@ -23430,6 +23495,9 @@ SLKA-25320:
compat: 5
gameFixes:
- VIF1StallHack # Fixes black screen on boot.
gsHWFixes:
autoFlush: 1 # Fixes missing bloom effects.
halfPixelOffset: 2 # Fixes misaligned lighting and bloom.
SLKA-25321:
name: "K.League - Winning Eleven 9 - Asia Championship"
region: "NTSC-K"
@ -24440,11 +24508,17 @@ SLPM-61130:
region: "NTSC-J"
gameFixes:
- VIF1StallHack # Fixes black screen on boot.
gsHWFixes:
autoFlush: 1 # Fixes missing bloom effects.
halfPixelOffset: 2 # Fixes misaligned lighting and bloom.
SLPM-61132:
name: "Ikusa Gami [Trial Version]"
region: "NTSC-J"
gameFixes:
- VIF1StallHack # Fixes black screen on boot.
gsHWFixes:
autoFlush: 1 # Fixes missing bloom effects.
halfPixelOffset: 2 # Fixes misaligned lighting and bloom.
SLPM-61133:
name: "Soul Calibur III [Trial Version]"
region: "NTSC-J"
@ -26001,6 +26075,8 @@ SLPM-62563:
SLPM-62564:
name: "Simple 2000 Series Vol. 68 - The Tousou Highway - Nagoya - Tokyo"
region: "NTSC-J"
gameFixes:
- XGKickHack # Fixes distant car textures.
SLPM-62565:
name: "Boboboubo Boubobo - Atsumare!! Taikan Boubobo [Doukonban]"
region: "NTSC-J"
@ -27118,6 +27194,7 @@ SLPM-65115:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SLPM-65116:
name: "Lilie no Atelier Plus - Salburg no Renkinjutsushi 3"
region: "NTSC-J"
@ -28619,6 +28696,10 @@ SLPM-65575:
name: "Crimson Tears"
region: "NTSC-J"
compat: 5
gsHWFixes:
wildArmsHack: 1 # Fixes blurriness.
roundSprite: 2 # Reduces misalignment bloom effects.
# deinterlace: 6 # Game requires blend tff deinterlacing when auto for 'fixing' shimmer on character models and more flickering or half weaved, though the game suffers from the field order.
SLPM-65576:
name: "Tantei Jinguuji Saburou - Kind of Blue"
region: "NTSC-J"
@ -28877,6 +28958,7 @@ SLPM-65655:
name: "Finding Nemo [Yuke's The Best]"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLPM-65657:
name: "World Soccer Winning Eleven 8"
@ -29796,6 +29878,7 @@ SLPM-65927:
vuClampMode: 3 # Removes occasional SPS where the head goes into nightmare fuel.
gsHWFixes:
halfPixelOffset: 1 # Reduces ghosting.
roundSprite: 1 # Reduces ghosting even more.
SLPM-65928:
name: "SuperLite 2000 Series - Memories Off Mix"
region: "NTSC-J"
@ -30498,6 +30581,7 @@ SLPM-66124:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SLPM-66125:
name: "Final Fantasy X-2 [Ultimate Hits]"
region: "NTSC-J"
@ -30722,6 +30806,9 @@ SLPM-66184:
region: "NTSC-J"
gameFixes:
- VIF1StallHack # Fixes black screen on boot.
gsHWFixes:
autoFlush: 1 # Fixes missing bloom effects.
halfPixelOffset: 2 # Fixes misaligned lighting and bloom.
SLPM-66185:
name: "Game ni Nattayo! Dokuro-chan [Limited Edition]"
region: "NTSC-J"
@ -30823,6 +30910,8 @@ SLPM-66212:
name: "Sega Rally 2006"
region: "NTSC-J"
compat: 5
gsHWFixes:
cpuCLUTRender: 1 # Fixes rainbow textures.
SLPM-66213:
name: "BioHazard 4"
region: "NTSC-J"
@ -32594,6 +32683,7 @@ SLPM-66677:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SLPM-66678:
name: "Final Fantasy X-2 - International + Last Mission [Ultimate Hits]"
region: "NTSC-J"
@ -33793,6 +33883,7 @@ SLPM-67513:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SLPM-67514:
name: "Kessen"
region: "NTSC-K"
@ -34054,6 +34145,9 @@ SLPM-74227:
region: "NTSC-J"
gameFixes:
- VIF1StallHack # Fixes black screen on boot.
gsHWFixes:
autoFlush: 1 # Fixes missing bloom effects.
halfPixelOffset: 2 # Fixes misaligned lighting and bloom.
SLPM-74228:
name: "Fuuun Bakumatsu-den [PlayStation 2 The Best]"
region: "NTSC-J"
@ -35826,6 +35920,7 @@ SLPS-25050:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SLPS-25051:
name: "Missing Blue"
region: "NTSC-J"
@ -35952,6 +36047,7 @@ SLPS-25088:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SLPS-25094:
name: "Reveal Fantasia"
region: "NTSC-J"
@ -36650,6 +36746,7 @@ SLPS-25310:
name: "Disney-Pixar's Finding Nemo"
region: "NTSC-J"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLPS-25311:
name: "Spy Fiction"
@ -39010,6 +39107,7 @@ SLPS-72501:
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SLPS-72502:
name: "Tales of Destiny 2 [Mega Hits]"
region: "NTSC-J"
@ -39681,6 +39779,9 @@ SLUS-20028:
name: "No One Lives Forever"
region: "NTSC-U"
compat: 5
gsHWFixes:
mipmap: 2 # Fixes miptrick texture effects.
trilinearFiltering: 1 # Fixes miptrick blending and also needs Full Blending to fix the lighting.
SLUS-20029:
name: "Top Gear Daredevil"
region: "NTSC-U"
@ -40141,9 +40242,6 @@ SLUS-20153:
SLUS-20154:
name: "NFL Quarterback Club 2002"
region: "NTSC-U"
SLUS-20157:
name: "Haven - Call of the King"
region: "NTSC-U"
SLUS-20158:
name: "Heroes of Might and Magic"
region: "NTSC-U"
@ -40799,9 +40897,10 @@ SLUS-20312:
region: "NTSC-U"
compat: 5
roundModes:
eeRoundMode: 1 # Fix reverse control and boss in some places.
eeRoundMode: 1 # Fixes reverse control and boss in some places.
gsHWFixes:
roundSprite: 2 # Fixes font artifacts.
textureInsideRT: 1 # Fixes wrong visuals for the summon Anima and The (Triple) Magus Sisters.
SLUS-20313:
name: "Wave Rally"
region: "NTSC-U"
@ -41758,6 +41857,9 @@ SLUS-20517:
name: "Haven - Call of the King"
region: "NTSC-U"
compat: 5
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLUS-20519:
name: "Tak and The Power of Juju"
region: "NTSC-U"
@ -42276,6 +42378,7 @@ SLUS-20628:
name: "Disney's Finding Nemo"
region: "NTSC-U"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLUS-20630:
name: "Grand Prix Challenge"
@ -42811,7 +42914,6 @@ SLUS-20743:
compat: 5
gsHWFixes:
autoFlush: 1 # Reduces post-processing misalignment.
roundSprite: 2 # Reduces post-processing misalignment.
SLUS-20744:
name: "EverQuest - Online Adventures - Frontiers"
region: "NTSC-U"
@ -43117,6 +43219,7 @@ SLUS-20804:
vuClampMode: 3 # Removes occasional SPS where the head goes into nightmare fuel.
gsHWFixes:
halfPixelOffset: 1 # Reduces ghosting.
roundSprite: 1 # Reduces ghosting even more.
SLUS-20805:
name: "Yu Yu Hakusho - Dark Tournament"
region: "NTSC-U"
@ -43815,6 +43918,10 @@ SLUS-20948:
name: "Crimson Tears"
region: "NTSC-U"
compat: 5
gsHWFixes:
wildArmsHack: 1 # Fixes blurriness.
roundSprite: 2 # Reduces misalignment bloom effects.
# deinterlace: 6 # Game requires blend tff deinterlacing when auto for 'fixing' shimmer on character models and more flickering or half weaved, though the game suffers from the field order.
SLUS-20949:
name: "Street Fighter Anniversary Collection"
region: "NTSC-U"
@ -46332,6 +46439,7 @@ SLUS-21413:
halfPixelOffset: 1 # Fixes misaligned bloom effects.
mergeSprite: 1 # Fixes blurriness but removes bloom + Recommended to use Shadeboost brightness 80.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLUS-21414:
name: "Delta Force - Black Hawk Down - Team Sabre"
region: "NTSC-U"
@ -47197,6 +47305,7 @@ SLUS-21611:
gsHWFixes:
halfPixelOffset: 2 # Fixes misaligned bloom effects, 1 is technically more correct compared to software but looks worse.
wrapGSMem: 1 # Fixes FMVs missing video pieces.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the whole game.
SLUS-21612:
name: "Legend of the Dragon"
region: "NTSC-U"
@ -48504,7 +48613,7 @@ SLUS-21902:
clampModes:
vuClampMode: 0
gsHWFixes:
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing when auto for the FMVs.
deinterlace: 8 # Game requires adaptive (or blend) tff deinterlacing instead of auto for the FMVs.
SLUS-21904:
name: "Teenage Mutant Ninja Turtles - Smash-Up"
region: "NTSC-U"
@ -48764,6 +48873,9 @@ SLUS-28016:
SLUS-28019:
name: "Haven - Call of the King [Trade Demo]"
region: "NTSC-U"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLUS-28020:
name: "Everquest Online Adventures [Beta Vol.1.0]"
region: "NTSC-U"
@ -49003,6 +49115,9 @@ SLUS-29037:
SLUS-29038:
name: "Haven - Call of the King [Regular Demo]"
region: "NTSC-U"
gsHWFixes:
halfPixelOffset: 2 # Fixes ghosting.
alignSprite: 1 # Fixes vertical lines.
SLUS-29040:
name: "Dr. Muto [Demo]"
region: "NTSC-U"
@ -49084,7 +49199,6 @@ SLUS-29069:
region: "NTSC-U"
gsHWFixes:
autoFlush: 1 # Reduces post-processing misalignment.
roundSprite: 2 # Reduces post-processing misalignment.
SLUS-29070:
name: "XIII [Demo]"
region: "NTSC-U"
@ -49510,6 +49624,8 @@ SLUS-97133:
SLUS-97405:
name: "ATV Offroad Fury 3 [Greatest Hits]"
region: "NTSC-U"
speedHacks:
MTVUSpeedHack: 0 # Increases FPS drastically.
SLUS-97657:
name: "MLB 11 - The Show"
region: "NTSC-U"

@ -988,7 +988,7 @@ xinput,XInput Controller,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,
03000000c62400003a54000000000000,Xbox One PowerA Controller,a:b0,b:b1,back:b9,dpdown:b12,dpleft:b13,dpright:b14,dpup:b11,guide:b10,leftshoulder:b4,leftstick:b6,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b7,righttrigger:a5,rightx:a3,righty:a4,start:b8,x:b2,y:b3,platform:Mac OS X,
030000005e040000130b000001050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
030000005e040000130b000005050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
030000005e040000130b000009050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
030000005e040000130b000009050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,misc1:b15,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
030000005e040000130b000013050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
030000005e040000130b000015050000,Xbox Series Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b12,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Mac OS X,
03000000172700004431000029010000,XiaoMi Controller,a:b0,b:b1,back:b10,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b15,leftshoulder:b6,leftstick:b13,lefttrigger:b8,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a6,rightx:a2,righty:a5,start:b11,x:b3,y:b4,platform:Mac OS X,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,75 @@
// Based on CAS_Shader.hlsl
//
// Copyright(c) 2019 Advanced Micro Devices, Inc.All rights reserved.
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
cbuffer cb : register(b0)
{
uint4 const0;
uint4 const1;
int2 srcOffset;
};
Texture2D InputTexture : register(t0);
RWTexture2D<float4> OutputTexture : register(u0);
#define A_GPU 1
#define A_HLSL 1
#include "ffx_a.h"
AF3 CasLoad(ASU2 p)
{
return InputTexture.Load(int3(srcOffset, 0) + int3(p, 0)).rgb;
}
// Lets you transform input from the load into a linear color space between 0 and 1. See ffx_cas.h
// In this case, our input is already linear and between 0 and 1
void CasInput(inout AF1 r, inout AF1 g, inout AF1 b) {}
#include "ffx_cas.h"
[numthreads(64, 1, 1)]
void main(uint3 LocalThreadId : SV_GroupThreadID, uint3 WorkGroupId : SV_GroupID)
{
// Do remapping of local xy in workgroup for a more PS-like swizzle pattern.
AU2 gxy = ARmp8x8(LocalThreadId.x) + AU2(WorkGroupId.x << 4u, WorkGroupId.y << 4u);
#if CAS_SHARPEN_ONLY
const bool sharpenOnly = true;
#else
const bool sharpenOnly = false;
#endif
// Filter.
AF3 c;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, sharpenOnly);
OutputTexture[ASU2(gxy)] = AF4(c, 1);
gxy.x += 8u;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, sharpenOnly);
OutputTexture[ASU2(gxy)] = AF4(c, 1);
gxy.y += 8u;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, sharpenOnly);
OutputTexture[ASU2(gxy)] = AF4(c, 1);
gxy.x -= 8u;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, sharpenOnly);
OutputTexture[ASU2(gxy)] = AF4(c, 1);
}

@ -0,0 +1,64 @@
// Based on CAS_Shader.glsl
// Copyright(c) 2019 Advanced Micro Devices, Inc.All rights reserved.
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
uniform uvec4 const0;
uniform uvec4 const1;
uniform ivec2 srcOffset;
layout(binding=0) uniform sampler2D imgSrc;
layout(binding=0, rgba8) uniform writeonly image2D imgDst;
#define A_GPU 1
#define A_GLSL 1
#include "ffx_a.h"
AF3 CasLoad(ASU2 p)
{
return texelFetch(imgSrc, srcOffset + ivec2(p), 0).rgb;
}
// Lets you transform input from the load into a linear color space between 0 and 1. See ffx_cas.h
// In this case, our input is already linear and between 0 and 1
void CasInput(inout AF1 r, inout AF1 g, inout AF1 b) {}
#include "ffx_cas.h"
layout(local_size_x=64) in;
void main()
{
// Do remapping of local xy in workgroup for a more PS-like swizzle pattern.
AU2 gxy = ARmp8x8(gl_LocalInvocationID.x)+AU2(gl_WorkGroupID.x<<4u,gl_WorkGroupID.y<<4u);
// Filter.
AF4 c;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, CAS_SHARPEN_ONLY);
imageStore(imgDst, ASU2(gxy), c);
gxy.x += 8u;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, CAS_SHARPEN_ONLY);
imageStore(imgDst, ASU2(gxy), c);
gxy.y += 8u;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, CAS_SHARPEN_ONLY);
imageStore(imgDst, ASU2(gxy), c);
gxy.x -= 8u;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, CAS_SHARPEN_ONLY);
imageStore(imgDst, ASU2(gxy), c);
}

@ -0,0 +1,71 @@
#version 460 core
#extension GL_EXT_samplerless_texture_functions : require
// Based on CAS_Shader.glsl
// Copyright(c) 2019 Advanced Micro Devices, Inc.All rights reserved.
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files(the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions :
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
layout(push_constant) uniform const_buffer
{
uvec4 const0;
uvec4 const1;
ivec2 srcOffset;
};
layout(set=0, binding=0) uniform texture2D imgSrc;
layout(set=0, binding=1, rgba8) uniform writeonly image2D imgDst;
layout(constant_id=0) const int sharpenOnly = 0;
#define A_GPU 1
#define A_GLSL 1
#include "ffx_a.h"
AF3 CasLoad(ASU2 p)
{
return texelFetch(imgSrc, srcOffset + ivec2(p), 0).rgb;
}
// Lets you transform input from the load into a linear color space between 0 and 1. See ffx_cas.h
// In this case, our input is already linear and between 0 and 1
void CasInput(inout AF1 r, inout AF1 g, inout AF1 b) {}
#include "ffx_cas.h"
layout(local_size_x=64) in;
void main()
{
// Do remapping of local xy in workgroup for a more PS-like swizzle pattern.
AU2 gxy = ARmp8x8(gl_LocalInvocationID.x)+AU2(gl_WorkGroupID.x<<4u,gl_WorkGroupID.y<<4u);
// Filter.
AF4 c;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, sharpenOnly != 0);
imageStore(imgDst, ASU2(gxy), c);
gxy.x += 8u;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, sharpenOnly != 0);
imageStore(imgDst, ASU2(gxy), c);
gxy.y += 8u;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, sharpenOnly != 0);
imageStore(imgDst, ASU2(gxy), c);
gxy.x -= 8u;
CasFilter(c.r, c.g, c.b, gxy, const0, const1, sharpenOnly != 0);
imageStore(imgDst, ASU2(gxy), c);
}

@ -224,7 +224,7 @@ find_optional_system_library(libzip 3rdparty/libzip 1.8.0)
if(QT_BUILD)
# Default to bundled Qt6 for Windows.
if(WIN32 AND NOT DEFINED Qt6_DIR)
set(Qt6_DIR ${CMAKE_SOURCE_DIR}/3rdparty/qt/6.3.0/msvc2019_64/lib/cmake/Qt6)
set(Qt6_DIR ${CMAKE_SOURCE_DIR}/3rdparty/qt/6.4.0/msvc2022_64/lib/cmake/Qt6)
endif()
# Find the Qt components that we need.

@ -223,6 +223,56 @@ void GraphicsPipelineBuilder::SetDepthStencilFormat(DXGI_FORMAT format)
m_desc.DSVFormat = format;
}
ComputePipelineBuilder::ComputePipelineBuilder()
{
Clear();
}
void ComputePipelineBuilder::Clear()
{
std::memset(&m_desc, 0, sizeof(m_desc));
}
wil::com_ptr_nothrow<ID3D12PipelineState> ComputePipelineBuilder::Create(ID3D12Device* device, bool clear /*= true*/)
{
wil::com_ptr_nothrow<ID3D12PipelineState> ps;
HRESULT hr = device->CreateComputePipelineState(&m_desc, IID_PPV_ARGS(ps.put()));
if (FAILED(hr))
{
Console.Error("CreateComputePipelineState() failed: %08X", hr);
return {};
}
if (clear)
Clear();
return ps;
}
wil::com_ptr_nothrow<ID3D12PipelineState> ComputePipelineBuilder::Create(ID3D12Device* device, ShaderCache& cache, bool clear /*= true*/)
{
wil::com_ptr_nothrow<ID3D12PipelineState> pso = cache.GetPipelineState(device, m_desc);
if (!pso)
return {};
if (clear)
Clear();
return pso;
}
void ComputePipelineBuilder::SetRootSignature(ID3D12RootSignature* rs)
{
m_desc.pRootSignature = rs;
}
void ComputePipelineBuilder::SetShader(const void* data, u32 data_size)
{
m_desc.CS.pShaderBytecode = data;
m_desc.CS.BytecodeLength = data_size;
}
RootSignatureBuilder::RootSignatureBuilder()
{
Clear();

@ -114,8 +114,26 @@ namespace D3D12
void SetDepthStencilFormat(DXGI_FORMAT format);
private:
D3D12_GRAPHICS_PIPELINE_STATE_DESC m_desc{};
std::array<D3D12_INPUT_ELEMENT_DESC, MAX_VERTEX_ATTRIBUTES> m_input_elements{};
D3D12_GRAPHICS_PIPELINE_STATE_DESC m_desc;
std::array<D3D12_INPUT_ELEMENT_DESC, MAX_VERTEX_ATTRIBUTES> m_input_elements;
};
class ComputePipelineBuilder
{
public:
ComputePipelineBuilder();
~ComputePipelineBuilder() = default;
void Clear();
wil::com_ptr_nothrow<ID3D12PipelineState> Create(ID3D12Device* device, bool clear = true);
wil::com_ptr_nothrow<ID3D12PipelineState> Create(ID3D12Device* device, ShaderCache& cache, bool clear = true);
void SetRootSignature(ID3D12RootSignature* rs);
void SetShader(const void* data, u32 data_size);
private:
D3D12_COMPUTE_PIPELINE_STATE_DESC m_desc;
};
} // namespace D3D12

@ -387,6 +387,23 @@ ShaderCache::CacheIndexKey ShaderCache::GetPipelineCacheKey(const D3D12_GRAPHICS
return CacheIndexKey{h.low, h.high, 0, 0, 0, 0, length, EntryType::GraphicsPipeline};
}
ShaderCache::CacheIndexKey ShaderCache::GetPipelineCacheKey(const D3D12_COMPUTE_PIPELINE_STATE_DESC& gpdesc)
{
MD5Digest digest;
u32 length = sizeof(D3D12_GRAPHICS_PIPELINE_STATE_DESC);
if (gpdesc.CS.BytecodeLength > 0)
{
digest.Update(gpdesc.CS.pShaderBytecode, static_cast<u32>(gpdesc.CS.BytecodeLength));
length += static_cast<u32>(gpdesc.CS.BytecodeLength);
}
MD5Hash h;
digest.Final(h.hash);
return CacheIndexKey{h.low, h.high, 0, 0, 0, 0, length, EntryType::ComputePipeline};
}
ShaderCache::ComPtr<ID3DBlob> ShaderCache::GetShaderBlob(EntryType type