diff --git a/documentation/PER_DEVICE_DOCUMENTATION/RK3588/SUPPORTED_EMULATORS_AND_CORES.md b/documentation/PER_DEVICE_DOCUMENTATION/RK3588/SUPPORTED_EMULATORS_AND_CORES.md
index 8fd5abb8f..fd7bae8be 100644
--- a/documentation/PER_DEVICE_DOCUMENTATION/RK3588/SUPPORTED_EMULATORS_AND_CORES.md
+++ b/documentation/PER_DEVICE_DOCUMENTATION/RK3588/SUPPORTED_EMULATORS_AND_CORES.md
@@ -70,7 +70,7 @@ This document describes all available systems emulators and cores available for
|Nintendo|Game Boy Advance (Hacks) (gbah)|2001|`gbah`|.gba .zip .7z|**retroarch:** mgba (default)
**retroarch:** gbsp
**retroarch:** vbam
**retroarch:** vba_next
**retroarch:** beetle_gba
|
|Nintendo|Game Boy Color (gbc)|1998|`gbc`|.gb .gbc .zip .7z|**retroarch:** gambatte (default)
**retroarch:** sameboy
**retroarch:** gearboy
**retroarch:** tgbdual
**retroarch:** mgba
**retroarch:** vbam
|
|Nintendo|Game Boy Color (Hacks) (gbch)|1998|`gbch`|.gb .gbc .zip .7z|**retroarch:** gambatte (default)
**retroarch:** sameboy
**retroarch:** gearboy
**retroarch:** tgbdual
**retroarch:** mgba
**retroarch:** vbam
|
-|Nintendo|GameCube (gamecube)|2001|`gamecube`|.gcm .iso .gcz .ciso .wbfs .rvz .dol|**retroarch:** dolphin (default)
|
+|Nintendo|GameCube (gamecube)|2001|`gamecube`|.gcm .iso .gcz .ciso .wbfs .rvz .dol|**dolphin:** dolphin-sa-gc (default)
**retroarch:** dolphin
|
|Nintendo|MSU-1 (snesmsu1)|2012|`snesmsu1`|.smc .fig .sfc .swc .zip .7z|**retroarch:** snes9x (default)
**retroarch:** beetle_supafaust
|
|Nintendo|N64 (n64)|1996|`n64`|.z64 .n64 .v64 .zip .7z|**retroarch:** mupen64plus_next (default)
**retroarch:** mupen64plus
**retroarch:** parallel_n64
**mupen64plus:** mupen64plus-sa
|
|Nintendo|NES (Hacks) (nesh)|1985|`nesh`|.nes .unif .unf .zip .7z|**retroarch:** nestopia (default)
**retroarch:** fceumm
**retroarch:** quicknes
**retroarch:** mesen
|
@@ -81,7 +81,7 @@ This document describes all available systems emulators and cores available for
|Nintendo|Super Nintendo (Hacks) (snesh)|1991|`snesh`|.smc .fig .sfc .swc .zip .7z|**retroarch:** snes9x (default)
**retroarch:** snes9x2010
**retroarch:** snes9x2002
**retroarch:** snes9x2005_plus
**retroarch:** beetle_supafaust
**retroarch:** bsnes
**retroarch:** bsnes_mercury_performance
**retroarch:** bsnes_hd_beta
|
|Nintendo|Super Nintendo (snes)|1991|`snes`|.smc .fig .sfc .swc .zip .7z|**retroarch:** snes9x (default)
**retroarch:** snes9x2010
**retroarch:** snes9x2002
**retroarch:** snes9x2005_plus
**retroarch:** beetle_supafaust
**retroarch:** bsnes
**retroarch:** bsnes_mercury_performance
**retroarch:** bsnes_hd_beta
|
|Nintendo|Virtual Boy (virtualboy)|1995|`virtualboy`|.vb .zip .7z|**retroarch:** beetle_vb (default)
|
-|Nintendo|Wii (wii)|2006|`wii`|.gcm .iso .gcz .ciso .wbfs .rvz .dol .wad|**retroarch:** dolphin (default)
|
+|Nintendo|Wii (wii)|2006|`wii`|.gcm .iso .gcz .ciso .wbfs .rvz .dol .wad|**dolphin:** dolphin-sa-wii (default)
**retroarch:** dolphin
|
|Panasonic|3DO (3do)|1993|`3do`|.iso .bin .chd .cue|**retroarch:** opera (default)
|
|Philips|VideoPac (videopac)|1978|`videopac`|.bin .zip .7z|**retroarch:** o2em (default)
|
|Sammy|Atomiswave (atomiswave)|2003|`atomiswave`|.lst .bin .dat .zip .7z|**retroarch:** flycast2021
**retroarch:** flycast32 (default)
**retroarch:** flycast
**flycast:** flycast-sa
|
diff --git a/packages/emulators/standalone/dolphin-sa/config/RK3588/Dolphin.ini b/packages/emulators/standalone/dolphin-sa/config/RK3588/Dolphin.ini
index 92e7f5bbd..7a521d152 100644
--- a/packages/emulators/standalone/dolphin-sa/config/RK3588/Dolphin.ini
+++ b/packages/emulators/standalone/dolphin-sa/config/RK3588/Dolphin.ini
@@ -122,7 +122,7 @@ EmulationSpeed = 1.00000000
FrameSkip = 0x00000003
Overclock = 4.00000000
OverclockEnable = False
-GFXBackend = OGL
+GFXBackend = Vulkan
GPUDeterminismMode = auto
PerfMapDir =
[Movie]
diff --git a/packages/emulators/standalone/dolphin-sa/config/RK3588/GCPadNew.ini.south b/packages/emulators/standalone/dolphin-sa/config/RK3588/GCPadNew.ini.south
new file mode 100644
index 000000000..5f53f4e8a
--- /dev/null
+++ b/packages/emulators/standalone/dolphin-sa/config/RK3588/GCPadNew.ini.south
@@ -0,0 +1,29 @@
+[GCPad1]
+Device = evdev/0/Microsoft X-Box 360 pad
+Buttons/A = Button 0
+Buttons/B = Button 2
+Buttons/Start = Button 6
+Buttons/X = Button 1
+Buttons/Y = Button 3
+Buttons/Z = Button 5
+Buttons/Hotkey = Button 7
+C-Stick/Dead Zone = 25.000000000000000
+C-Stick/Down = Axis 4+
+C-Stick/Left = Axis 3-
+C-Stick/Modifier = Control_L
+C-Stick/Modifier/Range = 50.000000000000000
+C-Stick/Right = Axis 3+
+C-Stick/Up = Axis 4-
+D-Pad/Down = Axis 7+
+D-Pad/Left = Axis 6-
+D-Pad/Right = Axis 6+
+D-Pad/Up = Axis 7-
+Main Stick/Dead Zone = 25.000000000000000
+Main Stick/Down = Axis 1+
+Main Stick/Left = Axis 0-
+Main Stick/Modifier = Shift_L
+Main Stick/Modifier/Range = 50.000000000000000
+Main Stick/Right = Axis 0+
+Main Stick/Up = Axis 1-
+Triggers/L = Axis 2+
+Triggers/R = Axis 5+
diff --git a/packages/emulators/standalone/dolphin-sa/config/RK3588/GCPadNew.ini b/packages/emulators/standalone/dolphin-sa/config/RK3588/GCPadNew.ini.west
similarity index 100%
rename from packages/emulators/standalone/dolphin-sa/config/RK3588/GCPadNew.ini
rename to packages/emulators/standalone/dolphin-sa/config/RK3588/GCPadNew.ini.west
diff --git a/packages/emulators/standalone/dolphin-sa/config/RK3588/GFX.ini b/packages/emulators/standalone/dolphin-sa/config/RK3588/GFX.ini
index a18aa341c..6fcca4179 100644
--- a/packages/emulators/standalone/dolphin-sa/config/RK3588/GFX.ini
+++ b/packages/emulators/standalone/dolphin-sa/config/RK3588/GFX.ini
@@ -2,7 +2,9 @@
VSync = False
Adapter = 0
[Settings]
+PreferGLES = True
AspectRatio = 0
+InternalResolution = 2
Crop = False
wideScreenHack = False
UseXFB = False
@@ -37,10 +39,14 @@ SWDumpTevStages = False
SWDumpTevTexFetches = False
SWDrawStart = 0
SWDrawEnd = 100000
+ShaderCompilationMode = 0
+WaitForShadersBeforeStarting = True
+BackendMultithreading = True
+EnableGPUTextureDecoding = True
[Enhancements]
-ForceFiltering = False
+ForceTextureFiltering = False
MaxAnisotropy = 0
-PostProcessingShader =
+PostProcessingShader =
[Stereoscopy]
StereoMode = 0
StereoDepth = 20
@@ -53,3 +59,4 @@ ForceProgressive = True
EFBToTextureEnable = True
EFBScaledCopy = False
EFBEmulateFormatChanges = False
+SkipDuplicateXFBs = True
diff --git a/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/hremote.ini b/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/hremote.ini
new file mode 100644
index 000000000..cbd6a0760
--- /dev/null
+++ b/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/hremote.ini
@@ -0,0 +1,20 @@
+[Wiimote1]
+Device = evdev/0/Microsoft X-Box 360 pad
+Buttons/A = Button 0
+Buttons/B = Button 1
+Buttons/1 = Button 2
+Buttons/2 = Button 3
+Buttons/- = Button 6
+Buttons/+ = Button 7
+Buttons/Home = Button 8
+Shake/X = Button 4
+Shake/Y = Button 4
+Shake/Z = Button 4
+D-Pad/Up = Axis 6-
+D-Pad/Down = Axis 6+
+D-Pad/Left = Axis 7-
+D-Pad/Right = Axis 7+
+IR/Up = `Axis 4-`
+IR/Down = `Axis 4+`
+IR/Left = `Axis 3-`
+IR/Right = `Axis 3+`
diff --git a/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/nunchuck.ini b/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/nunchuck.ini
index ce65fba9b..267a7e266 100644
--- a/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/nunchuck.ini
+++ b/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/nunchuck.ini
@@ -24,3 +24,7 @@ Nunchuk/Stick/Right = Axis 0+
Nunchuk/Shake/X = Axis 2+
Nunchuk/Shake/Y = Axis 2+
Nunchuk/Shake/Z = Axis 2+
+IR/Up = `Axis 4-`
+IR/Down = `Axis 4+`
+IR/Left = `Axis 3-`
+IR/Right = `Axis 3+`
diff --git a/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/remote.ini b/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/vremote.ini
similarity index 81%
rename from packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/remote.ini
rename to packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/vremote.ini
index 29041118a..2880a8a36 100644
--- a/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/remote.ini
+++ b/packages/emulators/standalone/dolphin-sa/config/RK3588/WiiControllerProfiles/vremote.ini
@@ -14,3 +14,7 @@ D-Pad/Up = Axis 7-
D-Pad/Down = Axis 7+
D-Pad/Left = Axis 6-
D-Pad/Right = Axis 6+
+IR/Up = `Axis 4-`
+IR/Down = `Axis 4+`
+IR/Left = `Axis 3-`
+IR/Right = `Axis 3+`
diff --git a/packages/emulators/standalone/dolphin-sa/package.mk b/packages/emulators/standalone/dolphin-sa/package.mk
index bc60ee5df..2d657046c 100644
--- a/packages/emulators/standalone/dolphin-sa/package.mk
+++ b/packages/emulators/standalone/dolphin-sa/package.mk
@@ -59,7 +59,7 @@ PKG_CMAKE_OPTS_TARGET+=" -DENABLE_HEADLESS=ON \
-DENABLE_QT=OFF \
-DENCODE_FRAMEDUMPS=OFF \
-DENABLE_CLI_TOOL=OFF \
- -DENABLE_X11=OFF"
+ -DENABLE_X11=ON"
makeinstall_target() {
@@ -80,6 +80,9 @@ post_install() {
RK356*)
DOLPHIN_PLATFORM="drm"
;;
+ RK3588)
+ DOLPHIN_PLATFORM="x11"
+ ;;
*)
DOLPHIN_PLATFORM="wayland"
;;
diff --git a/packages/emulators/standalone/dolphin-sa/patches/wayland/000-add-wayland.patch b/packages/emulators/standalone/dolphin-sa/patches/wayland/000-add-wayland.patch
index e074899d0..038ca4c97 100644
--- a/packages/emulators/standalone/dolphin-sa/patches/wayland/000-add-wayland.patch
+++ b/packages/emulators/standalone/dolphin-sa/patches/wayland/000-add-wayland.patch
@@ -1,6 +1,6 @@
diff -rupN dolphin.orig/CMake/FindWaylandProtocols.cmake dolphin/CMake/FindWaylandProtocols.cmake
--- dolphin.orig/CMake/FindWaylandProtocols.cmake 1970-01-01 00:00:00.000000000 +0000
-+++ dolphin/CMake/FindWaylandProtocols.cmake 2023-06-05 18:48:45.007819529 +0000
++++ dolphin/CMake/FindWaylandProtocols.cmake 2023-09-26 18:02:22.836042087 +0000
@@ -0,0 +1,28 @@
+# from https://github.com/glfw/glfw/blob/master/CMake/modules/FindWaylandProtocols.cmake
+
@@ -32,7 +32,7 @@ diff -rupN dolphin.orig/CMake/FindWaylandProtocols.cmake dolphin/CMake/FindWayla
+set(WAYLAND_PROTOCOLS_VERSION ${WaylandProtocols_VERSION})
diff -rupN dolphin.orig/CMake/FindXKBCommon.cmake dolphin/CMake/FindXKBCommon.cmake
--- dolphin.orig/CMake/FindXKBCommon.cmake 1970-01-01 00:00:00.000000000 +0000
-+++ dolphin/CMake/FindXKBCommon.cmake 2023-06-05 18:48:45.007819529 +0000
++++ dolphin/CMake/FindXKBCommon.cmake 2023-09-26 18:02:22.836042087 +0000
@@ -0,0 +1,33 @@
+# - Try to find XKBCommon
+# Once done, this will define
@@ -68,9 +68,9 @@ diff -rupN dolphin.orig/CMake/FindXKBCommon.cmake dolphin/CMake/FindXKBCommon.cm
+
+mark_as_advanced(XKBCOMMON_LIBRARY XKBCOMMON_INCLUDE_DIR)
diff -rupN dolphin.orig/CMakeLists.txt dolphin/CMakeLists.txt
---- dolphin.orig/CMakeLists.txt 2023-06-01 19:24:09.874000574 +0000
-+++ dolphin/CMakeLists.txt 2023-06-05 18:48:45.007819529 +0000
-@@ -43,6 +43,7 @@ set(DOLPHIN_DEFAULT_UPDATE_TRACK "" CACH
+--- dolphin.orig/CMakeLists.txt 2023-09-26 17:58:02.593990718 +0000
++++ dolphin/CMakeLists.txt 2023-09-26 18:02:22.836042087 +0000
+@@ -47,6 +47,7 @@ set(DOLPHIN_DEFAULT_UPDATE_TRACK "" CACH
if(UNIX AND NOT APPLE AND NOT ANDROID)
option(ENABLE_X11 "Enables X11 Support" ON)
@@ -78,7 +78,7 @@ diff -rupN dolphin.orig/CMakeLists.txt dolphin/CMakeLists.txt
endif()
if(NOT WIN32 AND NOT APPLE AND NOT HAIKU)
option(ENABLE_EGL "Enables EGL OpenGL Interface" ON)
-@@ -549,6 +550,17 @@ if(ENABLE_X11)
+@@ -543,6 +544,17 @@ if(ENABLE_X11)
endif()
endif()
@@ -97,9 +97,9 @@ diff -rupN dolphin.orig/CMakeLists.txt dolphin/CMakeLists.txt
find_package(EGL)
if(EGL_FOUND)
diff -rupN dolphin.orig/Source/Core/Common/CMakeLists.txt dolphin/Source/Core/Common/CMakeLists.txt
---- dolphin.orig/Source/Core/Common/CMakeLists.txt 2023-06-01 19:24:09.918002004 +0000
-+++ dolphin/Source/Core/Common/CMakeLists.txt 2023-06-05 18:48:45.487834884 +0000
-@@ -255,11 +255,20 @@ if(ENABLE_EGL AND EGL_FOUND)
+--- dolphin.orig/Source/Core/Common/CMakeLists.txt 2023-09-26 17:58:02.801995519 +0000
++++ dolphin/Source/Core/Common/CMakeLists.txt 2023-09-26 18:02:22.836042087 +0000
+@@ -253,11 +253,20 @@ if(ENABLE_EGL AND EGL_FOUND)
GL/GLInterface/EGLAndroid.cpp
GL/GLInterface/EGLAndroid.h
)
@@ -126,8 +126,8 @@ diff -rupN dolphin.orig/Source/Core/Common/CMakeLists.txt dolphin/Source/Core/Co
target_include_directories(common PRIVATE ${EGL_INCLUDE_DIRS})
target_link_libraries(common PUBLIC ${EGL_LIBRARIES})
diff -rupN dolphin.orig/Source/Core/Common/GL/GLContext.cpp dolphin/Source/Core/Common/GL/GLContext.cpp
---- dolphin.orig/Source/Core/Common/GL/GLContext.cpp 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLContext.cpp 2023-06-05 18:48:45.499835268 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLContext.cpp 2023-09-26 17:58:02.801995519 +0000
++++ dolphin/Source/Core/Common/GL/GLContext.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -25,6 +25,9 @@
#if defined(ANDROID)
#include "Common/GL/GLInterface/EGLAndroid.h"
@@ -164,8 +164,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLContext.cpp dolphin/Source/Core/
if (wsi.type == WindowSystemType::Headless || wsi.type == WindowSystemType::FBDev)
context = std::make_unique();
diff -rupN dolphin.orig/Source/Core/Common/GL/GLContext.h dolphin/Source/Core/Common/GL/GLContext.h
---- dolphin.orig/Source/Core/Common/GL/GLContext.h 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLContext.h 2023-06-05 18:48:45.503835396 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLContext.h 2023-09-26 17:58:02.801995519 +0000
++++ dolphin/Source/Core/Common/GL/GLContext.h 2023-09-26 18:02:22.836042087 +0000
@@ -36,8 +36,8 @@ public:
virtual bool MakeCurrent();
virtual bool ClearCurrent();
@@ -178,8 +178,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLContext.h dolphin/Source/Core/Co
virtual void Swap();
virtual void SwapInterval(int interval);
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/AGL.h dolphin/Source/Core/Common/GL/GLInterface/AGL.h
---- dolphin.orig/Source/Core/Common/GL/GLInterface/AGL.h 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/AGL.h 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/AGL.h 2023-09-26 17:58:02.801995519 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/AGL.h 2023-09-26 18:02:22.836042087 +0000
@@ -27,6 +27,8 @@ public:
bool MakeCurrent() override;
@@ -190,8 +190,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/AGL.h dolphin/Source/C
void Update() override;
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/AGL.mm dolphin/Source/Core/Common/GL/GLInterface/AGL.mm
---- dolphin.orig/Source/Core/Common/GL/GLInterface/AGL.mm 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/AGL.mm 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/AGL.mm 2023-09-26 17:58:02.801995519 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/AGL.mm 2023-09-26 18:02:22.836042087 +0000
@@ -144,7 +144,7 @@ bool GLContextAGL::ClearCurrent()
return true;
}
@@ -202,8 +202,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/AGL.mm dolphin/Source/
if (!m_view)
return;
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGL.cpp dolphin/Source/Core/Common/GL/GLInterface/EGL.cpp
---- dolphin.orig/Source/Core/Common/GL/GLInterface/EGL.cpp 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/EGL.cpp 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/EGL.cpp 2023-09-26 17:58:02.805995611 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/EGL.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -292,8 +292,8 @@ bool GLContextEGL::CreateWindowSurface()
{
if (!IsHeadless())
@@ -267,8 +267,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGL.cpp dolphin/Source
+ m_backbuffer_height = static_cast(surface_height);
+}
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGL.h dolphin/Source/Core/Common/GL/GLInterface/EGL.h
---- dolphin.orig/Source/Core/Common/GL/GLInterface/EGL.h 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/EGL.h 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/EGL.h 2023-09-26 17:58:02.805995611 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/EGL.h 2023-09-26 18:02:22.836042087 +0000
@@ -22,7 +22,8 @@ public:
bool MakeCurrent() override;
bool ClearCurrent() override;
@@ -294,7 +294,7 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGL.h dolphin/Source/C
std::vector m_attribs;
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGLWayland.cpp dolphin/Source/Core/Common/GL/GLInterface/EGLWayland.cpp
--- dolphin.orig/Source/Core/Common/GL/GLInterface/EGLWayland.cpp 1970-01-01 00:00:00.000000000 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/EGLWayland.cpp 2023-06-05 18:48:45.507835524 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/EGLWayland.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -0,0 +1,36 @@
+// Copyright 2019 Dolphin Emulator Project
+// Licensed under GPLv2+
@@ -334,7 +334,7 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGLWayland.cpp dolphin
+}
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGLWayland.h dolphin/Source/Core/Common/GL/GLInterface/EGLWayland.h
--- dolphin.orig/Source/Core/Common/GL/GLInterface/EGLWayland.h 1970-01-01 00:00:00.000000000 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/EGLWayland.h 2023-06-05 18:48:45.507835524 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/EGLWayland.h 2023-09-26 18:02:22.836042087 +0000
@@ -0,0 +1,19 @@
+// Copyright 2019 Dolphin Emulator Project
+// Licensed under GPLv2+
@@ -356,8 +356,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGLWayland.h dolphin/S
+ EGLNativeWindowType GetEGLNativeWindow(EGLConfig config) override;
+};
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGLX11.cpp dolphin/Source/Core/Common/GL/GLInterface/EGLX11.cpp
---- dolphin.orig/Source/Core/Common/GL/GLInterface/EGLX11.cpp 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/EGLX11.cpp 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/EGLX11.cpp 2023-09-26 17:58:02.805995611 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/EGLX11.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -11,7 +11,7 @@ GLContextEGLX11::~GLContextEGLX11()
m_render_window.reset();
}
@@ -368,8 +368,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGLX11.cpp dolphin/Sou
m_render_window->UpdateDimensions();
m_backbuffer_width = m_render_window->GetWidth();
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGLX11.h dolphin/Source/Core/Common/GL/GLInterface/EGLX11.h
---- dolphin.orig/Source/Core/Common/GL/GLInterface/EGLX11.h 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/EGLX11.h 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/EGLX11.h 2023-09-26 17:58:02.805995611 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/EGLX11.h 2023-09-26 18:02:22.836042087 +0000
@@ -13,7 +13,7 @@ class GLContextEGLX11 final : public GLC
public:
~GLContextEGLX11() override;
@@ -380,8 +380,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/EGLX11.h dolphin/Sourc
protected:
EGLDisplay OpenEGLDisplay() override;
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/GLX.cpp dolphin/Source/Core/Common/GL/GLInterface/GLX.cpp
---- dolphin.orig/Source/Core/Common/GL/GLInterface/GLX.cpp 2023-06-01 19:24:09.918002004 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/GLX.cpp 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/GLX.cpp 2023-09-26 17:58:02.805995611 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/GLX.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -310,7 +310,7 @@ bool GLContextGLX::ClearCurrent()
return glXMakeCurrent(m_display, None, nullptr);
}
@@ -392,8 +392,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/GLX.cpp dolphin/Source
m_render_window->UpdateDimensions();
m_backbuffer_width = m_render_window->GetWidth();
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/GLX.h dolphin/Source/Core/Common/GL/GLInterface/GLX.h
---- dolphin.orig/Source/Core/Common/GL/GLInterface/GLX.h 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/GLX.h 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/GLX.h 2023-09-26 17:58:02.805995611 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/GLX.h 2023-09-26 18:02:22.836042087 +0000
@@ -24,7 +24,7 @@ public:
bool MakeCurrent() override;
bool ClearCurrent() override;
@@ -404,8 +404,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/GLX.h dolphin/Source/C
void SwapInterval(int Interval) override;
void Swap() override;
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/WGL.cpp dolphin/Source/Core/Common/GL/GLInterface/WGL.cpp
---- dolphin.orig/Source/Core/Common/GL/GLInterface/WGL.cpp 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/WGL.cpp 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/WGL.cpp 2023-09-26 17:58:02.805995611 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/WGL.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -480,7 +480,7 @@ bool GLContextWGL::ClearCurrent()
}
@@ -416,8 +416,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/WGL.cpp dolphin/Source
RECT rcWindow;
GetClientRect(m_window_handle, &rcWindow);
diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/WGL.h dolphin/Source/Core/Common/GL/GLInterface/WGL.h
---- dolphin.orig/Source/Core/Common/GL/GLInterface/WGL.h 2023-06-01 19:23:58.513631223 +0000
-+++ dolphin/Source/Core/Common/GL/GLInterface/WGL.h 2023-06-05 18:48:45.507835524 +0000
+--- dolphin.orig/Source/Core/Common/GL/GLInterface/WGL.h 2023-09-26 17:58:02.805995611 +0000
++++ dolphin/Source/Core/Common/GL/GLInterface/WGL.h 2023-09-26 18:02:22.836042087 +0000
@@ -19,7 +19,7 @@ public:
bool MakeCurrent() override;
bool ClearCurrent() override;
@@ -428,8 +428,8 @@ diff -rupN dolphin.orig/Source/Core/Common/GL/GLInterface/WGL.h dolphin/Source/C
void Swap() override;
void SwapInterval(int interval) override;
diff -rupN dolphin.orig/Source/Core/Common/WindowSystemInfo.h dolphin/Source/Core/Common/WindowSystemInfo.h
---- dolphin.orig/Source/Core/Common/WindowSystemInfo.h 2023-06-01 19:23:58.517631353 +0000
-+++ dolphin/Source/Core/Common/WindowSystemInfo.h 2023-06-05 18:48:45.499835268 +0000
+--- dolphin.orig/Source/Core/Common/WindowSystemInfo.h 2023-09-26 17:58:02.805995611 +0000
++++ dolphin/Source/Core/Common/WindowSystemInfo.h 2023-09-26 18:02:22.836042087 +0000
@@ -40,7 +40,11 @@ struct WindowSystemInfo
// This is kept seperate as input may require a different handle to rendering, and
// during video backend startup the surface pointer may change (MoltenVK).
@@ -444,9 +444,9 @@ diff -rupN dolphin.orig/Source/Core/Common/WindowSystemInfo.h dolphin/Source/Cor
float render_surface_scale = 1.0f;
};
diff -rupN dolphin.orig/Source/Core/Core/Core.cpp dolphin/Source/Core/Core/Core.cpp
---- dolphin.orig/Source/Core/Core/Core.cpp 2023-06-01 19:24:09.922002134 +0000
-+++ dolphin/Source/Core/Core/Core.cpp 2023-06-05 18:48:45.511835652 +0000
-@@ -478,6 +478,8 @@ static void EmuThread(std::unique_ptr
@@ -499,8 +499,8 @@ diff -rupN dolphin.orig/Source/Core/DolphinLib.props dolphin/Source/Core/Dolphin
diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/CMakeLists.txt dolphin/Source/Core/DolphinNoGUI/CMakeLists.txt
---- dolphin.orig/Source/Core/DolphinNoGUI/CMakeLists.txt 2023-06-01 19:24:09.942002785 +0000
-+++ dolphin/Source/Core/DolphinNoGUI/CMakeLists.txt 2023-06-05 18:48:45.571837571 +0000
+--- dolphin.orig/Source/Core/DolphinNoGUI/CMakeLists.txt 2023-09-26 17:58:02.833996257 +0000
++++ dolphin/Source/Core/DolphinNoGUI/CMakeLists.txt 2023-09-26 18:02:22.836042087 +0000
@@ -17,6 +17,22 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux"
target_sources(dolphin-nogui PRIVATE PlatformFBDev.cpp)
endif()
@@ -525,8 +525,8 @@ diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/CMakeLists.txt dolphin/Source/C
target_link_libraries(dolphin-nogui
diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/MainNoGUI.cpp dolphin/Source/Core/DolphinNoGUI/MainNoGUI.cpp
---- dolphin.orig/Source/Core/DolphinNoGUI/MainNoGUI.cpp 2023-06-01 19:24:09.942002785 +0000
-+++ dolphin/Source/Core/DolphinNoGUI/MainNoGUI.cpp 2023-06-05 18:48:45.571837571 +0000
+--- dolphin.orig/Source/Core/DolphinNoGUI/MainNoGUI.cpp 2023-09-26 17:58:02.833996257 +0000
++++ dolphin/Source/Core/DolphinNoGUI/MainNoGUI.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -155,6 +155,11 @@ static std::unique_ptr GetPlat
{
std::string platform_name = static_cast(options.get("platform"));
@@ -551,8 +551,8 @@ diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/MainNoGUI.cpp dolphin/Source/Co
optparse::Values& options = CommandLineParse::ParseArguments(parser.get(), argc, argv);
diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/Platform.h dolphin/Source/Core/DolphinNoGUI/Platform.h
---- dolphin.orig/Source/Core/DolphinNoGUI/Platform.h 2023-06-01 19:23:58.553632524 +0000
-+++ dolphin/Source/Core/DolphinNoGUI/Platform.h 2023-06-05 18:48:45.571837571 +0000
+--- dolphin.orig/Source/Core/DolphinNoGUI/Platform.h 2023-09-26 17:58:02.833996257 +0000
++++ dolphin/Source/Core/DolphinNoGUI/Platform.h 2023-09-26 18:02:22.836042087 +0000
@@ -35,6 +35,10 @@ public:
static std::unique_ptr CreateX11Platform();
#endif
@@ -566,8 +566,8 @@ diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/Platform.h dolphin/Source/Core/
#endif
diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/PlatformWayland.cpp dolphin/Source/Core/DolphinNoGUI/PlatformWayland.cpp
--- dolphin.orig/Source/Core/DolphinNoGUI/PlatformWayland.cpp 1970-01-01 00:00:00.000000000 +0000
-+++ dolphin/Source/Core/DolphinNoGUI/PlatformWayland.cpp 2023-06-07 14:37:14.927874203 +0000
-@@ -0,0 +1,371 @@
++++ dolphin/Source/Core/DolphinNoGUI/PlatformWayland.cpp 2023-09-26 18:27:27.334792936 +0000
+@@ -0,0 +1,364 @@
+// Copyright 2018 Dolphin Emulator Project
+// Licensed under GPLv2+
+// Refer to the license.txt file included.
@@ -791,13 +791,6 @@ diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/PlatformWayland.cpp dolphin/Sou
+ xdg_toplevel_set_title(m_xdg_toplevel, string.c_str());
+}
+
-+auto ShowEmulationSpeed = []() {
-+ const float emulation_speed = Config::Get(Config::MAIN_EMULATION_SPEED);
-+ OSD::AddMessage(emulation_speed <= 0 ?
-+ "Emulation Speed: Unlimited" :
-+ fmt::format("Emulation Speed: {}%", std::lround(emulation_speed * 100.f)));
-+};
-+
+void PlatformWayland::MainLoop()
+{
+ while (IsRunning())
@@ -899,13 +892,13 @@ diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/PlatformWayland.cpp dolphin/Sou
+ auto speed = Config::Get(Config::MAIN_EMULATION_SPEED) + 1.0;
+ speed = (speed >= 0.95 && speed <= 1.05) ? 1.0 : speed;
+ Config::SetCurrent(Config::MAIN_EMULATION_SPEED, speed);
-+ ShowEmulationSpeed();
++ OSD::AddMessage("Fast Forward: ON");
+ fforward = 1;
+ } else {
+ auto speed = Config::Get(Config::MAIN_EMULATION_SPEED) - 1.0;
+ speed = (speed <= 0 || (speed >= 0.95 && speed <= 1.05)) ? 1.0 : speed;
+ Config::SetCurrent(Config::MAIN_EMULATION_SPEED, speed);
-+ ShowEmulationSpeed();
++ OSD::AddMessage("Fast Forward: OFF");
+ fforward = 0;
+ }
+ hotkey = 0;
@@ -940,8 +933,8 @@ diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/PlatformWayland.cpp dolphin/Sou
+ return std::make_unique();
+}
diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/PlatformX11.cpp dolphin/Source/Core/DolphinNoGUI/PlatformX11.cpp
---- dolphin.orig/Source/Core/DolphinNoGUI/PlatformX11.cpp 2023-06-01 19:24:09.942002785 +0000
-+++ dolphin/Source/Core/DolphinNoGUI/PlatformX11.cpp 2023-06-05 18:48:45.571837571 +0000
+--- dolphin.orig/Source/Core/DolphinNoGUI/PlatformX11.cpp 2023-09-26 17:58:02.833996257 +0000
++++ dolphin/Source/Core/DolphinNoGUI/PlatformX11.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -57,8 +57,8 @@ private:
#endif
int m_window_x = Config::Get(Config::MAIN_RENDER_WINDOW_XPOS);
@@ -987,8 +980,8 @@ diff -rupN dolphin.orig/Source/Core/DolphinNoGUI/PlatformX11.cpp dolphin/Source/
break;
}
diff -rupN dolphin.orig/Source/Core/InputCommon/GCPadStatus.h dolphin/Source/Core/InputCommon/GCPadStatus.h
---- dolphin.orig/Source/Core/InputCommon/GCPadStatus.h 2023-06-01 19:23:58.569633044 +0000
-+++ dolphin/Source/Core/InputCommon/GCPadStatus.h 2023-06-05 18:48:45.595838339 +0000
+--- dolphin.orig/Source/Core/InputCommon/GCPadStatus.h 2023-09-26 17:58:02.845996536 +0000
++++ dolphin/Source/Core/InputCommon/GCPadStatus.h 2023-09-26 18:02:22.836042087 +0000
@@ -26,6 +26,7 @@ enum PadButton
PAD_BUTTON_X = 0x0400,
PAD_BUTTON_Y = 0x0800,
@@ -998,9 +991,101 @@ diff -rupN dolphin.orig/Source/Core/InputCommon/GCPadStatus.h dolphin/Source/Cor
struct GCPadStatus
diff -rupN dolphin.orig/Source/Core/VideoBackends/OGL/OGLRender.cpp dolphin/Source/Core/VideoBackends/OGL/OGLRender.cpp
---- dolphin.orig/Source/Core/VideoBackends/OGL/OGLRender.cpp 2023-06-01 19:24:09.954003175 +0000
-+++ dolphin/Source/Core/VideoBackends/OGL/OGLRender.cpp 2023-06-05 18:48:45.615838979 +0000
-@@ -1079,7 +1079,7 @@ void Renderer::CheckForSurfaceChange()
+--- dolphin.orig/Source/Core/VideoBackends/OGL/OGLRender.cpp 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/OGL/OGLRender.cpp 2023-09-26 21:41:39.568275473 +0000
+@@ -471,11 +471,7 @@ Renderer::Renderer(std::unique_ptrIsGLES())
+ {
+- g_ogl_config.SupportedESPointSize = GLExtensions::Supports("GL_OES_geometry_point_size") ? 1 :
+- GLExtensions::Supports("GL_EXT_geometry_point_size") ? 2 :
+- 0;
++ g_ogl_config.SupportedESPointSize =
++ GLExtensions::Supports("GL_OES_geometry_point_size") ? EsPointSizeType::PointSizeOes :
++ GLExtensions::Supports("GL_EXT_geometry_point_size") ? EsPointSizeType::PointSizeExt :
++ EsPointSizeType::PointSizeNone;
+ g_ogl_config.SupportedESTextureBuffer =
+ GLExtensions::Supports("VERSION_GLES_3_2") ? EsTexbufType::TexbufCore :
+ GLExtensions::Supports("GL_OES_texture_buffer") ? EsTexbufType::TexbufOes :
+@@ -548,21 +545,16 @@ Renderer::Renderer(std::unique_ptr 0;
++ g_Config.backend_info.bSupportsGeometryShaders &&
++ g_ogl_config.SupportedESPointSize != EsPointSizeType::PointSizeNone;
+ g_Config.backend_info.bSupportsSSAA = g_ogl_config.bSupportsAEP;
+ g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
+ g_ogl_config.bSupportsMSAA = true;
+ g_ogl_config.bSupportsTextureStorage = true;
+- g_ogl_config.bSupports2DTextureStorageMultisample = true;
++ if (GLExtensions::Supports("GL_OES_texture_storage_multisample_2d_array"))
++ g_ogl_config.SupportedMultisampleTexStorage = MultisampleTexStorageType::TexStorageOes;
+ g_Config.backend_info.bSupportsBitfield = true;
+ g_Config.backend_info.bSupportsDynamicSamplerIndexing = g_ogl_config.bSupportsAEP;
+- if (g_ActiveConfig.stereo_mode != StereoMode::Off && g_ActiveConfig.iMultisamples > 1 &&
+- !g_ogl_config.bSupports3DTextureStorageMultisample)
+- {
+- // GLES 3.1 can't support stereo rendering and MSAA
+- OSD::AddMessage("MSAA Stereo rendering isn't supported by your GPU.", 10000);
+- Config::SetCurrent(Config::GFX_MSAA, UINT32_C(1));
+- }
+ }
+ else
+ {
+@@ -572,7 +564,8 @@ Renderer::Renderer(std::unique_ptr 0;
++ g_Config.backend_info.bSupportsGSInstancing =
++ g_ogl_config.SupportedESPointSize != EsPointSizeType::PointSizeNone;
+ g_Config.backend_info.bSupportsPaletteConversion = true;
+ g_Config.backend_info.bSupportsSSAA = true;
+ g_Config.backend_info.bSupportsFragmentStoresAndAtomics = true;
+@@ -581,8 +574,7 @@ Renderer::Renderer(std::unique_ptrGetBackBufferWidth();
m_backbuffer_height = m_main_gl_context->GetBackBufferHeight();
m_system_framebuffer->UpdateDimensions(m_backbuffer_width, m_backbuffer_height);
+diff -rupN dolphin.orig/Source/Core/VideoBackends/OGL/OGLRender.h dolphin/Source/Core/VideoBackends/OGL/OGLRender.h
+--- dolphin.orig/Source/Core/VideoBackends/OGL/OGLRender.h 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/OGL/OGLRender.h 2023-09-26 21:32:17.039048706 +0000
+@@ -31,6 +31,14 @@ enum GlslVersion
+ GlslEs310, // GLES 3.1
+ GlslEs320, // GLES 3.2
+ };
++
++enum class EsPointSizeType
++{
++ PointSizeNone,
++ PointSizeOes,
++ PointSizeExt,
++};
++
+ enum class EsTexbufType
+ {
+ TexbufNone,
+@@ -46,6 +54,13 @@ enum class EsFbFetchType
+ FbFetchArm,
+ };
+
++enum class MultisampleTexStorageType
++{
++ TexStorageNone,
++ TexStorageCore,
++ TexStorageOes,
++};
++
+ // ogl-only config, so not in VideoConfig.h
+ struct VideoConfig
+ {
+@@ -60,11 +75,10 @@ struct VideoConfig
+ bool bSupportsAEP;
+ bool bSupportsDebug;
+ bool bSupportsCopySubImage;
+- u8 SupportedESPointSize;
++ EsPointSizeType SupportedESPointSize;
+ EsTexbufType SupportedESTextureBuffer;
+ bool bSupportsTextureStorage;
+- bool bSupports2DTextureStorageMultisample;
+- bool bSupports3DTextureStorageMultisample;
++ MultisampleTexStorageType SupportedMultisampleTexStorage;
+ bool bSupportsConservativeDepth;
+ bool bSupportsImageLoadStore;
+ bool bSupportsAniso;
+diff -rupN dolphin.orig/Source/Core/VideoBackends/OGL/OGLTexture.cpp dolphin/Source/Core/VideoBackends/OGL/OGLTexture.cpp
+--- dolphin.orig/Source/Core/VideoBackends/OGL/OGLTexture.cpp 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/OGL/OGLTexture.cpp 2023-09-26 21:34:37.398249032 +0000
+@@ -128,12 +128,18 @@ OGLTexture::OGLTexture(const TextureConf
+ GLenum gl_internal_format = GetGLInternalFormatForTextureFormat(m_config.format, true);
+ if (tex_config.IsMultisampled())
+ {
+- if (g_ogl_config.bSupportsTextureStorage)
++ ASSERT(g_ogl_config.bSupportsMSAA);
++ if (g_ogl_config.SupportedMultisampleTexStorage != MultisampleTexStorageType::TexStorageNone)
++ {
+ glTexStorage3DMultisample(target, tex_config.samples, gl_internal_format, m_config.width,
+ m_config.height, m_config.layers, GL_FALSE);
++ }
+ else
++ {
++ ASSERT(!g_ogl_config.bIsES);
+ glTexImage3DMultisample(target, tex_config.samples, gl_internal_format, m_config.width,
+ m_config.height, m_config.layers, GL_FALSE);
++ }
+ }
+ else if (g_ogl_config.bSupportsTextureStorage)
+ {
+diff -rupN dolphin.orig/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp dolphin/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp
+--- dolphin.orig/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp 2023-09-26 21:37:11.705777665 +0000
+@@ -661,12 +661,13 @@ void ProgramShaderCache::CreateHeader()
+ std::string SupportedESTextureBuffer;
+ switch (g_ogl_config.SupportedESPointSize)
+ {
+- case 1:
++ case EsPointSizeType::PointSizeOes:
+ SupportedESPointSize = "#extension GL_OES_geometry_point_size : enable";
+ break;
+- case 2:
++ case EsPointSizeType::PointSizeExt:
+ SupportedESPointSize = "#extension GL_EXT_geometry_point_size : enable";
+ break;
++ case EsPointSizeType::PointSizeNone:
+ default:
+ SupportedESPointSize = "";
+ break;
+@@ -718,6 +719,13 @@ void ProgramShaderCache::CreateHeader()
+ break;
+ }
+
++ // The sampler2DMSArray keyword is reserved in GLSL ES 3.0 and 3.1, but is available in 3.2 and
++ // with GL_OES_texture_storage_multisample_2d_array for 3.1.
++ // See https://bugs.dolphin-emu.org/issues/13198.
++ const bool use_multisample_2d_array_precision =
++ v >= GlslEs320 ||
++ g_ogl_config.SupportedMultisampleTexStorage != MultisampleTexStorageType::TexStorageNone;
++
+ std::string shader_shuffle_string;
+ if (g_ogl_config.bSupportsShaderThreadShuffleNV)
+ {
+@@ -762,6 +770,7 @@ void ProgramShaderCache::CreateHeader()
+ "{}\n" // shader thread shuffle
+ "{}\n" // derivative control
+ "{}\n" // query levels
++ "{}\n" // OES multisample texture storage
+
+ // Precision defines for GLSL ES
+ "{}\n"
+@@ -847,12 +856,18 @@ void ProgramShaderCache::CreateHeader()
+ g_ActiveConfig.backend_info.bSupportsTextureQueryLevels ?
+ "#extension GL_ARB_texture_query_levels : enable" :
+ "",
++ // Note: GL_ARB_texture_storage_multisample doesn't have an #extension, as it doesn't
++ // need to change GLSL, but on GLES 3.1 sampler2DMSArray is a reserved keyword unless
++ // the extension is enabled. Thus, we don't need to check TexStorageCore/have an ARB version.
++ g_ogl_config.SupportedMultisampleTexStorage == MultisampleTexStorageType::TexStorageOes ?
++ "#extension GL_OES_texture_storage_multisample_2d_array : enable" :
++ "",
+ is_glsles ? "precision highp float;" : "", is_glsles ? "precision highp int;" : "",
+ is_glsles ? "precision highp sampler2DArray;" : "",
+ (is_glsles && g_ActiveConfig.backend_info.bSupportsPaletteConversion) ?
+ "precision highp usamplerBuffer;" :
+ "",
+- v > GlslEs300 ? "precision highp sampler2DMSArray;" : "",
++ use_multisample_2d_array_precision ? "precision highp sampler2DMSArray;" : "",
+ v >= GlslEs310 ? "precision highp image2DArray;" : "");
+ }
+
diff -rupN dolphin.orig/Source/Core/VideoBackends/Software/SWOGLWindow.cpp dolphin/Source/Core/VideoBackends/Software/SWOGLWindow.cpp
---- dolphin.orig/Source/Core/VideoBackends/Software/SWOGLWindow.cpp 2023-06-01 19:23:58.577633304 +0000
-+++ dolphin/Source/Core/VideoBackends/Software/SWOGLWindow.cpp 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Software/SWOGLWindow.cpp 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Software/SWOGLWindow.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -32,6 +32,16 @@ bool SWOGLWindow::IsHeadless() const
return m_gl_context->IsHeadless();
}
@@ -1058,8 +1273,8 @@ diff -rupN dolphin.orig/Source/Core/VideoBackends/Software/SWOGLWindow.cpp dolph
GLsizei glWidth = (GLsizei)m_gl_context->GetBackBufferWidth();
GLsizei glHeight = (GLsizei)m_gl_context->GetBackBufferHeight();
diff -rupN dolphin.orig/Source/Core/VideoBackends/Software/SWOGLWindow.h dolphin/Source/Core/VideoBackends/Software/SWOGLWindow.h
---- dolphin.orig/Source/Core/VideoBackends/Software/SWOGLWindow.h 2023-06-01 19:23:58.577633304 +0000
-+++ dolphin/Source/Core/VideoBackends/Software/SWOGLWindow.h 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Software/SWOGLWindow.h 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Software/SWOGLWindow.h 2023-09-26 18:02:22.836042087 +0000
@@ -20,6 +20,10 @@ public:
GLContext* GetContext() const { return m_gl_context.get(); }
bool IsHeadless() const;
@@ -1072,8 +1287,8 @@ diff -rupN dolphin.orig/Source/Core/VideoBackends/Software/SWOGLWindow.h dolphin
void ShowImage(const AbstractTexture* image, const MathUtil::Rectangle& xfb_region);
diff -rupN dolphin.orig/Source/Core/VideoBackends/Software/SWRenderer.cpp dolphin/Source/Core/VideoBackends/Software/SWRenderer.cpp
---- dolphin.orig/Source/Core/VideoBackends/Software/SWRenderer.cpp 2023-06-01 19:24:09.954003175 +0000
-+++ dolphin/Source/Core/VideoBackends/Software/SWRenderer.cpp 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Software/SWRenderer.cpp 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Software/SWRenderer.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -60,17 +60,17 @@ SWRenderer::CreateFramebuffer(AbstractTe
static_cast(depth_attachment));
}
@@ -1128,8 +1343,8 @@ diff -rupN dolphin.orig/Source/Core/VideoBackends/Software/SWRenderer.cpp dolphi
{
u32 value = 0;
diff -rupN dolphin.orig/Source/Core/VideoBackends/Software/SWRenderer.h dolphin/Source/Core/VideoBackends/Software/SWRenderer.h
---- dolphin.orig/Source/Core/VideoBackends/Software/SWRenderer.h 2023-06-01 19:24:09.954003175 +0000
-+++ dolphin/Source/Core/VideoBackends/Software/SWRenderer.h 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Software/SWRenderer.h 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Software/SWRenderer.h 2023-09-26 18:02:22.836042087 +0000
@@ -29,7 +29,7 @@ public:
std::unique_ptr
CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment) override;
@@ -1149,8 +1364,8 @@ diff -rupN dolphin.orig/Source/Core/VideoBackends/Software/SWRenderer.h dolphin/
};
} // namespace SW
diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/CMakeLists.txt dolphin/Source/Core/VideoBackends/Vulkan/CMakeLists.txt
---- dolphin.orig/Source/Core/VideoBackends/Vulkan/CMakeLists.txt 2023-06-01 19:24:09.954003175 +0000
-+++ dolphin/Source/Core/VideoBackends/Vulkan/CMakeLists.txt 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Vulkan/CMakeLists.txt 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Vulkan/CMakeLists.txt 2023-09-26 18:02:22.836042087 +0000
@@ -35,6 +35,8 @@ add_library(videovulkan
VulkanContext.h
VulkanLoader.cpp
@@ -1161,8 +1376,8 @@ diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/CMakeLists.txt dolphin/
target_link_libraries(videovulkan
diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp dolphin/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp
---- dolphin.orig/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp 2023-06-01 19:24:09.954003175 +0000
-+++ dolphin/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -10,24 +10,24 @@
#include "Common/MsgHandler.h"
#include "Common/Thread.h"
@@ -1562,8 +1777,8 @@ diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/CommandBufferManager.cp
-std::unique_ptr g_command_buffer_mgr;
} // namespace Vulkan
diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h dolphin/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h
---- dolphin.orig/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h 2023-06-01 19:24:09.954003175 +0000
-+++ dolphin/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h 2023-09-26 18:02:22.836042087 +0000
@@ -22,10 +22,12 @@
namespace Vulkan
@@ -1703,8 +1918,8 @@ diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/CommandBufferManager.h
} // namespace Vulkan
diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/Constants.h dolphin/Source/Core/VideoBackends/Vulkan/Constants.h
---- dolphin.orig/Source/Core/VideoBackends/Vulkan/Constants.h 2023-06-01 19:24:09.954003175 +0000
-+++ dolphin/Source/Core/VideoBackends/Vulkan/Constants.h 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Vulkan/Constants.h 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Vulkan/Constants.h 2023-09-26 18:02:22.836042087 +0000
@@ -12,7 +12,7 @@
namespace Vulkan
{
@@ -1715,8 +1930,8 @@ diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/Constants.h dolphin/Sou
// Number of frames in flight, will be used to decide how many descriptor pools are used
constexpr size_t NUM_FRAMES_IN_FLIGHT = 2;
diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp dolphin/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp
---- dolphin.orig/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp 2023-06-01 19:24:09.954003175 +0000
-+++ dolphin/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp 2023-09-26 18:02:22.836042087 +0000
@@ -389,6 +389,8 @@ VkSampler ObjectCache::GetSampler(const
VkRenderPass ObjectCache::GetRenderPass(VkFormat color_format, VkFormat depth_format,
u32 multisamples, VkAttachmentLoadOp load_op)
@@ -1736,8 +1951,8 @@ diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/ObjectCache.cpp dolphin
vkDestroyRenderPass(g_vulkan_context->GetDevice(), it.second, nullptr);
m_render_pass_cache.clear();
diff -rupN dolphin.orig/Source/Core/VideoBackends/Vulkan/ObjectCache.h dolphin/Source/Core/VideoBackends/Vulkan/ObjectCache.h
---- dolphin.orig/Source/Core/VideoBackends/Vulkan/ObjectCache.h 2023-06-01 19:23:58.577633304 +0000
-+++ dolphin/Source/Core/VideoBackends/Vulkan/ObjectCache.h 2023-06-05 18:48:45.615838979 +0000
+--- dolphin.orig/Source/Core/VideoBackends/Vulkan/ObjectCache.h 2023-09-26 17:58:02.853996721 +0000
++++ dolphin/Source/Core/VideoBackends/Vulkan/ObjectCache.h 2023-09-26 18:02:22.836042087 +0000
@@ -7,6 +7,7 @@
#include
#include