mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-02-02 19:48:50 +00:00
Merge remote-tracking branch 'origin/main' into fork-detection
This commit is contained in:
commit
54b191054f
CMakeLists.txt
documents
externals
src
qt_gui
shader_recompiler
backend/spirv
frontend/translate
ir
video_core
amdgpu
renderer_vulkan
texture_cache
|
@ -769,8 +769,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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@ 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.
|
||||
**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
|
||||
|
||||
```
|
||||
|
@ -49,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
|
||||
|
||||
```
|
||||
|
|
2
externals/MoltenVK/MoltenVK
vendored
2
externals/MoltenVK/MoltenVK
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 9f0b616d9e2c39464d2a859b79dbc655c4a30e7e
|
||||
Subproject commit 2473ce6f0ab7d5d8a49aa91b2e37f3447a939f18
|
2
externals/sdl3
vendored
2
externals/sdl3
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 22422f7748d5128135995ed34c8f8012861c7332
|
||||
Subproject commit a336b62d8b0b97b09214e053203e442e2b6e2be5
|
|
@ -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("<p><b><br>" + tr("Update Channel") + ": </b>" + updateChannel + "<br><b>" +
|
||||
tr("Current Version") + ":</b> %1 (%2)<br><b>" + tr("Latest Version") +
|
||||
":</b> %3 (%4)</p><p>" + tr("Do you want to update?") + "</p>")
|
||||
.arg(currentRev, currentDate, latestRev, latestDate);
|
||||
.arg(currentRev.left(7), currentDate, latestRev, latestDate);
|
||||
QLabel* updateLabel = new QLabel(updateText, this);
|
||||
layout->addWidget(updateLabel);
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Select which directory you want to install to.</source>
|
||||
<translation>Select which directory you want to install to.</translation>
|
||||
<translation>Wybierz katalog, do którego chcesz zainstalować.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -130,35 +130,35 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Delete...</source>
|
||||
<translation>Delete...</translation>
|
||||
<translation>Usuń...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete Game</source>
|
||||
<translation>Delete Game</translation>
|
||||
<translation>Usuń Grę</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete Update</source>
|
||||
<translation>Delete Update</translation>
|
||||
<translation>Usuń Aktualizację</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete DLC</source>
|
||||
<translation>Delete DLC</translation>
|
||||
<translation>Usuń DLC</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Compatibility...</source>
|
||||
<translation>Compatibility...</translation>
|
||||
<translation>kompatybilność...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Update database</source>
|
||||
<translation>Update database</translation>
|
||||
<translation>Zaktualizuj bazę danych</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>View report</source>
|
||||
<translation>View report</translation>
|
||||
<translation>Wyświetl zgłoszenie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Submit a report</source>
|
||||
<translation>Submit a report</translation>
|
||||
<translation>Wyślij zgłoszenie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shortcut creation</source>
|
||||
|
@ -182,23 +182,23 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Game</source>
|
||||
<translation>Game</translation>
|
||||
<translation>Gra</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>requiresEnableSeparateUpdateFolder_MSG</source>
|
||||
<translation>This feature requires the 'Enable Separate Update Folder' config option to work. If you want to use this feature, please enable it.</translation>
|
||||
<translation>Ta funkcja wymaga do działania opcji „Włącz oddzielny folder aktualizacji”. Jeśli chcesz korzystać z tej funkcji, włącz ją.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This game has no update to delete!</source>
|
||||
<translation>This game has no update to delete!</translation>
|
||||
<translation>Ta gra nie ma aktualizacji do usunięcia!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Update</source>
|
||||
<translation>Update</translation>
|
||||
<translation>Aktualizacja</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>This game has no DLC to delete!</source>
|
||||
<translation>This game has no DLC to delete!</translation>
|
||||
<translation>Ta gra nie ma DLC do usunięcia!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>DLC</source>
|
||||
|
@ -206,11 +206,11 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Delete %1</source>
|
||||
<translation>Delete %1</translation>
|
||||
<translation>Usuń %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Are you sure you want to delete %1's %2 directory?</source>
|
||||
<translation>Are you sure you want to delete %1's %2 directory?</translation>
|
||||
<translation>Czy na pewno chcesz usunąć katalog %1 z %2?</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -249,7 +249,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Open shadPS4 Folder</source>
|
||||
<translation>Open shadPS4 Folder</translation>
|
||||
<translation>Otwórz folder shadPS4</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exit</source>
|
||||
|
@ -546,7 +546,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Enable Separate Update Folder</source>
|
||||
<translation>Enable Separate Update Folder</translation>
|
||||
<translation>Włącz oddzielny folder aktualizacji</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Default tab when opening settings</source>
|
||||
|
@ -574,11 +574,11 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Trophy Key</source>
|
||||
<translation>Trophy Key</translation>
|
||||
<translation>Klucz trofeów</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Trophy</source>
|
||||
<translation>Trophy</translation>
|
||||
<translation>Trofeum</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Logger</source>
|
||||
|
@ -722,7 +722,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Disable Trophy Pop-ups</source>
|
||||
<translation>Disable Trophy Pop-ups</translation>
|
||||
<translation>Wyłącz wyskakujące okienka trofeów</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Play title music</source>
|
||||
|
@ -730,19 +730,19 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Update Compatibility Database On Startup</source>
|
||||
<translation>Update Compatibility Database On Startup</translation>
|
||||
<translation>Aktualizuj bazę danych zgodności podczas uruchamiania</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Game Compatibility</source>
|
||||
<translation>Game Compatibility</translation>
|
||||
<translation>Kompatybilność gier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display Compatibility Data</source>
|
||||
<translation>Display Compatibility Data</translation>
|
||||
<translation>Wyświetl dane zgodności</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Update Compatibility Database</source>
|
||||
<translation>Update Compatibility Database</translation>
|
||||
<translation>Aktualizuj bazę danych zgodności</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Volume</source>
|
||||
|
@ -750,7 +750,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Audio Backend</source>
|
||||
<translation>Audio Backend</translation>
|
||||
<translation>Zaplecze audio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save</source>
|
||||
|
@ -786,7 +786,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>separateUpdatesCheckBox</source>
|
||||
<translation>Enable Separate Update Folder:\nEnables installing game updates into a separate folder for easy management.</translation>
|
||||
<translation>Włącz oddzielny folder aktualizacji:\nUmożliwia instalowanie aktualizacji gier w oddzielnym folderze w celu łatwego zarządzania.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>showSplashCheckBox</source>
|
||||
|
@ -798,7 +798,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>discordRPCCheckbox</source>
|
||||
<translation>Włącz Discord Rich Presence:\nWyświetla ikonę emuladora i odpowiednie informacje na twoim profilu Discord.</translation>
|
||||
<translation>Włącz Discord Rich Presence:\nWyświetla ikonę emulatora i odpowiednie informacje na twoim profilu Discord.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>userName</source>
|
||||
|
@ -806,7 +806,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>TrophyKey</source>
|
||||
<translation>Trophy Key:\nKey used to decrypt trophies. Must be obtained from your jailbroken console.\nMust contain only hex characters.</translation>
|
||||
<translation>Klucz trofeów:\nKlucz używany do odszyfrowywania trofeów. Musi być uzyskany z konsoli po jailbreaku. Musi zawierać tylko znaki w kodzie szesnastkowym.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>logTypeGroupBox</source>
|
||||
|
@ -826,7 +826,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>disableTrophycheckBox</source>
|
||||
<translation>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).</translation>
|
||||
<translation>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).</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideCursorGroupBox</source>
|
||||
|
@ -842,15 +842,15 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>enableCompatibilityCheckBox</source>
|
||||
<translation>Display Compatibility Data:\nDisplays game compatibility information in table view. Enable "Update Compatibility On Startup" to get up-to-date information.</translation>
|
||||
<translation>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.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>checkCompatibilityOnStartupCheckBox</source>
|
||||
<translation>Update Compatibility On Startup:\nAutomatically update the compatibility database when shadPS4 starts.</translation>
|
||||
<translation>Aktualizuj zgodność przy uruchomieniu:\nAutomatycznie aktualizuj bazę danych kompatybilności podczas uruchamiania shadPS4.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>updateCompatibilityButton</source>
|
||||
<translation>Update Compatibility Database:\nImmediately update the compatibility database.</translation>
|
||||
<translation>Zaktualizuj bazę danych zgodności:\nNatychmiast zaktualizuj bazę danych zgodności.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Never</source>
|
||||
|
@ -933,7 +933,7 @@
|
|||
<name>CheatsPatches</name>
|
||||
<message>
|
||||
<source>Cheats / Patches for </source>
|
||||
<translation>Cheats / Patches for </translation>
|
||||
<translation>Kody / Łatki dla </translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>defaultTextEdit_MSG</source>
|
||||
|
@ -1145,7 +1145,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Failed to parse JSON:</source>
|
||||
<translation>Nie udało się przeanlizować JSON:</translation>
|
||||
<translation>Nie udało się przeanalizować JSON:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Can't apply cheats before the game is started</source>
|
||||
|
@ -1168,7 +1168,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Compatibility</source>
|
||||
<translation>Compatibility</translation>
|
||||
<translation>Zgodność</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Region</source>
|
||||
|
@ -1196,7 +1196,7 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Never Played</source>
|
||||
<translation>Never Played</translation>
|
||||
<translation>Nigdy nie grane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>h</source>
|
||||
|
@ -1212,27 +1212,27 @@
|
|||
</message>
|
||||
<message>
|
||||
<source>Compatibility is untested</source>
|
||||
<translation>Compatibility is untested</translation>
|
||||
<translation>Kompatybilność nie została przetestowana</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Game does not initialize properly / crashes the emulator</source>
|
||||
<translation>Game does not initialize properly / crashes the emulator</translation>
|
||||
<translation>Gra nie inicjuje się poprawnie / zawiesza się emulator</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Game boots, but only displays a blank screen</source>
|
||||
<translation>Game boots, but only displays a blank screen</translation>
|
||||
<translation>Gra uruchamia się, ale wyświetla tylko pusty ekran</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Game displays an image but does not go past the menu</source>
|
||||
<translation>Game displays an image but does not go past the menu</translation>
|
||||
<translation>Gra wyświetla obraz, ale nie przechodzi do menu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Game has game-breaking glitches or unplayable performance</source>
|
||||
<translation>Game has game-breaking glitches or unplayable performance</translation>
|
||||
<translation>Gra ma usterki przerywające rozgrywkę lub niegrywalną wydajność</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Game can be completed with playable performance and no major glitches</source>
|
||||
<translation>Game can be completed with playable performance and no major glitches</translation>
|
||||
<translation>Grę można ukończyć z grywalną wydajnością i bez większych usterek</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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))};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1257,24 +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<u32>(result)));
|
||||
ir.SetVectorReg(dst_reg + 1, ir.Imm32(static_cast<u32>(result >> 32)));
|
||||
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) {
|
||||
|
|
|
@ -1461,8 +1461,18 @@ U1 IREmitter::IGreaterThan(const U32& lhs, const U32& rhs, bool is_signed) {
|
|||
return Inst<U1>(is_signed ? Opcode::SGreaterThan : Opcode::UGreaterThan, lhs, rhs);
|
||||
}
|
||||
|
||||
U1 IREmitter::INotEqual(const U32& lhs, const U32& rhs) {
|
||||
return Inst<U1>(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<U1>(Opcode::INotEqual32, lhs, rhs);
|
||||
case Type::U64:
|
||||
return Inst<U1>(Opcode::INotEqual64, lhs, rhs);
|
||||
default:
|
||||
ThrowInvalidType(lhs.Type());
|
||||
}
|
||||
}
|
||||
|
||||
U1 IREmitter::IGreaterThanEqual(const U32& lhs, const U32& rhs, bool is_signed) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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, )
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -904,7 +904,7 @@ struct Liverpool {
|
|||
}
|
||||
|
||||
bool IsTiled() const {
|
||||
return !info.linear_general;
|
||||
return GetTilingMode() != TilingMode::Display_Linear;
|
||||
}
|
||||
|
||||
[[nodiscard]] DataFormat GetDataFmt() const {
|
||||
|
|
|
@ -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<DescriptorInfoUnion[]>(descriptor_write_max);
|
||||
descriptor_writes = std::make_unique<vk::WriteDescriptorSet[]>(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
|
|
@ -1,51 +0,0 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <memory>
|
||||
|
||||
#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<DescriptorInfoUnion[]> descriptor_infos;
|
||||
std::unique_ptr<vk::WriteDescriptorSet[]> descriptor_writes;
|
||||
u32 descriptor_write_end = 0;
|
||||
};
|
||||
|
||||
} // namespace Vulkan
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue