mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-21 12:04:45 +00:00
Merge remote-tracking branch 'upstream/main' into ngs2
This commit is contained in:
commit
6ecb527c1d
16 changed files with 91 additions and 173 deletions
6
.github/workflows/macos.yml
vendored
6
.github/workflows/macos.yml
vendored
|
@ -43,10 +43,10 @@ jobs:
|
|||
mv ${{github.workspace}}/build/shadps4 upload
|
||||
cp $(arch -x86_64 /usr/local/bin/brew --prefix)/opt/molten-vk/lib/libMoltenVK.dylib upload
|
||||
install_name_tool -add_rpath "@loader_path" upload/shadps4
|
||||
tar cf shadps4-macos.tar.gz -C upload .
|
||||
tar cf shadps4-macos-sdl.tar.gz -C upload .
|
||||
|
||||
- name: Upload executable
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shadps4-macos
|
||||
path: shadps4-macos.tar.gz
|
||||
name: shadps4-macos-sdl
|
||||
path: shadps4-macos-sdl.tar.gz
|
||||
|
|
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
|
@ -29,6 +29,6 @@ jobs:
|
|||
- name: Upload executable
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: shadps4-win64
|
||||
name: shadps4-win64-sdl
|
||||
path: |
|
||||
${{github.workspace}}/build/Release/shadPS4.exe
|
||||
|
|
|
@ -73,7 +73,7 @@ find_package(glslang 14.2.0 CONFIG)
|
|||
find_package(magic_enum 0.9.6 CONFIG)
|
||||
find_package(RenderDoc 1.6.0 MODULE)
|
||||
find_package(SDL3 3.1.2 CONFIG)
|
||||
find_package(toml11 3.8.1 CONFIG)
|
||||
find_package(toml11 4.2.0 CONFIG)
|
||||
find_package(tsl-robin-map 1.3.0 CONFIG)
|
||||
find_package(VulkanHeaders 1.3.289 CONFIG)
|
||||
find_package(VulkanMemoryAllocator 3.1.0 CONFIG)
|
||||
|
|
2
externals/glslang
vendored
2
externals/glslang
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 7c4d91e7819a1d27213aa3499953d54ae1a00e8f
|
||||
Subproject commit d59c84d388c805022e2bddea08aa41cbe7e43e55
|
2
externals/toml11
vendored
2
externals/toml11
vendored
|
@ -1 +1 @@
|
|||
Subproject commit fcb1d3d7e5885edfadbbe9572991dc4b3248af58
|
||||
Subproject commit cc0bee4fd46ea1f5db147d63ea545208cc9e8405
|
2
externals/vma
vendored
2
externals/vma
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 871913da6a4b132b567d7b65c509600363c0041e
|
||||
Subproject commit e1bdbca9baf4d682fb6066b380f4aa4a7bdbb58a
|
2
externals/vulkan-headers
vendored
2
externals/vulkan-headers
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 595c8d4794410a4e64b98dc58d27c0310d7ea2fd
|
||||
Subproject commit d205aff40b4e15d4c568523ee6a26f85138126d9
|
2
externals/xxhash
vendored
2
externals/xxhash
vendored
|
@ -1 +1 @@
|
|||
Subproject commit ee65ff988bab34a184c700e2fbe1e1c5bc27485d
|
||||
Subproject commit dbea33e47e7c0fe0b7c8592cd931c7430c1f130d
|
2
externals/zydis
vendored
2
externals/zydis
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 16c6a369c193981e9cf314126589eaa8763f92c3
|
||||
Subproject commit bd73bc03b0aacaa89c9c203b9b43cd08f1b1843b
|
|
@ -202,6 +202,11 @@ void MainWindow::CreateConnects() {
|
|||
connect(m_game_list_frame.get(), &QTableWidget::cellDoubleClicked, this,
|
||||
&MainWindow::StartGame);
|
||||
|
||||
connect(ui->configureAct, &QAction::triggered, this, [this]() {
|
||||
auto settingsDialog = new SettingsDialog(m_physical_devices, this);
|
||||
settingsDialog->exec();
|
||||
});
|
||||
|
||||
connect(ui->settingsButton, &QPushButton::clicked, this, [this]() {
|
||||
auto settingsDialog = new SettingsDialog(m_physical_devices, this);
|
||||
settingsDialog->exec();
|
||||
|
|
|
@ -46,6 +46,7 @@ public:
|
|||
QAction* dumpGameListAct;
|
||||
QAction* pkgViewerAct;
|
||||
QAction* aboutAct;
|
||||
QAction* configureAct;
|
||||
QAction* setThemeDark;
|
||||
QAction* setThemeLight;
|
||||
QAction* setThemeGreen;
|
||||
|
@ -143,6 +144,8 @@ public:
|
|||
pkgViewerAct->setIcon(QIcon(":images/file_icon.png"));
|
||||
aboutAct = new QAction(MainWindow);
|
||||
aboutAct->setObjectName("aboutAct");
|
||||
configureAct = new QAction(MainWindow);
|
||||
configureAct->setObjectName("configureAct");
|
||||
setThemeDark = new QAction(MainWindow);
|
||||
setThemeDark->setObjectName("setThemeDark");
|
||||
setThemeDark->setCheckable(true);
|
||||
|
@ -285,6 +288,7 @@ public:
|
|||
menuGame_List_Mode->addAction(setlistModeListAct);
|
||||
menuGame_List_Mode->addAction(setlistModeGridAct);
|
||||
menuGame_List_Mode->addAction(setlistElfAct);
|
||||
menuSettings->addAction(configureAct);
|
||||
menuSettings->addAction(gameInstallPathAct);
|
||||
menuSettings->addAction(menuUtils->menuAction());
|
||||
menuUtils->addAction(dumpGameListAct);
|
||||
|
@ -303,7 +307,8 @@ public:
|
|||
bootInstallPkgAct->setText(
|
||||
QCoreApplication::translate("MainWindow", "Install Packages (PKG)", nullptr));
|
||||
bootGameAct->setText(QCoreApplication::translate("MainWindow", "Boot Game", nullptr));
|
||||
aboutAct->setText(QCoreApplication::translate("MainWindow", "About", nullptr));
|
||||
aboutAct->setText(QCoreApplication::translate("MainWindow", "About shadPS4", nullptr));
|
||||
configureAct->setText(QCoreApplication::translate("MainWindow", "Configure...", nullptr));
|
||||
#if QT_CONFIG(tooltip)
|
||||
bootInstallPkgAct->setToolTip(QCoreApplication::translate(
|
||||
"MainWindow", "Install application from a .pkg file", nullptr));
|
||||
|
|
|
@ -1,9 +1,44 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <QCompleter>
|
||||
#include "settings_dialog.h"
|
||||
#include "ui_settings_dialog.h"
|
||||
|
||||
QStringList languageNames = {"Arabic",
|
||||
"Czech",
|
||||
"Danish",
|
||||
"Dutch",
|
||||
"English (United Kingdom)",
|
||||
"English (United States)",
|
||||
"Finnish",
|
||||
"French (Canada)",
|
||||
"French (France)",
|
||||
"German",
|
||||
"Greek",
|
||||
"Hungarian",
|
||||
"Indonesian",
|
||||
"Italian",
|
||||
"Japanese",
|
||||
"Korean",
|
||||
"Norwegian",
|
||||
"Polish",
|
||||
"Portuguese (Brazil)",
|
||||
"Portuguese (Portugal)",
|
||||
"Romanian",
|
||||
"Russian",
|
||||
"Simplified Chinese",
|
||||
"Spanish (Latin America)",
|
||||
"Spanish (Spain)",
|
||||
"Swedish",
|
||||
"Thai",
|
||||
"Traditional Chinese",
|
||||
"Turkish",
|
||||
"Vietnamese"};
|
||||
|
||||
const QVector<int> languageIndexes = {21, 23, 14, 6, 18, 1, 12, 22, 2, 4, 25, 24, 29, 5, 0,
|
||||
9, 15, 16, 17, 7, 26, 8, 11, 20, 3, 13, 27, 10, 19, 28};
|
||||
|
||||
SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidget* parent)
|
||||
: QDialog(parent), ui(new Ui::SettingsDialog) {
|
||||
ui->setupUi(this);
|
||||
|
@ -18,6 +53,12 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
|||
ui->graphicsAdapterBox->addItem(device);
|
||||
}
|
||||
|
||||
ui->consoleLanguageComboBox->addItems(languageNames);
|
||||
|
||||
QCompleter* completer = new QCompleter(languageNames, this);
|
||||
completer->setCaseSensitivity(Qt::CaseInsensitive);
|
||||
ui->consoleLanguageComboBox->setCompleter(completer);
|
||||
|
||||
LoadValuesFromConfig();
|
||||
|
||||
connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &QWidget::close);
|
||||
|
@ -44,8 +85,13 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
|||
connect(ui->userNameLineEdit, &QLineEdit::textChanged, this,
|
||||
[](const QString& text) { Config::setUserName(text.toStdString()); });
|
||||
|
||||
connect(ui->consoleLanguageComboBox, &QComboBox::currentIndexChanged, this,
|
||||
[](int index) { Config::setLanguage(index); });
|
||||
connect(ui->consoleLanguageComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged),
|
||||
this, [this](int index) {
|
||||
if (index >= 0 && index < languageIndexes.size()) {
|
||||
int languageCode = languageIndexes[index];
|
||||
Config::setLanguage(languageCode);
|
||||
}
|
||||
});
|
||||
|
||||
connect(ui->fullscreenCheckBox, &QCheckBox::stateChanged, this,
|
||||
[](int val) { Config::setFullscreenMode(val); });
|
||||
|
@ -106,8 +152,11 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
|||
}
|
||||
|
||||
void SettingsDialog::LoadValuesFromConfig() {
|
||||
ui->consoleLanguageComboBox->setCurrentIndex(Config::GetLanguage());
|
||||
|
||||
ui->consoleLanguageComboBox->setCurrentIndex(
|
||||
std::distance(
|
||||
languageIndexes.begin(),
|
||||
std::find(languageIndexes.begin(), languageIndexes.end(), Config::GetLanguage())) %
|
||||
languageIndexes.size());
|
||||
ui->graphicsAdapterBox->setCurrentIndex(Config::getGpuId() + 1);
|
||||
ui->widthSpinBox->setValue(Config::getScreenWidth());
|
||||
ui->heightSpinBox->setValue(Config::getScreenHeight());
|
||||
|
@ -133,4 +182,4 @@ int SettingsDialog::exec() {
|
|||
return QDialog::exec();
|
||||
}
|
||||
|
||||
SettingsDialog::~SettingsDialog() {}
|
||||
SettingsDialog::~SettingsDialog() {}
|
||||
|
|
|
@ -113,156 +113,6 @@
|
|||
<layout class="QVBoxLayout" name="settingsLayout">
|
||||
<item>
|
||||
<widget class="QComboBox" name="consoleLanguageComboBox">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Japanese</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>English (United States)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>French (France)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Spanish (Spain)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>German</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Italian</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dutch</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Portuguese (Portugal)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Russian</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Korean</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Traditional Chinese</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Simplified Chinese</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Finnish</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Swedish</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Danish</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Norwegian</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Polish</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Portuguese (Brazil)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>English (United Kingdom)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Turkish</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Spanish (Latin America)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Arabic</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>French (Canada)</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Czech</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Hungarian</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Greek</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Romanian</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Thai</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Vietnamese</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Indonesian</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -452,7 +452,7 @@ struct Liverpool {
|
|||
BitField<11, 1, u32> enable_polygon_offset_front;
|
||||
BitField<12, 1, u32> enable_polygon_offset_back;
|
||||
BitField<13, 1, u32> enable_polygon_offset_para;
|
||||
BitField<13, 1, u32> enable_window_offset;
|
||||
BitField<16, 1, u32> enable_window_offset;
|
||||
BitField<19, 1, ProvokingVtxLast> provoking_vtx_last;
|
||||
|
||||
PolygonMode PolyMode() const {
|
||||
|
|
|
@ -172,10 +172,17 @@ GraphicsPipeline::GraphicsPipeline(const Instance& instance_, Scheduler& schedul
|
|||
.reference = key.stencil_ref_front.stencil_test_val,
|
||||
},
|
||||
.back{
|
||||
.failOp = LiverpoolToVK::StencilOp(key.stencil.stencil_fail_back),
|
||||
.passOp = LiverpoolToVK::StencilOp(key.stencil.stencil_zpass_back),
|
||||
.depthFailOp = LiverpoolToVK::StencilOp(key.stencil.stencil_zfail_back),
|
||||
.compareOp = LiverpoolToVK::CompareOp(key.depth.stencil_bf_func),
|
||||
.failOp = LiverpoolToVK::StencilOp(key.depth.backface_enable
|
||||
? key.stencil.stencil_fail_back
|
||||
: key.stencil.stencil_fail_front),
|
||||
.passOp = LiverpoolToVK::StencilOp(key.depth.backface_enable
|
||||
? key.stencil.stencil_zpass_back
|
||||
: key.stencil.stencil_zpass_front),
|
||||
.depthFailOp = LiverpoolToVK::StencilOp(key.depth.backface_enable
|
||||
? key.stencil.stencil_zfail_back
|
||||
: key.stencil.stencil_zfail_front),
|
||||
.compareOp = LiverpoolToVK::CompareOp(
|
||||
key.depth.backface_enable ? key.depth.stencil_bf_func : key.depth.stencil_ref_func),
|
||||
.compareMask = key.stencil_ref_back.stencil_mask,
|
||||
.writeMask = key.stencil_ref_back.stencil_write_mask,
|
||||
.reference = key.stencil_ref_back.stencil_test_val,
|
||||
|
@ -207,7 +214,8 @@ GraphicsPipeline::GraphicsPipeline(const Instance& instance_, Scheduler& schedul
|
|||
.colorAttachmentCount = num_color_formats,
|
||||
.pColorAttachmentFormats = key.color_formats.data(),
|
||||
.depthAttachmentFormat = key.depth_format,
|
||||
.stencilAttachmentFormat = vk::Format::eUndefined,
|
||||
.stencilAttachmentFormat =
|
||||
key.depth.stencil_enable ? key.depth_format : vk::Format::eUndefined,
|
||||
};
|
||||
|
||||
std::array<vk::PipelineColorBlendAttachmentState, Liverpool::NumColorBuffers> attachments;
|
||||
|
|
|
@ -39,6 +39,7 @@ void Scheduler::BeginRendering(const RenderState& new_state) {
|
|||
.colorAttachmentCount = render_state.num_color_attachments,
|
||||
.pColorAttachments = render_state.color_attachments.data(),
|
||||
.pDepthAttachment = render_state.has_depth ? &render_state.depth_attachment : nullptr,
|
||||
.pStencilAttachment = render_state.has_stencil ? &render_state.depth_attachment : nullptr,
|
||||
};
|
||||
|
||||
current_cmdbuf.beginRendering(rendering_info);
|
||||
|
|
Loading…
Add table
Reference in a new issue