From fb738bc24739704abcc87d87f25dd6a241c9719d Mon Sep 17 00:00:00 2001 From: Angelo Rosa Date: Thu, 23 Jan 2025 05:54:42 -0800 Subject: [PATCH 01/14] Optimize workflows by caching `apt install` (#2212) * optimize apt caches * change on push syntax * removing comments and check time improvements on following pushes * add recursive submodule fetch * Revert "add recursive submodule fetch" This reverts commit b059bda3b88aa7d81e4bee3348c9104536b15fd2. * restore old push on everyhing rule * fix libfuse2 uncaching package * moving qt deps outside from caching directives --- .github/workflows/build.yml | 48 ++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3da7163dd..a49ffefe9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,20 +24,27 @@ jobs: runs-on: ubuntu-24.04 continue-on-error: true steps: + - uses: actions/checkout@v4 with: fetch-depth: 0 + - name: Install run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' - sudo apt update - sudo apt install clang-format-18 + + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: clang-format-18 + version: 1.0 + - name: Build env: COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} run: ./.ci/clang-format.sh - + + get-info: runs-on: ubuntu-24.04 outputs: @@ -282,7 +289,13 @@ jobs: submodules: recursive - name: Install dependencies - run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev + run: | + sudo apt install -y libfuse2 + + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev clang build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev + version: 1.0 - name: Cache CMake Configuration uses: actions/cache@v4 @@ -338,7 +351,13 @@ jobs: submodules: recursive - name: Install dependencies - run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev + run: | + sudo apt install -y libfuse2 qt6-base-dev qt6-tools-dev qt6-multimedia-dev + + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev clang build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev + version: 1.0 - name: Cache CMake Configuration uses: actions/cache@v4 @@ -385,7 +404,13 @@ jobs: submodules: recursive - name: Install dependencies - run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev + run: | + sudo apt install -y libfuse2 + + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev gcc-14 build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev + version: 1.0 - name: Cache CMake Configuration uses: actions/cache@v4 @@ -421,7 +446,13 @@ jobs: submodules: recursive - name: Install dependencies - run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev + run: | + sudo apt install -y libfuse2 qt6-base-dev qt6-tools-dev qt6-multimedia-dev + + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev gcc-14 build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev + version: 1.0 - name: Cache CMake Configuration uses: actions/cache@v4 @@ -443,7 +474,8 @@ jobs: key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} - name: Configure CMake - run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + run: | + cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc) From 2e6c9b8f9866f48bd39dc35b25310e77e3fa89f6 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 23 Jan 2025 22:58:45 +0200 Subject: [PATCH 02/14] Revert "Optimize workflows by caching `apt install` (#2212)" (#2220) This reverts commit fb738bc24739704abcc87d87f25dd6a241c9719d. --- .github/workflows/build.yml | 48 +++++++------------------------------ 1 file changed, 8 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a49ffefe9..3da7163dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,27 +24,20 @@ jobs: runs-on: ubuntu-24.04 continue-on-error: true steps: - - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install run: | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main' - - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: clang-format-18 - version: 1.0 - + sudo apt update + sudo apt install clang-format-18 - name: Build env: COMMIT_RANGE: ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} run: ./.ci/clang-format.sh - - + get-info: runs-on: ubuntu-24.04 outputs: @@ -289,13 +282,7 @@ jobs: submodules: recursive - name: Install dependencies - run: | - sudo apt install -y libfuse2 - - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev clang build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev - version: 1.0 + run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev - name: Cache CMake Configuration uses: actions/cache@v4 @@ -351,13 +338,7 @@ jobs: submodules: recursive - name: Install dependencies - run: | - sudo apt install -y libfuse2 qt6-base-dev qt6-tools-dev qt6-multimedia-dev - - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev clang build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev - version: 1.0 + run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 clang build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev - name: Cache CMake Configuration uses: actions/cache@v4 @@ -404,13 +385,7 @@ jobs: submodules: recursive - name: Install dependencies - run: | - sudo apt install -y libfuse2 - - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev gcc-14 build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev - version: 1.0 + run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev - name: Cache CMake Configuration uses: actions/cache@v4 @@ -446,13 +421,7 @@ jobs: submodules: recursive - name: Install dependencies - run: | - sudo apt install -y libfuse2 qt6-base-dev qt6-tools-dev qt6-multimedia-dev - - - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev gcc-14 build-essential libasound2-dev libpulse-dev libopenal-dev libudev-dev - version: 1.0 + run: sudo apt-get update && sudo apt install -y libx11-dev libxext-dev libwayland-dev libdecor-0-dev libxkbcommon-dev libglfw3-dev libgles2-mesa-dev libfuse2 gcc-14 build-essential qt6-base-dev qt6-tools-dev qt6-multimedia-dev libasound2-dev libpulse-dev libopenal-dev libudev-dev - name: Cache CMake Configuration uses: actions/cache@v4 @@ -474,8 +443,7 @@ jobs: key: ${{ env.cache-name }}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }} - name: Configure CMake - run: | - cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + run: cmake --fresh -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=ON -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DENABLE_QT_GUI=ON -DENABLE_UPDATER=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel $(nproc) From cdca420a2e8579832c7ebffb7ec2ed8f9e74030c Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 23 Jan 2025 23:27:37 +0200 Subject: [PATCH 03/14] Update building-linux.md --- documents/building-linux.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/documents/building-linux.md b/documents/building-linux.md index 28b8c6056..eedcd6664 100644 --- a/documents/building-linux.md +++ b/documents/building-linux.md @@ -29,8 +29,7 @@ sudo dnf install clang git cmake libatomic alsa-lib-devel pipewire-jack-audio-co sudo pacman -S base-devel clang git cmake sndio jack2 openal qt6-base qt6-declarative qt6-multimedia sdl2 vulkan-validation-layers ``` -**Note**: The `shadps4-git` AUR package is not maintained by any of the developers, and it uses GCC as the compiler as opposed to Clang. Use at your own discretion. -#### OpenSUSE +**Note**: The `shadps4-git` AUR package is not maintained by any of the developers, and it uses the default compiler, which is often set to GCC. Use at your own discretion.#### OpenSUSE ``` sudo zypper install clang git cmake libasound2 libpulse-devel libsndio7 libjack-devel openal-soft-devel libopenssl-devel zlib-devel libedit-devel systemd-devel libevdev-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-linguist-devel qt6-gui-private-devel vulkan-devel vulkan-validationlayers From 0ebe817a28afc14511578d183f8ef2afce3905aa Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 23 Jan 2025 23:46:15 +0200 Subject: [PATCH 04/14] Update building-linux.md --- documents/building-linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documents/building-linux.md b/documents/building-linux.md index eedcd6664..2342e9afc 100644 --- a/documents/building-linux.md +++ b/documents/building-linux.md @@ -29,7 +29,7 @@ sudo dnf install clang git cmake libatomic alsa-lib-devel pipewire-jack-audio-co sudo pacman -S base-devel clang git cmake sndio jack2 openal qt6-base qt6-declarative qt6-multimedia sdl2 vulkan-validation-layers ``` -**Note**: The `shadps4-git` AUR package is not maintained by any of the developers, and it uses the default compiler, which is often set to GCC. Use at your own discretion.#### OpenSUSE +**Note** : The `shadps4-git` AUR package is not maintained by any of the developers, and it uses the default compiler, which is often set to GCC. Use at your own discretion.#### OpenSUSE ``` sudo zypper install clang git cmake libasound2 libpulse-devel libsndio7 libjack-devel openal-soft-devel libopenssl-devel zlib-devel libedit-devel systemd-devel libevdev-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-linguist-devel qt6-gui-private-devel vulkan-devel vulkan-validationlayers From cc4ddd28c3f3cfe978a0be75131a99ca4e86851b Mon Sep 17 00:00:00 2001 From: Log3rinioo <80830849+Log3rinioo@users.noreply.github.com> Date: Thu, 23 Jan 2025 22:56:06 +0100 Subject: [PATCH 05/14] Add missing Polish translations and fix typos (#2222) --- src/qt_gui/translations/pl_PL.ts | 86 ++++++++++++++++---------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/src/qt_gui/translations/pl_PL.ts b/src/qt_gui/translations/pl_PL.ts index 528e88337..85eb63bfb 100644 --- a/src/qt_gui/translations/pl_PL.ts +++ b/src/qt_gui/translations/pl_PL.ts @@ -52,7 +52,7 @@ Select which directory you want to install to. - Select which directory you want to install to. + Wybierz katalog, do którego chcesz zainstalować. @@ -130,35 +130,35 @@ Delete... - Delete... + Usuń... Delete Game - Delete Game + Usuń Grę Delete Update - Delete Update + Usuń Aktualizację Delete DLC - Delete DLC + Usuń DLC Compatibility... - Compatibility... + kompatybilność... Update database - Update database + Zaktualizuj bazę danych View report - View report + Wyświetl zgłoszenie Submit a report - Submit a report + Wyślij zgłoszenie Shortcut creation @@ -182,23 +182,23 @@ Game - Game + Gra requiresEnableSeparateUpdateFolder_MSG - This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it. + Ta funkcja wymaga do działania opcji „Włącz oddzielny folder aktualizacji”. Jeśli chcesz korzystać z tej funkcji, włącz ją. This game has no update to delete! - This game has no update to delete! + Ta gra nie ma aktualizacji do usunięcia! Update - Update + Aktualizacja This game has no DLC to delete! - This game has no DLC to delete! + Ta gra nie ma DLC do usunięcia! DLC @@ -206,11 +206,11 @@ Delete %1 - Delete %1 + Usuń %1 Are you sure you want to delete %1's %2 directory? - Are you sure you want to delete %1's %2 directory? + Czy na pewno chcesz usunąć katalog %1 z %2? @@ -249,7 +249,7 @@ Open shadPS4 Folder - Open shadPS4 Folder + Otwórz folder shadPS4 Exit @@ -546,7 +546,7 @@ Enable Separate Update Folder - Enable Separate Update Folder + Włącz oddzielny folder aktualizacji Default tab when opening settings @@ -574,11 +574,11 @@ Trophy Key - Trophy Key + Klucz trofeów Trophy - Trophy + Trofeum Logger @@ -722,7 +722,7 @@ Disable Trophy Pop-ups - Disable Trophy Pop-ups + Wyłącz wyskakujące okienka trofeów Play title music @@ -730,19 +730,19 @@ Update Compatibility Database On Startup - Update Compatibility Database On Startup + Aktualizuj bazę danych zgodności podczas uruchamiania Game Compatibility - Game Compatibility + Kompatybilność gier Display Compatibility Data - Display Compatibility Data + Wyświetl dane zgodności Update Compatibility Database - Update Compatibility Database + Aktualizuj bazę danych zgodności Volume @@ -750,7 +750,7 @@ Audio Backend - Audio Backend + Zaplecze audio Save @@ -786,7 +786,7 @@ separateUpdatesCheckBox - Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management. + Włącz oddzielny folder aktualizacji:\nUmożliwia instalowanie aktualizacji gier w oddzielnym folderze w celu łatwego zarządzania. showSplashCheckBox @@ -798,7 +798,7 @@ discordRPCCheckbox - Włącz Discord Rich Presence:\nWyświetla ikonę emuladora i odpowiednie informacje na twoim profilu Discord. + Włącz Discord Rich Presence:\nWyświetla ikonę emulatora i odpowiednie informacje na twoim profilu Discord. userName @@ -806,7 +806,7 @@ TrophyKey - Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters. + Klucz trofeów:\nKlucz używany do odszyfrowywania trofeów. Musi być uzyskany z konsoli po jailbreaku. Musi zawierać tylko znaki w kodzie szesnastkowym. logTypeGroupBox @@ -826,7 +826,7 @@ disableTrophycheckBox - Disable Trophy Pop-ups:\nDisable in-game trophy notifications. Trophy progress can still be tracked using the Trophy Viewer (right-click the game in the main window). + Wyłącz wyskakujące okienka trofeów:\nWyłącz powiadomienia o trofeach w grze. Postępy w zdobywaniu trofeów można nadal śledzić za pomocą przeglądarki trofeów (kliknij prawym przyciskiem myszy grę w oknie głównym). hideCursorGroupBox @@ -842,15 +842,15 @@ enableCompatibilityCheckBox - Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information. + Wyświetl dane zgodności:\nWyświetla informacje o kompatybilności gry w widoku tabeli. Włącz opcję „Aktualizuj zgodność przy uruchomieniu”, aby uzyskać aktualne informacje. checkCompatibilityOnStartupCheckBox - Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts. + Aktualizuj zgodność przy uruchomieniu:\nAutomatycznie aktualizuj bazę danych kompatybilności podczas uruchamiania shadPS4. updateCompatibilityButton - Update Compatibility Database:\nImmediately update the compatibility database. + Zaktualizuj bazę danych zgodności:\nNatychmiast zaktualizuj bazę danych zgodności. Never @@ -933,7 +933,7 @@ CheatsPatches Cheats / Patches for - Cheats / Patches for + Kody / Łatki dla defaultTextEdit_MSG @@ -1145,7 +1145,7 @@ Failed to parse JSON: - Nie udało się przeanlizować JSON: + Nie udało się przeanalizować JSON: Can't apply cheats before the game is started @@ -1168,7 +1168,7 @@ Compatibility - Compatibility + Zgodność Region @@ -1196,7 +1196,7 @@ Never Played - Never Played + Nigdy nie grane h @@ -1212,27 +1212,27 @@ Compatibility is untested - Compatibility is untested + Kompatybilność nie została przetestowana Game does not initialize properly / crashes the emulator - Game does not initialize properly / crashes the emulator + Gra nie inicjuje się poprawnie / zawiesza się emulator Game boots, but only displays a blank screen - Game boots, but only displays a blank screen + Gra uruchamia się, ale wyświetla tylko pusty ekran Game displays an image but does not go past the menu - Game displays an image but does not go past the menu + Gra wyświetla obraz, ale nie przechodzi do menu Game has game-breaking glitches or unplayable performance - Game has game-breaking glitches or unplayable performance + Gra ma usterki przerywające rozgrywkę lub niegrywalną wydajność Game can be completed with playable performance and no major glitches - Game can be completed with playable performance and no major glitches + Grę można ukończyć z grywalną wydajnością i bez większych usterek From e652369f22fc7cbdd456ce338dd1dae0974c69a4 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Thu, 23 Jan 2025 23:58:43 +0200 Subject: [PATCH 06/14] sdl3 update (#2221) --- externals/MoltenVK/MoltenVK | 2 +- externals/sdl3 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/externals/MoltenVK/MoltenVK b/externals/MoltenVK/MoltenVK index 9f0b616d9..2473ce6f0 160000 --- a/externals/MoltenVK/MoltenVK +++ b/externals/MoltenVK/MoltenVK @@ -1 +1 @@ -Subproject commit 9f0b616d9e2c39464d2a859b79dbc655c4a30e7e +Subproject commit 2473ce6f0ab7d5d8a49aa91b2e37f3447a939f18 diff --git a/externals/sdl3 b/externals/sdl3 index 22422f774..a336b62d8 160000 --- a/externals/sdl3 +++ b/externals/sdl3 @@ -1 +1 @@ -Subproject commit 22422f7748d5128135995ed34c8f8012861c7332 +Subproject commit a336b62d8b0b97b09214e053203e442e2b6e2be5 From a8a779c79b48f020a1432274114f1ddaff0b1dec Mon Sep 17 00:00:00 2001 From: DanielSvoboda Date: Fri, 24 Jan 2025 05:11:48 -0300 Subject: [PATCH 07/14] Fix AutoUpdate Changelog (#2224) --- src/qt_gui/check_update.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qt_gui/check_update.cpp b/src/qt_gui/check_update.cpp index e3e019144..0c1cce5da 100644 --- a/src/qt_gui/check_update.cpp +++ b/src/qt_gui/check_update.cpp @@ -146,14 +146,14 @@ void CheckUpdate::CheckForUpdates(const bool showMessage) { } QString currentRev = (updateChannel == "Nightly") - ? QString::fromStdString(Common::g_scm_rev).left(7) + ? QString::fromStdString(Common::g_scm_rev) : "v." + QString::fromStdString(Common::VERSION); QString currentDate = Common::g_scm_date; QDateTime dateTime = QDateTime::fromString(latestDate, Qt::ISODate); latestDate = dateTime.isValid() ? dateTime.toString("yyyy-MM-dd HH:mm:ss") : "Unknown date"; - if (latestRev == currentRev) { + if (latestRev == currentRev.left(7)) { if (showMessage) { QMessageBox::information(this, tr("Auto Updater"), tr("Your version is already up to date!")); @@ -190,7 +190,7 @@ void CheckUpdate::setupUI(const QString& downloadUrl, const QString& latestDate, QString("


" + tr("Update Channel") + ":
" + updateChannel + "
" + tr("Current Version") + ": %1 (%2)
" + tr("Latest Version") + ": %3 (%4)

" + tr("Do you want to update?") + "

") - .arg(currentRev, currentDate, latestRev, latestDate); + .arg(currentRev.left(7), currentDate, latestRev, latestDate); QLabel* updateLabel = new QLabel(updateText, this); layout->addWidget(updateLabel); From 91444a05453ba1468b29c575d844ae173cc7e738 Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Fri, 24 Jan 2025 00:21:32 -0800 Subject: [PATCH 08/14] liverpool: Fix tiled check for color buffer. (#2227) --- src/video_core/amdgpu/liverpool.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video_core/amdgpu/liverpool.h b/src/video_core/amdgpu/liverpool.h index a29bde4ce..ec9c92ef1 100644 --- a/src/video_core/amdgpu/liverpool.h +++ b/src/video_core/amdgpu/liverpool.h @@ -904,7 +904,7 @@ struct Liverpool { } bool IsTiled() const { - return !info.linear_general; + return GetTilingMode() != TilingMode::Display_Linear; } [[nodiscard]] DataFormat GetDataFmt() const { From 74710116f6bdd805c39ffe7fff4be017df3ac910 Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Fri, 24 Jan 2025 00:21:56 -0800 Subject: [PATCH 09/14] renderer_vulkan: Remove dead code. (#2228) --- CMakeLists.txt | 2 - .../vk_descriptor_update_queue.cpp | 108 ------------------ .../vk_descriptor_update_queue.h | 51 --------- 3 files changed, 161 deletions(-) delete mode 100644 src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp delete mode 100644 src/video_core/renderer_vulkan/vk_descriptor_update_queue.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 131809c8e..3db142be7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -751,8 +751,6 @@ set(VIDEO_CORE src/video_core/amdgpu/liverpool.cpp src/video_core/renderer_vulkan/vk_common.h src/video_core/renderer_vulkan/vk_compute_pipeline.cpp src/video_core/renderer_vulkan/vk_compute_pipeline.h - src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp - src/video_core/renderer_vulkan/vk_descriptor_update_queue.h src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp src/video_core/renderer_vulkan/vk_graphics_pipeline.h src/video_core/renderer_vulkan/vk_instance.cpp diff --git a/src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp b/src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp deleted file mode 100644 index 7699bea9d..000000000 --- a/src/video_core/renderer_vulkan/vk_descriptor_update_queue.cpp +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include "video_core/renderer_vulkan/vk_descriptor_update_queue.h" -#include "video_core/renderer_vulkan/vk_instance.h" - -namespace Vulkan { - -DescriptorUpdateQueue::DescriptorUpdateQueue(const Instance& instance, u32 descriptor_write_max_) - : device{instance.GetDevice()}, descriptor_write_max{descriptor_write_max_} { - descriptor_infos = std::make_unique(descriptor_write_max); - descriptor_writes = std::make_unique(descriptor_write_max); -} - -void DescriptorUpdateQueue::Flush() { - if (descriptor_write_end == 0) { - return; - } - device.updateDescriptorSets({std::span(descriptor_writes.get(), descriptor_write_end)}, {}); - descriptor_write_end = 0; -} - -void DescriptorUpdateQueue::AddStorageImage(vk::DescriptorSet target, u8 binding, - vk::ImageView image_view, - vk::ImageLayout image_layout) { - if (descriptor_write_end >= descriptor_write_max) [[unlikely]] { - Flush(); - } - - auto& image_info = descriptor_infos[descriptor_write_end].image_info; - image_info.sampler = VK_NULL_HANDLE; - image_info.imageView = image_view; - image_info.imageLayout = image_layout; - - descriptor_writes[descriptor_write_end++] = vk::WriteDescriptorSet{ - .dstSet = target, - .dstBinding = binding, - .dstArrayElement = 0, - .descriptorCount = 1, - .descriptorType = vk::DescriptorType::eStorageImage, - .pImageInfo = &image_info, - }; -} - -void DescriptorUpdateQueue::AddImageSampler(vk::DescriptorSet target, u8 binding, u8 array_index, - vk::ImageView image_view, vk::Sampler sampler, - vk::ImageLayout image_layout) { - if (descriptor_write_end >= descriptor_write_max) [[unlikely]] { - Flush(); - } - - auto& image_info = descriptor_infos[descriptor_write_end].image_info; - image_info.sampler = sampler; - image_info.imageView = image_view; - image_info.imageLayout = image_layout; - - descriptor_writes[descriptor_write_end++] = vk::WriteDescriptorSet{ - .dstSet = target, - .dstBinding = binding, - .dstArrayElement = array_index, - .descriptorCount = 1, - .descriptorType = - sampler ? vk::DescriptorType::eCombinedImageSampler : vk::DescriptorType::eSampledImage, - .pImageInfo = &image_info, - }; -} - -void DescriptorUpdateQueue::AddBuffer(vk::DescriptorSet target, u8 binding, vk::Buffer buffer, - vk::DeviceSize offset, vk::DeviceSize size, - vk::DescriptorType type) { - if (descriptor_write_end >= descriptor_write_max) [[unlikely]] { - Flush(); - } - - auto& buffer_info = descriptor_infos[descriptor_write_end].buffer_info; - buffer_info.buffer = buffer; - buffer_info.offset = offset; - buffer_info.range = size; - - descriptor_writes[descriptor_write_end++] = vk::WriteDescriptorSet{ - .dstSet = target, - .dstBinding = binding, - .dstArrayElement = 0, - .descriptorCount = 1, - .descriptorType = type, - .pBufferInfo = &buffer_info, - }; -} - -void DescriptorUpdateQueue::AddTexelBuffer(vk::DescriptorSet target, u8 binding, - vk::BufferView buffer_view) { - if (descriptor_write_end >= descriptor_write_max) [[unlikely]] { - Flush(); - } - - auto& buffer_info = descriptor_infos[descriptor_write_end].buffer_view; - buffer_info = buffer_view; - descriptor_writes[descriptor_write_end++] = vk::WriteDescriptorSet{ - .dstSet = target, - .dstBinding = binding, - .dstArrayElement = 0, - .descriptorCount = 1, - .descriptorType = vk::DescriptorType::eUniformTexelBuffer, - .pTexelBufferView = &buffer_info, - }; -} - -} // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_descriptor_update_queue.h b/src/video_core/renderer_vulkan/vk_descriptor_update_queue.h deleted file mode 100644 index 9e864db6e..000000000 --- a/src/video_core/renderer_vulkan/vk_descriptor_update_queue.h +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project -// SPDX-License-Identifier: GPL-2.0-or-later - -#include - -#include "common/types.h" -#include "video_core/renderer_vulkan/vk_common.h" - -namespace Vulkan { - -class Instance; - -struct DescriptorInfoUnion { - DescriptorInfoUnion() {} - - union { - vk::DescriptorImageInfo image_info; - vk::DescriptorBufferInfo buffer_info; - vk::BufferView buffer_view; - }; -}; - -class DescriptorUpdateQueue { -public: - explicit DescriptorUpdateQueue(const Instance& instance, u32 descriptor_write_max = 2048); - ~DescriptorUpdateQueue() = default; - - void Flush(); - - void AddStorageImage(vk::DescriptorSet target, u8 binding, vk::ImageView image_view, - vk::ImageLayout image_layout = vk::ImageLayout::eGeneral); - - void AddImageSampler(vk::DescriptorSet target, u8 binding, u8 array_index, - vk::ImageView image_view, vk::Sampler sampler, - vk::ImageLayout imageLayout = vk::ImageLayout::eGeneral); - - void AddBuffer(vk::DescriptorSet target, u8 binding, vk::Buffer buffer, vk::DeviceSize offset, - vk::DeviceSize size = VK_WHOLE_SIZE, - vk::DescriptorType type = vk::DescriptorType::eUniformBufferDynamic); - - void AddTexelBuffer(vk::DescriptorSet target, u8 binding, vk::BufferView buffer_view); - -private: - const vk::Device device; - const u32 descriptor_write_max; - std::unique_ptr descriptor_infos; - std::unique_ptr descriptor_writes; - u32 descriptor_write_end = 0; -}; - -} // namespace Vulkan From d1b9a5adcceb0c61e03293db9840ca6844442398 Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Fri, 24 Jan 2025 00:23:18 -0800 Subject: [PATCH 10/14] texture_cache: Do not overwrite overlap hit with a miss. (#2217) --- src/video_core/texture_cache/texture_cache.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/video_core/texture_cache/texture_cache.cpp b/src/video_core/texture_cache/texture_cache.cpp index 04711539c..e995b10b2 100644 --- a/src/video_core/texture_cache/texture_cache.cpp +++ b/src/video_core/texture_cache/texture_cache.cpp @@ -345,8 +345,13 @@ ImageId TextureCache::FindImage(BaseDesc& desc, FindFlags flags) { view_slice = -1; const auto& merged_info = image_id ? slot_images[image_id].info : info; - std::tie(image_id, view_mip, view_slice) = + auto [overlap_image_id, overlap_view_mip, overlap_view_slice] = ResolveOverlap(merged_info, desc.type, cache_id, image_id); + if (overlap_image_id) { + image_id = overlap_image_id; + view_mip = overlap_view_mip; + view_slice = overlap_view_slice; + } } } From 481f420a892e02ac30bfe3e4966368900c69ead2 Mon Sep 17 00:00:00 2001 From: georgemoralis Date: Fri, 24 Jan 2025 10:28:14 +0200 Subject: [PATCH 11/14] Update building-linux.md --- documents/building-linux.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/documents/building-linux.md b/documents/building-linux.md index 2342e9afc..4aa66aac6 100644 --- a/documents/building-linux.md +++ b/documents/building-linux.md @@ -29,7 +29,9 @@ sudo dnf install clang git cmake libatomic alsa-lib-devel pipewire-jack-audio-co sudo pacman -S base-devel clang git cmake sndio jack2 openal qt6-base qt6-declarative qt6-multimedia sdl2 vulkan-validation-layers ``` -**Note** : The `shadps4-git` AUR package is not maintained by any of the developers, and it uses the default compiler, which is often set to GCC. Use at your own discretion.#### OpenSUSE +**Note** : The `shadps4-git` AUR package is not maintained by any of the developers, and it uses the default compiler, which is often set to GCC. Use at your own discretion. + +#### OpenSUSE ``` sudo zypper install clang git cmake libasound2 libpulse-devel libsndio7 libjack-devel openal-soft-devel libopenssl-devel zlib-devel libedit-devel systemd-devel libevdev-devel qt6-base-devel qt6-multimedia-devel qt6-svg-devel qt6-linguist-devel qt6-gui-private-devel vulkan-devel vulkan-validationlayers @@ -48,6 +50,7 @@ distrobox create --name archlinux --init --image archlinux:latest and install the dependencies on that container as cited above. This option is **highly recommended** for NixOS and distributions with immutable/atomic filesystems (example: Fedora Kinoite, SteamOS). + ### Cloning ``` From 0f69697acb7504e57abe2b15238b2c92414a0d8f Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Fri, 24 Jan 2025 00:48:39 -0800 Subject: [PATCH 12/14] documents: Update CPU requirements. (#2229) --- documents/Quickstart/Quickstart.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/documents/Quickstart/Quickstart.md b/documents/Quickstart/Quickstart.md index b2931e51e..2f2751887 100644 --- a/documents/Quickstart/Quickstart.md +++ b/documents/Quickstart/Quickstart.md @@ -22,7 +22,10 @@ SPDX-License-Identifier: GPL-2.0-or-later - A processor with at least 4 cores and 6 threads - Above 2.5 GHz frequency -- required support AVX2 extension or Rosetta 2 on ARM +- A CPU supporting the following instruction sets: MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, F16C, CLMUL, AES, BMI1, MOVBE, XSAVE, ABM + - **Intel**: Haswell generation or newer + - **AMD**: Jaguar generation or newer + - **Apple**: Rosetta 2 on macOS 15 or newer ### GPU From 9dcf40e261c6775a997b92d26a4bd8113821c6ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Miko=C5=82ajczyk?= Date: Fri, 24 Jan 2025 11:07:36 +0000 Subject: [PATCH 13/14] Handle more 64bit shifts in Translator (#1825) --- .../frontend/translate/scalar_alu.cpp | 22 ++++++++++++++++++- .../frontend/translate/translate.h | 2 ++ .../frontend/translate/vector_alu.cpp | 4 ++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/shader_recompiler/frontend/translate/scalar_alu.cpp b/src/shader_recompiler/frontend/translate/scalar_alu.cpp index 7f34126f5..b1b260fde 100644 --- a/src/shader_recompiler/frontend/translate/scalar_alu.cpp +++ b/src/shader_recompiler/frontend/translate/scalar_alu.cpp @@ -72,10 +72,14 @@ void Translator::EmitScalarAlu(const GcnInst& inst) { return S_OR_B64(NegateMode::Result, true, inst); case Opcode::S_LSHL_B32: return S_LSHL_B32(inst); + case Opcode::S_LSHL_B64: + return S_LSHL_B64(inst); case Opcode::S_LSHR_B32: return S_LSHR_B32(inst); case Opcode::S_ASHR_I32: return S_ASHR_I32(inst); + case Opcode::S_ASHR_I64: + return S_ASHR_I64(inst); case Opcode::S_BFM_B32: return S_BFM_B32(inst); case Opcode::S_MUL_I32: @@ -420,6 +424,14 @@ void Translator::S_LSHL_B32(const GcnInst& inst) { ir.SetScc(ir.INotEqual(result, ir.Imm32(0))); } +void Translator::S_LSHL_B64(const GcnInst& inst) { + const IR::U64 src0{GetSrc64(inst.src[0])}; + const IR::U64 src1{GetSrc64(inst.src[1])}; + const IR::U64 result = ir.ShiftLeftLogical(src0, ir.BitwiseAnd(src1, ir.Imm64(u64(0x3F)))); + SetDst64(inst.dst[0], result); + ir.SetScc(ir.INotEqual(result, ir.Imm64(u64(0)))); +} + void Translator::S_LSHR_B32(const GcnInst& inst) { const IR::U32 src0{GetSrc(inst.src[0])}; const IR::U32 src1{GetSrc(inst.src[1])}; @@ -431,11 +443,19 @@ void Translator::S_LSHR_B32(const GcnInst& inst) { void Translator::S_ASHR_I32(const GcnInst& inst) { const IR::U32 src0{GetSrc(inst.src[0])}; const IR::U32 src1{GetSrc(inst.src[1])}; - const IR::U32 result{ir.ShiftRightArithmetic(src0, src1)}; + const IR::U32 result{ir.ShiftRightArithmetic(src0, ir.BitwiseAnd(src1, ir.Imm32(0x1F)))}; SetDst(inst.dst[0], result); ir.SetScc(ir.INotEqual(result, ir.Imm32(0))); } +void Translator::S_ASHR_I64(const GcnInst& inst) { + const IR::U64 src0{GetSrc64(inst.src[0])}; + const IR::U64 src1{GetSrc64(inst.src[1])}; + const IR::U64 result{ir.ShiftRightArithmetic(src0, ir.BitwiseAnd(src1, ir.Imm64(u64(0x3F))))}; + SetDst64(inst.dst[0], result); + ir.SetScc(ir.INotEqual(result, ir.Imm64(u64(0)))); +} + void Translator::S_BFM_B32(const GcnInst& inst) { const IR::U32 src0{ir.BitwiseAnd(GetSrc(inst.src[0]), ir.Imm32(0x1F))}; const IR::U32 src1{ir.BitwiseAnd(GetSrc(inst.src[1]), ir.Imm32(0x1F))}; diff --git a/src/shader_recompiler/frontend/translate/translate.h b/src/shader_recompiler/frontend/translate/translate.h index bef61f997..496455b50 100644 --- a/src/shader_recompiler/frontend/translate/translate.h +++ b/src/shader_recompiler/frontend/translate/translate.h @@ -90,8 +90,10 @@ public: void S_OR_B64(NegateMode negate, bool is_xor, const GcnInst& inst); void S_XOR_B32(const GcnInst& inst); void S_LSHL_B32(const GcnInst& inst); + void S_LSHL_B64(const GcnInst& inst); void S_LSHR_B32(const GcnInst& inst); void S_ASHR_I32(const GcnInst& inst); + void S_ASHR_I64(const GcnInst& inst); void S_BFM_B32(const GcnInst& inst); void S_MUL_I32(const GcnInst& inst); void S_BFE(const GcnInst& inst, bool is_signed); diff --git a/src/shader_recompiler/frontend/translate/vector_alu.cpp b/src/shader_recompiler/frontend/translate/vector_alu.cpp index b2863f6a8..ac72293e4 100644 --- a/src/shader_recompiler/frontend/translate/vector_alu.cpp +++ b/src/shader_recompiler/frontend/translate/vector_alu.cpp @@ -1273,6 +1273,10 @@ void Translator::V_LSHL_B64(const GcnInst& inst) { ir.SetVectorReg(dst_reg + 1, ir.Imm32(static_cast(result >> 32))); return; } + + const IR::U64 result = ir.ShiftLeftLogical(src0, ir.BitwiseAnd(src1, ir.Imm64(u64(0x3F)))); + SetDst64(inst.dst[0], result); + return; } UNREACHABLE_MSG("Unimplemented V_LSHL_B64 arguments"); } From 4d12de8149cce521916f7752a0830430170144db Mon Sep 17 00:00:00 2001 From: squidbus <175574877+squidbus@users.noreply.github.com> Date: Fri, 24 Jan 2025 03:11:13 -0800 Subject: [PATCH 14/14] hotfix: 64-bit shift fixups --- .../backend/spirv/emit_spirv_instructions.h | 3 ++- .../backend/spirv/emit_spirv_integer.cpp | 6 ++++- .../frontend/translate/vector_alu.cpp | 23 +------------------ src/shader_recompiler/ir/ir_emitter.cpp | 14 +++++++++-- src/shader_recompiler/ir/ir_emitter.h | 2 +- src/shader_recompiler/ir/opcodes.inc | 3 ++- .../ir/passes/constant_propagation_pass.cpp | 5 +++- 7 files changed, 27 insertions(+), 29 deletions(-) diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h index f0bb9fd7e..4833dc9d0 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h +++ b/src/shader_recompiler/backend/spirv/emit_spirv_instructions.h @@ -348,7 +348,8 @@ Id EmitSLessThanEqual(EmitContext& ctx, Id lhs, Id rhs); Id EmitULessThanEqual(EmitContext& ctx, Id lhs, Id rhs); Id EmitSGreaterThan(EmitContext& ctx, Id lhs, Id rhs); Id EmitUGreaterThan(EmitContext& ctx, Id lhs, Id rhs); -Id EmitINotEqual(EmitContext& ctx, Id lhs, Id rhs); +Id EmitINotEqual32(EmitContext& ctx, Id lhs, Id rhs); +Id EmitINotEqual64(EmitContext& ctx, Id lhs, Id rhs); Id EmitSGreaterThanEqual(EmitContext& ctx, Id lhs, Id rhs); Id EmitUGreaterThanEqual(EmitContext& ctx, Id lhs, Id rhs); Id EmitLogicalOr(EmitContext& ctx, Id a, Id b); diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp index 70411ecec..e2d702389 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp @@ -324,7 +324,11 @@ Id EmitUGreaterThan(EmitContext& ctx, Id lhs, Id rhs) { return ctx.OpUGreaterThan(ctx.U1[1], lhs, rhs); } -Id EmitINotEqual(EmitContext& ctx, Id lhs, Id rhs) { +Id EmitINotEqual32(EmitContext& ctx, Id lhs, Id rhs) { + return ctx.OpINotEqual(ctx.U1[1], lhs, rhs); +} + +Id EmitINotEqual64(EmitContext& ctx, Id lhs, Id rhs) { return ctx.OpINotEqual(ctx.U1[1], lhs, rhs); } diff --git a/src/shader_recompiler/frontend/translate/vector_alu.cpp b/src/shader_recompiler/frontend/translate/vector_alu.cpp index ac72293e4..42dbcc513 100644 --- a/src/shader_recompiler/frontend/translate/vector_alu.cpp +++ b/src/shader_recompiler/frontend/translate/vector_alu.cpp @@ -1257,28 +1257,7 @@ void Translator::V_CVT_PK_U8_F32(const GcnInst& inst) { void Translator::V_LSHL_B64(const GcnInst& inst) { const IR::U64 src0{GetSrc64(inst.src[0])}; const IR::U64 src1{GetSrc64(inst.src[1])}; - const IR::VectorReg dst_reg{inst.dst[0].code}; - if (src0.IsImmediate()) { - if (src0.U64() == -1) { - // If src0 is a fixed -1, the result will always be -1. - ir.SetVectorReg(dst_reg, ir.Imm32(0xFFFFFFFF)); - ir.SetVectorReg(dst_reg + 1, ir.Imm32(0xFFFFFFFF)); - return; - } - if (src1.IsImmediate()) { - // If both src0 and src1 are immediates, we can calculate the result now. - // Note that according to the manual, only bits 4:0 are used from src1. - const u64 result = src0.U64() << (src1.U64() & 0x1F); - ir.SetVectorReg(dst_reg, ir.Imm32(static_cast(result))); - ir.SetVectorReg(dst_reg + 1, ir.Imm32(static_cast(result >> 32))); - return; - } - - const IR::U64 result = ir.ShiftLeftLogical(src0, ir.BitwiseAnd(src1, ir.Imm64(u64(0x3F)))); - SetDst64(inst.dst[0], result); - return; - } - UNREACHABLE_MSG("Unimplemented V_LSHL_B64 arguments"); + SetDst64(inst.dst[0], ir.ShiftLeftLogical(src0, ir.BitwiseAnd(src1, ir.Imm64(u64(0x3F))))); } void Translator::V_MUL_F64(const GcnInst& inst) { diff --git a/src/shader_recompiler/ir/ir_emitter.cpp b/src/shader_recompiler/ir/ir_emitter.cpp index 5ac08e7dc..f0558665b 100644 --- a/src/shader_recompiler/ir/ir_emitter.cpp +++ b/src/shader_recompiler/ir/ir_emitter.cpp @@ -1461,8 +1461,18 @@ U1 IREmitter::IGreaterThan(const U32& lhs, const U32& rhs, bool is_signed) { return Inst(is_signed ? Opcode::SGreaterThan : Opcode::UGreaterThan, lhs, rhs); } -U1 IREmitter::INotEqual(const U32& lhs, const U32& rhs) { - return Inst(Opcode::INotEqual, lhs, rhs); +U1 IREmitter::INotEqual(const U32U64& lhs, const U32U64& rhs) { + if (lhs.Type() != rhs.Type()) { + UNREACHABLE_MSG("Mismatching types {} and {}", lhs.Type(), rhs.Type()); + } + switch (lhs.Type()) { + case Type::U32: + return Inst(Opcode::INotEqual32, lhs, rhs); + case Type::U64: + return Inst(Opcode::INotEqual64, lhs, rhs); + default: + ThrowInvalidType(lhs.Type()); + } } U1 IREmitter::IGreaterThanEqual(const U32& lhs, const U32& rhs, bool is_signed) { diff --git a/src/shader_recompiler/ir/ir_emitter.h b/src/shader_recompiler/ir/ir_emitter.h index d1dc44d74..5dd49ce7a 100644 --- a/src/shader_recompiler/ir/ir_emitter.h +++ b/src/shader_recompiler/ir/ir_emitter.h @@ -258,7 +258,7 @@ public: [[nodiscard]] U1 IEqual(const U32U64& lhs, const U32U64& rhs); [[nodiscard]] U1 ILessThanEqual(const U32& lhs, const U32& rhs, bool is_signed); [[nodiscard]] U1 IGreaterThan(const U32& lhs, const U32& rhs, bool is_signed); - [[nodiscard]] U1 INotEqual(const U32& lhs, const U32& rhs); + [[nodiscard]] U1 INotEqual(const U32U64& lhs, const U32U64& rhs); [[nodiscard]] U1 IGreaterThanEqual(const U32& lhs, const U32& rhs, bool is_signed); [[nodiscard]] U1 LogicalOr(const U1& a, const U1& b); diff --git a/src/shader_recompiler/ir/opcodes.inc b/src/shader_recompiler/ir/opcodes.inc index b45151dba..63a4e1e62 100644 --- a/src/shader_recompiler/ir/opcodes.inc +++ b/src/shader_recompiler/ir/opcodes.inc @@ -321,7 +321,8 @@ OPCODE(SLessThanEqual, U1, U32, OPCODE(ULessThanEqual, U1, U32, U32, ) OPCODE(SGreaterThan, U1, U32, U32, ) OPCODE(UGreaterThan, U1, U32, U32, ) -OPCODE(INotEqual, U1, U32, U32, ) +OPCODE(INotEqual32, U1, U32, U32, ) +OPCODE(INotEqual64, U1, U64, U64, ) OPCODE(SGreaterThanEqual, U1, U32, U32, ) OPCODE(UGreaterThanEqual, U1, U32, U32, ) diff --git a/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp b/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp index 26d819d8e..12a1b56e9 100644 --- a/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp +++ b/src/shader_recompiler/ir/passes/constant_propagation_pass.cpp @@ -403,9 +403,12 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) { case IR::Opcode::IEqual64: FoldWhenAllImmediates(inst, [](u64 a, u64 b) { return a == b; }); return; - case IR::Opcode::INotEqual: + case IR::Opcode::INotEqual32: FoldWhenAllImmediates(inst, [](u32 a, u32 b) { return a != b; }); return; + case IR::Opcode::INotEqual64: + FoldWhenAllImmediates(inst, [](u64 a, u64 b) { return a != b; }); + return; case IR::Opcode::BitwiseAnd32: FoldWhenAllImmediates(inst, [](u32 a, u32 b) { return a & b; }); return;