17 changed files with 405 additions and 30 deletions
-
2externals/dynarmic
-
28src/core/arm/dynarmic/arm_dynarmic_32.cpp
-
32src/core/arm/dynarmic/arm_dynarmic_64.cpp
-
11src/core/settings.h
-
3src/yuzu/CMakeLists.txt
-
53src/yuzu/configuration/config.cpp
-
2src/yuzu/configuration/config.h
-
11src/yuzu/configuration/configure.ui
-
64src/yuzu/configuration/configure_cpu.cpp
-
31src/yuzu/configuration/configure_cpu.h
-
113src/yuzu/configuration/configure_cpu.ui
-
2src/yuzu/configuration/configure_debug.cpp
-
7src/yuzu/configuration/configure_debug.ui
-
5src/yuzu/configuration/configure_dialog.cpp
-
2src/yuzu_cmd/config.cpp
-
36src/yuzu_cmd/default_ini.h
-
33src/yuzu_tester/default_ini.h
@ -1 +1 @@ |
|||||
Subproject commit 4f967387c07365b7ea35d2fa3e19b7df8872a09b |
|
||||
|
Subproject commit 82417da7803e2cf18efc28a1cd3f3d0a4b6045ae |
||||
@ -0,0 +1,64 @@ |
|||||
|
// Copyright 2020 yuzu Emulator Project
|
||||
|
// Licensed under GPLv2 or any later version
|
||||
|
// Refer to the license.txt file included.
|
||||
|
|
||||
|
#include <QComboBox>
|
||||
|
|
||||
|
#include "common/common_types.h"
|
||||
|
#include "common/logging/log.h"
|
||||
|
#include "core/core.h"
|
||||
|
#include "core/settings.h"
|
||||
|
#include "ui_configure_cpu.h"
|
||||
|
#include "yuzu/configuration/configure_cpu.h"
|
||||
|
|
||||
|
ConfigureCpu::ConfigureCpu(QWidget* parent) : QWidget(parent), ui(new Ui::ConfigureCpu) { |
||||
|
ui->setupUi(this); |
||||
|
|
||||
|
SetConfiguration(); |
||||
|
} |
||||
|
|
||||
|
ConfigureCpu::~ConfigureCpu() = default; |
||||
|
|
||||
|
void ConfigureCpu::SetConfiguration() { |
||||
|
const bool runtime_lock = !Core::System::GetInstance().IsPoweredOn(); |
||||
|
|
||||
|
ui->cpuopt_page_tables->setEnabled(runtime_lock); |
||||
|
ui->cpuopt_page_tables->setChecked(Settings::values.cpuopt_page_tables); |
||||
|
ui->cpuopt_block_linking->setEnabled(runtime_lock); |
||||
|
ui->cpuopt_block_linking->setChecked(Settings::values.cpuopt_block_linking); |
||||
|
ui->cpuopt_return_stack_buffer->setEnabled(runtime_lock); |
||||
|
ui->cpuopt_return_stack_buffer->setChecked(Settings::values.cpuopt_return_stack_buffer); |
||||
|
ui->cpuopt_fast_dispatcher->setEnabled(runtime_lock); |
||||
|
ui->cpuopt_fast_dispatcher->setChecked(Settings::values.cpuopt_fast_dispatcher); |
||||
|
ui->cpuopt_context_elimination->setEnabled(runtime_lock); |
||||
|
ui->cpuopt_context_elimination->setChecked(Settings::values.cpuopt_context_elimination); |
||||
|
ui->cpuopt_const_prop->setEnabled(runtime_lock); |
||||
|
ui->cpuopt_const_prop->setChecked(Settings::values.cpuopt_const_prop); |
||||
|
ui->cpuopt_misc_ir->setEnabled(runtime_lock); |
||||
|
ui->cpuopt_misc_ir->setChecked(Settings::values.cpuopt_misc_ir); |
||||
|
ui->cpuopt_reduce_misalign_checks->setEnabled(runtime_lock); |
||||
|
ui->cpuopt_reduce_misalign_checks->setChecked(Settings::values.cpuopt_reduce_misalign_checks); |
||||
|
} |
||||
|
|
||||
|
void ConfigureCpu::ApplyConfiguration() { |
||||
|
Settings::values.cpuopt_page_tables = ui->cpuopt_page_tables->isChecked(); |
||||
|
Settings::values.cpuopt_block_linking = ui->cpuopt_block_linking->isChecked(); |
||||
|
Settings::values.cpuopt_return_stack_buffer = ui->cpuopt_return_stack_buffer->isChecked(); |
||||
|
Settings::values.cpuopt_fast_dispatcher = ui->cpuopt_fast_dispatcher->isChecked(); |
||||
|
Settings::values.cpuopt_context_elimination = ui->cpuopt_context_elimination->isChecked(); |
||||
|
Settings::values.cpuopt_const_prop = ui->cpuopt_const_prop->isChecked(); |
||||
|
Settings::values.cpuopt_misc_ir = ui->cpuopt_misc_ir->isChecked(); |
||||
|
Settings::values.cpuopt_reduce_misalign_checks = ui->cpuopt_reduce_misalign_checks->isChecked(); |
||||
|
} |
||||
|
|
||||
|
void ConfigureCpu::changeEvent(QEvent* event) { |
||||
|
if (event->type() == QEvent::LanguageChange) { |
||||
|
RetranslateUI(); |
||||
|
} |
||||
|
|
||||
|
QWidget::changeEvent(event); |
||||
|
} |
||||
|
|
||||
|
void ConfigureCpu::RetranslateUI() { |
||||
|
ui->retranslateUi(this); |
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
// Copyright 2020 yuzu Emulator Project |
||||
|
// Licensed under GPLv2 or any later version |
||||
|
// Refer to the license.txt file included. |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include <memory> |
||||
|
#include <QWidget> |
||||
|
#include "core/settings.h" |
||||
|
|
||||
|
namespace Ui { |
||||
|
class ConfigureCpu; |
||||
|
} |
||||
|
|
||||
|
class ConfigureCpu : public QWidget { |
||||
|
Q_OBJECT |
||||
|
|
||||
|
public: |
||||
|
explicit ConfigureCpu(QWidget* parent = nullptr); |
||||
|
~ConfigureCpu() override; |
||||
|
|
||||
|
void ApplyConfiguration(); |
||||
|
|
||||
|
private: |
||||
|
void changeEvent(QEvent* event) override; |
||||
|
void RetranslateUI(); |
||||
|
|
||||
|
void SetConfiguration(); |
||||
|
|
||||
|
std::unique_ptr<Ui::ConfigureCpu> ui; |
||||
|
}; |
||||
@ -0,0 +1,113 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<ui version="4.0"> |
||||
|
<class>ConfigureCpu</class> |
||||
|
<widget class="QWidget" name="ConfigureCpu"> |
||||
|
<property name="geometry"> |
||||
|
<rect> |
||||
|
<x>0</x> |
||||
|
<y>0</y> |
||||
|
<width>400</width> |
||||
|
<height>321</height> |
||||
|
</rect> |
||||
|
</property> |
||||
|
<property name="windowTitle"> |
||||
|
<string>Form</string> |
||||
|
</property> |
||||
|
<layout class="QVBoxLayout"> |
||||
|
<item> |
||||
|
<layout class="QVBoxLayout"> |
||||
|
<item> |
||||
|
<widget class="QGroupBox"> |
||||
|
<property name="title"> |
||||
|
<string>Safe CPU Optimizations</string> |
||||
|
</property> |
||||
|
<layout class="QVBoxLayout"> |
||||
|
<item> |
||||
|
<widget class="QLabel"> |
||||
|
<property name="wordWrap"> |
||||
|
<bool>1</bool> |
||||
|
</property> |
||||
|
<property name="text"> |
||||
|
<string>Keep these enabled. For debugging only.</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="cpuopt_page_tables"> |
||||
|
<property name="text"> |
||||
|
<string>Enable inline page tables</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="cpuopt_block_linking"> |
||||
|
<property name="text"> |
||||
|
<string>Enable block linking</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="cpuopt_return_stack_buffer"> |
||||
|
<property name="text"> |
||||
|
<string>Enable return stack buffer</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="cpuopt_fast_dispatcher"> |
||||
|
<property name="text"> |
||||
|
<string>Enable fast dispatcher</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="cpuopt_context_elimination"> |
||||
|
<property name="text"> |
||||
|
<string>Enable context elimination</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="cpuopt_const_prop"> |
||||
|
<property name="text"> |
||||
|
<string>Enable constant propagation</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="cpuopt_misc_ir"> |
||||
|
<property name="text"> |
||||
|
<string>Enable miscellaneous optimizations</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
<item> |
||||
|
<widget class="QCheckBox" name="cpuopt_reduce_misalign_checks"> |
||||
|
<property name="text"> |
||||
|
<string>Enable misalignment check reduction</string> |
||||
|
</property> |
||||
|
</widget> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</widget> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</item> |
||||
|
<item> |
||||
|
<spacer name="verticalSpacer"> |
||||
|
<property name="orientation"> |
||||
|
<enum>Qt::Vertical</enum> |
||||
|
</property> |
||||
|
<property name="sizeHint" stdset="0"> |
||||
|
<size> |
||||
|
<width>20</width> |
||||
|
<height>40</height> |
||||
|
</size> |
||||
|
</property> |
||||
|
</spacer> |
||||
|
</item> |
||||
|
</layout> |
||||
|
</widget> |
||||
|
<resources/> |
||||
|
<connections/> |
||||
|
</ui> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue