Add dynamic state extension configs
Some checks failed
eden-build / source (pull_request) Has been skipped
eden-build / linux (pull_request) Successful in 22m44s
eden-build / android (pull_request) Successful in 15m9s
eden-license / license-header (pull_request_target) Failing after 21s
eden-build / windows (msvc) (pull_request) Has been cancelled
Some checks failed
eden-build / source (pull_request) Has been skipped
eden-build / linux (pull_request) Successful in 22m44s
eden-build / android (pull_request) Successful in 15m9s
eden-license / license-header (pull_request_target) Failing after 21s
eden-build / windows (msvc) (pull_request) Has been cancelled
Signed-off-by: swurl <swurl@swurl.xyz>
This commit is contained in:
parent
600e422687
commit
3b8a5fe83b
14 changed files with 251 additions and 17 deletions
|
@ -206,6 +206,7 @@ const char* TranslateCategory(Category category) {
|
|||
case Category::Renderer:
|
||||
case Category::RendererAdvanced:
|
||||
case Category::RendererDebug:
|
||||
case Category::RendererExtensions:
|
||||
return "Renderer";
|
||||
case Category::System:
|
||||
case Category::SystemAudio:
|
||||
|
|
|
@ -445,6 +445,17 @@ struct Values {
|
|||
SwitchableSetting<bool> barrier_feedback_loops{linkage, true, "barrier_feedback_loops",
|
||||
Category::RendererAdvanced};
|
||||
|
||||
SwitchableSetting<bool> use_dyna_state_1{linkage, true, "use_dyna_state_1",
|
||||
Category::RendererExtensions};
|
||||
SwitchableSetting<bool> use_dyna_state_2{linkage, true, "use_dyna_state_2",
|
||||
Category::RendererExtensions};
|
||||
SwitchableSetting<bool> use_dyna_state_2_extras{linkage, true, "use_dyna_state_2_extras",
|
||||
Category::RendererExtensions};
|
||||
SwitchableSetting<bool> use_dyna_state_3{linkage, false, "use_dyna_state_3",
|
||||
Category::RendererExtensions};
|
||||
SwitchableSetting<bool> use_dyna_state_3_blend{linkage, false, "use_dyna_state_3_blend",
|
||||
Category::RendererExtensions};
|
||||
|
||||
Setting<bool> renderer_debug{linkage, false, "debug", Category::RendererDebug};
|
||||
Setting<bool> renderer_shader_feedback{linkage, false, "shader_feedback",
|
||||
Category::RendererDebug};
|
||||
|
|
|
@ -21,6 +21,7 @@ enum class Category : u32 {
|
|||
Overlay,
|
||||
Renderer,
|
||||
RendererAdvanced,
|
||||
RendererExtensions,
|
||||
RendererDebug,
|
||||
System,
|
||||
SystemAudio,
|
||||
|
|
|
@ -362,6 +362,7 @@ void Config::ReadRendererValues() {
|
|||
|
||||
ReadCategory(Settings::Category::Renderer);
|
||||
ReadCategory(Settings::Category::RendererAdvanced);
|
||||
ReadCategory(Settings::Category::RendererExtensions);
|
||||
ReadCategory(Settings::Category::RendererDebug);
|
||||
|
||||
EndGroup();
|
||||
|
@ -670,6 +671,7 @@ void Config::SaveRendererValues() {
|
|||
|
||||
WriteCategory(Settings::Category::Renderer);
|
||||
WriteCategory(Settings::Category::RendererAdvanced);
|
||||
WriteCategory(Settings::Category::RendererExtensions);
|
||||
WriteCategory(Settings::Category::RendererDebug);
|
||||
|
||||
EndGroup();
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
@ -427,11 +428,11 @@ PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_,
|
|||
}
|
||||
|
||||
dynamic_features = DynamicFeatures{
|
||||
.has_extended_dynamic_state = device.IsExtExtendedDynamicStateSupported(),
|
||||
.has_extended_dynamic_state_2 = device.IsExtExtendedDynamicState2Supported(),
|
||||
.has_extended_dynamic_state_2_extra = device.IsExtExtendedDynamicState2ExtrasSupported(),
|
||||
.has_extended_dynamic_state_3_blend = device.IsExtExtendedDynamicState3BlendingSupported(),
|
||||
.has_extended_dynamic_state_3_enables = device.IsExtExtendedDynamicState3EnablesSupported(),
|
||||
.has_extended_dynamic_state = Settings::values.use_dyna_state_1.GetValue(),
|
||||
.has_extended_dynamic_state_2 = Settings::values.use_dyna_state_2.GetValue(),
|
||||
.has_extended_dynamic_state_2_extra = Settings::values.use_dyna_state_2_extras.GetValue(),
|
||||
.has_extended_dynamic_state_3_blend = Settings::values.use_dyna_state_3_blend.GetValue(),
|
||||
.has_extended_dynamic_state_3_enables = Settings::values.use_dyna_state_3.GetValue(),
|
||||
.has_dynamic_vertex_input = device.IsExtVertexInputDynamicStateSupported(),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -231,6 +231,7 @@ add_executable(yuzu
|
|||
compatdb.h
|
||||
yuzu.qrc
|
||||
yuzu.rc
|
||||
configuration/configure_graphics_extensions.h configuration/configure_graphics_extensions.cpp configuration/configure_graphics_extensions.ui
|
||||
)
|
||||
|
||||
set_target_properties(yuzu PROPERTIES OUTPUT_NAME "eden")
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "yuzu/configuration/configure_general.h"
|
||||
#include "yuzu/configuration/configure_graphics.h"
|
||||
#include "yuzu/configuration/configure_graphics_advanced.h"
|
||||
#include "yuzu/configuration/configure_graphics_extensions.h"
|
||||
#include "yuzu/configuration/configure_hotkeys.h"
|
||||
#include "yuzu/configuration/configure_input.h"
|
||||
#include "yuzu/configuration/configure_input_player.h"
|
||||
|
@ -42,7 +43,9 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
|||
filesystem_tab{std::make_unique<ConfigureFilesystem>(this)},
|
||||
general_tab{std::make_unique<ConfigureGeneral>(system_, nullptr, *builder, this)},
|
||||
graphics_advanced_tab{
|
||||
std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, *builder, this)},
|
||||
std::make_unique<ConfigureGraphicsAdvanced>(system_, nullptr, *builder, this)},
|
||||
graphics_extensions_tab{
|
||||
std::make_unique<ConfigureGraphicsExtensions>(system_, nullptr, *builder, this)},
|
||||
ui_tab{std::make_unique<ConfigureUi>(system_, this)},
|
||||
graphics_tab{std::make_unique<ConfigureGraphics>(
|
||||
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
|
||||
|
@ -68,6 +71,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
|||
ui->tabWidget->addTab(general_tab.get(), tr("General"));
|
||||
ui->tabWidget->addTab(graphics_tab.get(), tr("Graphics"));
|
||||
ui->tabWidget->addTab(graphics_advanced_tab.get(), tr("GraphicsAdvanced"));
|
||||
ui->tabWidget->addTab(graphics_extensions_tab.get(), tr("GraphicsExtensions"));
|
||||
ui->tabWidget->addTab(hotkeys_tab.get(), tr("Hotkeys"));
|
||||
ui->tabWidget->addTab(input_tab.get(), tr("Controls"));
|
||||
ui->tabWidget->addTab(profile_tab.get(), tr("Profiles"));
|
||||
|
@ -104,7 +108,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry_,
|
|||
adjustSize();
|
||||
ui->selectorList->setCurrentRow(0);
|
||||
|
||||
// Selects the leftmost button on the bottom bar (Cancel as of writing)
|
||||
// Selects the leftmost button on the bottom bar (Cancel as of writing)
|
||||
ui->buttonBox->setFocus();
|
||||
}
|
||||
|
||||
|
@ -123,6 +127,7 @@ void ConfigureDialog::ApplyConfiguration() {
|
|||
cpu_tab->ApplyConfiguration();
|
||||
graphics_tab->ApplyConfiguration();
|
||||
graphics_advanced_tab->ApplyConfiguration();
|
||||
graphics_extensions_tab->ApplyConfiguration();
|
||||
audio_tab->ApplyConfiguration();
|
||||
debug_tab_tab->ApplyConfiguration();
|
||||
web_tab->ApplyConfiguration();
|
||||
|
@ -162,16 +167,16 @@ Q_DECLARE_METATYPE(QList<QWidget*>);
|
|||
|
||||
void ConfigureDialog::PopulateSelectionList() {
|
||||
const std::array<std::pair<QString, QList<QWidget*>>, 6> items{
|
||||
{{tr("General"),
|
||||
{general_tab.get(), hotkeys_tab.get(), ui_tab.get(), web_tab.get(), debug_tab_tab.get()}},
|
||||
{tr("System"),
|
||||
{system_tab.get(), profile_tab.get(), network_tab.get(), filesystem_tab.get(),
|
||||
applets_tab.get()}},
|
||||
{tr("CPU"), {cpu_tab.get()}},
|
||||
{tr("Graphics"), {graphics_tab.get(), graphics_advanced_tab.get()}},
|
||||
{tr("Audio"), {audio_tab.get()}},
|
||||
{tr("Controls"), input_tab->GetSubTabs()}},
|
||||
};
|
||||
{{tr("General"),
|
||||
{general_tab.get(), hotkeys_tab.get(), ui_tab.get(), web_tab.get(), debug_tab_tab.get()}},
|
||||
{tr("System"),
|
||||
{system_tab.get(), profile_tab.get(), network_tab.get(), filesystem_tab.get(),
|
||||
applets_tab.get()}},
|
||||
{tr("CPU"), {cpu_tab.get()}},
|
||||
{tr("Graphics"), {graphics_tab.get(), graphics_advanced_tab.get(), graphics_extensions_tab.get()}},
|
||||
{tr("Audio"), {audio_tab.get()}},
|
||||
{tr("Controls"), input_tab->GetSubTabs()}},
|
||||
};
|
||||
|
||||
[[maybe_unused]] const QSignalBlocker blocker(ui->selectorList);
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ class ConfigureFilesystem;
|
|||
class ConfigureGeneral;
|
||||
class ConfigureGraphics;
|
||||
class ConfigureGraphicsAdvanced;
|
||||
class ConfigureGraphicsExtensions;
|
||||
class ConfigureHotkeys;
|
||||
class ConfigureInput;
|
||||
class ConfigureProfileManager;
|
||||
|
@ -83,6 +84,7 @@ private:
|
|||
std::unique_ptr<ConfigureFilesystem> filesystem_tab;
|
||||
std::unique_ptr<ConfigureGeneral> general_tab;
|
||||
std::unique_ptr<ConfigureGraphicsAdvanced> graphics_advanced_tab;
|
||||
std::unique_ptr<ConfigureGraphicsExtensions> graphics_extensions_tab;
|
||||
std::unique_ptr<ConfigureUi> ui_tab;
|
||||
std::unique_ptr<ConfigureGraphics> graphics_tab;
|
||||
std::unique_ptr<ConfigureHotkeys> hotkeys_tab;
|
||||
|
|
71
src/yuzu/configuration/configure_graphics_extensions.cpp
Normal file
71
src/yuzu/configuration/configure_graphics_extensions.cpp
Normal file
|
@ -0,0 +1,71 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <vector>
|
||||
#include <QLabel>
|
||||
#include <qnamespace.h>
|
||||
#include "common/settings.h"
|
||||
#include "core/core.h"
|
||||
#include "ui_configure_graphics_extensions.h"
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
#include "yuzu/configuration/configure_graphics_extensions.h"
|
||||
#include "yuzu/configuration/shared_translation.h"
|
||||
#include "yuzu/configuration/shared_widget.h"
|
||||
|
||||
ConfigureGraphicsExtensions::ConfigureGraphicsExtensions(
|
||||
const Core::System& system_, std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent)
|
||||
: Tab(group_, parent), ui{std::make_unique<Ui::ConfigureGraphicsExtensions>()}, system{system_} {
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
Setup(builder);
|
||||
|
||||
SetConfiguration();
|
||||
}
|
||||
|
||||
ConfigureGraphicsExtensions::~ConfigureGraphicsExtensions() = default;
|
||||
|
||||
void ConfigureGraphicsExtensions::SetConfiguration() {}
|
||||
|
||||
void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& builder) {
|
||||
auto& layout = *ui->populate_target->layout();
|
||||
std::map<u32, QWidget*> hold{}; // A map will sort the data for us
|
||||
|
||||
for (auto setting :
|
||||
Settings::values.linkage.by_category[Settings::Category::RendererExtensions]) {
|
||||
ConfigurationShared::Widget* widget = builder.BuildWidget(setting, apply_funcs);
|
||||
|
||||
if (widget == nullptr) {
|
||||
continue;
|
||||
}
|
||||
if (!widget->Valid()) {
|
||||
widget->deleteLater();
|
||||
continue;
|
||||
}
|
||||
|
||||
hold.emplace(setting->Id(), widget);
|
||||
}
|
||||
for (const auto& [id, widget] : hold) {
|
||||
layout.addWidget(widget);
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigureGraphicsExtensions::ApplyConfiguration() {
|
||||
const bool is_powered_on = system.IsPoweredOn();
|
||||
for (const auto& func : apply_funcs) {
|
||||
func(is_powered_on);
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigureGraphicsExtensions::changeEvent(QEvent* event) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
RetranslateUI();
|
||||
}
|
||||
|
||||
QWidget::changeEvent(event);
|
||||
}
|
||||
|
||||
void ConfigureGraphicsExtensions::RetranslateUI() {
|
||||
ui->retranslateUi(this);
|
||||
}
|
45
src/yuzu/configuration/configure_graphics_extensions.h
Normal file
45
src/yuzu/configuration/configure_graphics_extensions.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <QWidget>
|
||||
#include "yuzu/configuration/configuration_shared.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Ui {
|
||||
class ConfigureGraphicsExtensions;
|
||||
}
|
||||
|
||||
namespace ConfigurationShared {
|
||||
class Builder;
|
||||
}
|
||||
|
||||
class ConfigureGraphicsExtensions : public ConfigurationShared::Tab {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ConfigureGraphicsExtensions(
|
||||
const Core::System& system_, std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group,
|
||||
const ConfigurationShared::Builder& builder, QWidget* parent = nullptr);
|
||||
~ConfigureGraphicsExtensions() override;
|
||||
|
||||
void ApplyConfiguration() override;
|
||||
void SetConfiguration() override;
|
||||
|
||||
private:
|
||||
void Setup(const ConfigurationShared::Builder& builder);
|
||||
void changeEvent(QEvent* event) override;
|
||||
void RetranslateUI();
|
||||
|
||||
std::unique_ptr<Ui::ConfigureGraphicsExtensions> ui;
|
||||
|
||||
const Core::System& system;
|
||||
|
||||
std::vector<std::function<void(bool)>> apply_funcs;
|
||||
};
|
68
src/yuzu/configuration/configure_graphics_extensions.ui
Normal file
68
src/yuzu/configuration/configure_graphics_extensions.ui
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ConfigureGraphicsExtensions</class>
|
||||
<widget class="QWidget" name="ConfigureGraphicsExtensions">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>404</width>
|
||||
<height>376</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<property name="accessibleName">
|
||||
<string>Extensions</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_1">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_1">
|
||||
<property name="title">
|
||||
<string>Vulkan Extension Settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QWidget" name="populate_target" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -32,6 +32,7 @@
|
|||
#include "yuzu/configuration/configure_cpu.h"
|
||||
#include "yuzu/configuration/configure_graphics.h"
|
||||
#include "yuzu/configuration/configure_graphics_advanced.h"
|
||||
#include "yuzu/configuration/configure_graphics_extensions.h"
|
||||
#include "yuzu/configuration/configure_input_per_game.h"
|
||||
#include "yuzu/configuration/configure_linux_tab.h"
|
||||
#include "yuzu/configuration/configure_per_game.h"
|
||||
|
@ -57,6 +58,8 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
|
|||
cpu_tab = std::make_unique<ConfigureCpu>(system_, tab_group, *builder, this);
|
||||
graphics_advanced_tab =
|
||||
std::make_unique<ConfigureGraphicsAdvanced>(system_, tab_group, *builder, this);
|
||||
graphics_extensions_tab =
|
||||
std::make_unique<ConfigureGraphicsExtensions>(system_, tab_group, *builder, this);
|
||||
graphics_tab = std::make_unique<ConfigureGraphics>(
|
||||
system_, vk_device_records, [&]() { graphics_advanced_tab->ExposeComputeOption(); },
|
||||
[](Settings::AspectRatio, Settings::ResolutionSetup) {}, tab_group, *builder, this);
|
||||
|
@ -71,6 +74,7 @@ ConfigurePerGame::ConfigurePerGame(QWidget* parent, u64 title_id_, const std::st
|
|||
ui->tabWidget->addTab(cpu_tab.get(), tr("CPU"));
|
||||
ui->tabWidget->addTab(graphics_tab.get(), tr("Graphics"));
|
||||
ui->tabWidget->addTab(graphics_advanced_tab.get(), tr("Adv. Graphics"));
|
||||
ui->tabWidget->addTab(graphics_extensions_tab.get(), tr("GPU Extensions"));
|
||||
ui->tabWidget->addTab(audio_tab.get(), tr("Audio"));
|
||||
ui->tabWidget->addTab(input_tab.get(), tr("Input Profiles"));
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ class ConfigureAudio;
|
|||
class ConfigureCpu;
|
||||
class ConfigureGraphics;
|
||||
class ConfigureGraphicsAdvanced;
|
||||
class ConfigureGraphicsExtensions;
|
||||
class ConfigureInputPerGame;
|
||||
class ConfigureLinuxTab;
|
||||
class ConfigureSystem;
|
||||
|
@ -84,6 +85,7 @@ private:
|
|||
std::unique_ptr<ConfigureAudio> audio_tab;
|
||||
std::unique_ptr<ConfigureCpu> cpu_tab;
|
||||
std::unique_ptr<ConfigureGraphicsAdvanced> graphics_advanced_tab;
|
||||
std::unique_ptr<ConfigureGraphicsExtensions> graphics_extensions_tab;
|
||||
std::unique_ptr<ConfigureGraphics> graphics_tab;
|
||||
std::unique_ptr<ConfigureInputPerGame> input_tab;
|
||||
std::unique_ptr<ConfigureLinuxTab> linux_tab;
|
||||
|
|
|
@ -230,6 +230,26 @@ std::unique_ptr<TranslationMap> InitializeTranslations(QWidget* parent) {
|
|||
INSERT(Settings, barrier_feedback_loops, tr("Barrier feedback loops"),
|
||||
tr("Improves rendering of transparency effects in specific games."));
|
||||
|
||||
INSERT(Settings, use_dyna_state_1, tr("Enable Extended Dynamic State 1"),
|
||||
tr("Enables the VkExtendedDynamicState1 extension.\nThis setting may improve performance, "
|
||||
"but may also cause games to break on some systems."));
|
||||
|
||||
INSERT(Settings, use_dyna_state_2, tr("Enable Extended Dynamic State 2"),
|
||||
tr("Enables the VkExtendedDynamicState2 extension.\nThis setting may improve performance, "
|
||||
"but may also cause games to break on some systems."));
|
||||
|
||||
INSERT(Settings, use_dyna_state_2_extras, tr("Enable Extended Dynamic State 2 Extras"),
|
||||
tr("Enables the VkExtendedDynamicState2Extras extension.\nThis setting may improve performance, "
|
||||
"but may also cause games to break on some systems."));
|
||||
|
||||
INSERT(Settings, use_dyna_state_3, tr("Enable Extended Dynamic State 3"),
|
||||
tr("Enables the VkExtendedDynamicState3 extension.\nThis setting may improve performance, "
|
||||
"but may also cause games to break on some systems."));
|
||||
|
||||
INSERT(Settings, use_dyna_state_3_blend, tr("Enable Extended Dynamic State 3 Blending"),
|
||||
tr("Enables the VkExtendedDynamicState3Blending extension.\nThis setting may improve performance, "
|
||||
"but may also cause games to break on some systems."));
|
||||
|
||||
// Renderer (Debug)
|
||||
|
||||
// System
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue