early-access version 1866

This commit is contained in:
pineappleEA
2021-07-09 23:54:15 +02:00
parent 335eeff822
commit 7d21887d40
469 changed files with 201995 additions and 78488 deletions
+7 -6
View File
@@ -64,12 +64,13 @@ void EmuThread::run() {
emit LoadProgress(VideoCore::LoadCallbackStage::Prepare, 0, 0);
system.Renderer().ReadRasterizer()->LoadDiskResources(
system.CurrentProcess()->GetTitleID(), stop_token,
[this](VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) {
emit LoadProgress(stage, value, total);
});
if (Settings::values.use_disk_shader_cache.GetValue()) {
system.Renderer().ReadRasterizer()->LoadDiskResources(
system.CurrentProcess()->GetTitleID(), stop_token,
[this](VideoCore::LoadCallbackStage stage, std::size_t value, std::size_t total) {
emit LoadProgress(stage, value, total);
});
}
emit LoadProgress(VideoCore::LoadCallbackStage::Complete, 0, 0);
gpu.ReleaseContext();
+9 -2
View File
@@ -840,7 +840,7 @@ void Config::ReadRendererValues() {
ReadGlobalSetting(Settings::values.accelerate_astc);
ReadGlobalSetting(Settings::values.use_vsync);
ReadGlobalSetting(Settings::values.disable_fps_limit);
ReadGlobalSetting(Settings::values.use_assembly_shaders);
ReadGlobalSetting(Settings::values.shader_backend);
ReadGlobalSetting(Settings::values.use_asynchronous_shaders);
ReadGlobalSetting(Settings::values.use_fast_gpu_time);
ReadGlobalSetting(Settings::values.use_caches_gc);
@@ -850,6 +850,8 @@ void Config::ReadRendererValues() {
if (global) {
ReadBasicSetting(Settings::values.renderer_debug);
ReadBasicSetting(Settings::values.enable_nsight_aftermath);
ReadBasicSetting(Settings::values.disable_shader_loop_safety_checks);
}
qt_config->endGroup();
@@ -1370,7 +1372,10 @@ void Config::SaveRendererValues() {
WriteGlobalSetting(Settings::values.accelerate_astc);
WriteGlobalSetting(Settings::values.use_vsync);
WriteGlobalSetting(Settings::values.disable_fps_limit);
WriteGlobalSetting(Settings::values.use_assembly_shaders);
WriteSetting(QString::fromStdString(Settings::values.shader_backend.GetLabel()),
static_cast<u32>(Settings::values.shader_backend.GetValue(global)),
static_cast<u32>(Settings::values.shader_backend.GetDefault()),
Settings::values.shader_backend.UsingGlobal());
WriteGlobalSetting(Settings::values.use_asynchronous_shaders);
WriteGlobalSetting(Settings::values.use_fast_gpu_time);
WriteGlobalSetting(Settings::values.use_caches_gc);
@@ -1380,6 +1385,8 @@ void Config::SaveRendererValues() {
if (global) {
WriteBasicSetting(Settings::values.renderer_debug);
WriteBasicSetting(Settings::values.enable_nsight_aftermath);
WriteBasicSetting(Settings::values.disable_shader_loop_safety_checks);
}
qt_config->endGroup();
+2 -1
View File
@@ -180,5 +180,6 @@ private:
// These metatype declarations cannot be in common/settings.h because core is devoid of QT
Q_DECLARE_METATYPE(Settings::CPUAccuracy);
Q_DECLARE_METATYPE(Settings::RendererBackend);
Q_DECLARE_METATYPE(Settings::GPUAccuracy);
Q_DECLARE_METATYPE(Settings::RendererBackend);
Q_DECLARE_METATYPE(Settings::ShaderBackend);
@@ -45,8 +45,13 @@ void ConfigureDebug::SetConfiguration() {
ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug.GetValue());
ui->enable_cpu_debugging->setEnabled(runtime_lock);
ui->enable_cpu_debugging->setChecked(Settings::values.cpu_debug_mode.GetValue());
ui->enable_nsight_aftermath->setEnabled(runtime_lock);
ui->enable_nsight_aftermath->setChecked(Settings::values.enable_nsight_aftermath.GetValue());
ui->disable_macro_jit->setEnabled(runtime_lock);
ui->disable_macro_jit->setChecked(Settings::values.disable_macro_jit.GetValue());
ui->disable_loop_safety_checks->setEnabled(runtime_lock);
ui->disable_loop_safety_checks->setChecked(
Settings::values.disable_shader_loop_safety_checks.GetValue());
ui->extended_logging->setChecked(Settings::values.extended_logging.GetValue());
}
@@ -61,6 +66,9 @@ void ConfigureDebug::ApplyConfiguration() {
Settings::values.use_auto_stub = ui->use_auto_stub->isChecked();
Settings::values.renderer_debug = ui->enable_graphics_debugging->isChecked();
Settings::values.cpu_debug_mode = ui->enable_cpu_debugging->isChecked();
Settings::values.enable_nsight_aftermath = ui->enable_nsight_aftermath->isChecked();
Settings::values.disable_shader_loop_safety_checks =
ui->disable_loop_safety_checks->isChecked();
Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked();
Settings::values.extended_logging = ui->extended_logging->isChecked();
Debugger::ToggleConsole();
+26
View File
@@ -125,6 +125,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="enable_nsight_aftermath">
<property name="toolTip">
<string>When checked, it enables Nsight Aftermath crash dumps</string>
</property>
<property name="text">
<string>Enable Nsight Aftermath</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="disable_macro_jit">
<property name="enabled">
@@ -138,6 +148,16 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="disable_loop_safety_checks">
<property name="toolTip">
<string>When checked, it executes shaders without loop logic changes</string>
</property>
<property name="text">
<string>Disable Loop safety checks</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -252,11 +272,17 @@
<tabstops>
<tabstop>log_filter_edit</tabstop>
<tabstop>toggle_console</tabstop>
<tabstop>extended_logging</tabstop>
<tabstop>open_log_button</tabstop>
<tabstop>homebrew_args_edit</tabstop>
<tabstop>enable_graphics_debugging</tabstop>
<tabstop>enable_nsight_aftermath</tabstop>
<tabstop>disable_macro_jit</tabstop>
<tabstop>disable_loop_safety_checks</tabstop>
<tabstop>reporting_services</tabstop>
<tabstop>quest_flag</tabstop>
<tabstop>use_debug_asserts</tabstop>
<tabstop>use_auto_stub</tabstop>
</tabstops>
<resources/>
<connections/>
+52 -23
View File
@@ -26,19 +26,29 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
ui->setupUi(this);
for (const auto& device : vulkan_devices) {
ui->device->addItem(device);
}
ui->backend->addItem(QStringLiteral("GLSL"));
ui->backend->addItem(tr("GLASM (NVIDIA Only)"));
ui->backend->addItem(QStringLiteral("SPIR-V (Experimental, Mesa Only)"));
SetupPerGameUI();
SetConfiguration();
connect(ui->api, qOverload<int>(&QComboBox::currentIndexChanged), this, [this] {
UpdateDeviceComboBox();
UpdateAPILayout();
if (!Settings::IsConfiguringGlobal()) {
ConfigurationShared::SetHighlight(
ui->api_layout, ui->api->currentIndex() != ConfigurationShared::USE_GLOBAL_INDEX);
ui->api_widget, ui->api->currentIndex() != ConfigurationShared::USE_GLOBAL_INDEX);
}
});
connect(ui->device, qOverload<int>(&QComboBox::activated), this,
[this](int device) { UpdateDeviceSelection(device); });
connect(ui->backend, qOverload<int>(&QComboBox::activated), this,
[this](int backend) { UpdateShaderBackendSelection(backend); });
connect(ui->bg_button, &QPushButton::clicked, this, [this] {
const QColor new_bg_color = QColorDialog::getColor(bg_color);
@@ -61,12 +71,21 @@ void ConfigureGraphics::UpdateDeviceSelection(int device) {
}
}
void ConfigureGraphics::UpdateShaderBackendSelection(int backend) {
if (backend == -1) {
return;
}
if (GetCurrentGraphicsBackend() == Settings::RendererBackend::OpenGL) {
shader_backend = static_cast<Settings::ShaderBackend>(backend);
}
}
ConfigureGraphics::~ConfigureGraphics() = default;
void ConfigureGraphics::SetConfiguration() {
const bool runtime_lock = !Core::System::GetInstance().IsPoweredOn();
ui->api->setEnabled(runtime_lock);
ui->api_widget->setEnabled(runtime_lock);
ui->use_asynchronous_gpu_emulation->setEnabled(runtime_lock);
ui->use_disk_shader_cache->setEnabled(runtime_lock);
ui->use_nvdec_emulation->setEnabled(runtime_lock);
@@ -83,7 +102,7 @@ void ConfigureGraphics::SetConfiguration() {
ui->aspect_ratio_combobox->setCurrentIndex(Settings::values.aspect_ratio.GetValue());
} else {
ConfigurationShared::SetPerGameSetting(ui->api, &Settings::values.renderer_backend);
ConfigurationShared::SetHighlight(ui->api_layout,
ConfigurationShared::SetHighlight(ui->api_widget,
!Settings::values.renderer_backend.UsingGlobal());
ConfigurationShared::SetPerGameSetting(ui->fullscreen_mode_combobox,
@@ -104,7 +123,7 @@ void ConfigureGraphics::SetConfiguration() {
UpdateBackgroundColorButton(QColor::fromRgbF(Settings::values.bg_red.GetValue(),
Settings::values.bg_green.GetValue(),
Settings::values.bg_blue.GetValue()));
UpdateDeviceComboBox();
UpdateAPILayout();
}
void ConfigureGraphics::ApplyConfiguration() {
@@ -128,6 +147,9 @@ void ConfigureGraphics::ApplyConfiguration() {
if (Settings::values.renderer_backend.UsingGlobal()) {
Settings::values.renderer_backend.SetValue(GetCurrentGraphicsBackend());
}
if (Settings::values.shader_backend.UsingGlobal()) {
Settings::values.shader_backend.SetValue(shader_backend);
}
if (Settings::values.vulkan_device.UsingGlobal()) {
Settings::values.vulkan_device.SetValue(vulkan_device);
}
@@ -139,15 +161,22 @@ void ConfigureGraphics::ApplyConfiguration() {
} else {
if (ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
Settings::values.renderer_backend.SetGlobal(true);
Settings::values.shader_backend.SetGlobal(true);
Settings::values.vulkan_device.SetGlobal(true);
} else {
Settings::values.renderer_backend.SetGlobal(false);
Settings::values.renderer_backend.SetValue(GetCurrentGraphicsBackend());
if (GetCurrentGraphicsBackend() == Settings::RendererBackend::Vulkan) {
switch (GetCurrentGraphicsBackend()) {
case Settings::RendererBackend::OpenGL:
Settings::values.shader_backend.SetGlobal(false);
Settings::values.vulkan_device.SetGlobal(true);
Settings::values.shader_backend.SetValue(shader_backend);
break;
case Settings::RendererBackend::Vulkan:
Settings::values.shader_backend.SetGlobal(true);
Settings::values.vulkan_device.SetGlobal(false);
Settings::values.vulkan_device.SetValue(vulkan_device);
} else {
Settings::values.vulkan_device.SetGlobal(true);
break;
}
}
@@ -188,32 +217,32 @@ void ConfigureGraphics::UpdateBackgroundColorButton(QColor color) {
ui->bg_button->setIcon(color_icon);
}
void ConfigureGraphics::UpdateDeviceComboBox() {
ui->device->clear();
bool enabled = false;
void ConfigureGraphics::UpdateAPILayout() {
if (!Settings::IsConfiguringGlobal() &&
ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
vulkan_device = Settings::values.vulkan_device.GetValue(true);
shader_backend = Settings::values.shader_backend.GetValue(true);
ui->device_widget->setEnabled(false);
ui->backend_widget->setEnabled(false);
} else {
vulkan_device = Settings::values.vulkan_device.GetValue();
shader_backend = Settings::values.shader_backend.GetValue();
ui->device_widget->setEnabled(true);
ui->backend_widget->setEnabled(true);
}
switch (GetCurrentGraphicsBackend()) {
case Settings::RendererBackend::OpenGL:
ui->device->addItem(tr("OpenGL Graphics Device"));
enabled = false;
ui->backend->setCurrentIndex(static_cast<u32>(shader_backend));
ui->device_widget->setVisible(false);
ui->backend_widget->setVisible(true);
break;
case Settings::RendererBackend::Vulkan:
for (const auto& device : vulkan_devices) {
ui->device->addItem(device);
}
ui->device->setCurrentIndex(vulkan_device);
enabled = !vulkan_devices.empty();
ui->device_widget->setVisible(true);
ui->backend_widget->setVisible(false);
break;
}
// If in per-game config and use global is selected, don't enable.
enabled &= !(!Settings::IsConfiguringGlobal() &&
ui->api->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX);
ui->device->setEnabled(enabled && !Core::System::GetInstance().IsPoweredOn());
}
void ConfigureGraphics::RetrieveVulkanDevices() try {
+3 -1
View File
@@ -34,8 +34,9 @@ private:
void SetConfiguration();
void UpdateBackgroundColorButton(QColor color);
void UpdateDeviceComboBox();
void UpdateAPILayout();
void UpdateDeviceSelection(int device);
void UpdateShaderBackendSelection(int backend);
void RetrieveVulkanDevices();
@@ -53,4 +54,5 @@ private:
std::vector<QString> vulkan_devices;
u32 vulkan_device{};
Settings::ShaderBackend shader_backend{};
};
+97 -27
View File
@@ -23,7 +23,7 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QWidget" name="api_layout" native="true">
<widget class="QWidget" name="api_widget" native="true">
<layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
@@ -40,37 +40,107 @@
<property name="horizontalSpacing">
<number>6</number>
</property>
<item row="4" column="0">
<widget class="QWidget" name="backend_widget" native="true">
<layout class="QHBoxLayout" name="backend_layout">
<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>
<item>
<widget class="QLabel" name="backend_label">
<property name="text">
<string>Shader Backend:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="backend"/>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QWidget" name="device_widget" native="true">
<layout class="QHBoxLayout" name="device_layout">
<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>
<item>
<widget class="QLabel" name="device_label">
<property name="text">
<string>Device:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="device"/>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="api_label">
<property name="text">
<string>API:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="api">
<item>
<property name="text">
<string notr="true">OpenGL</string>
<widget class="QWidget" name="api_layout_2" native="true">
<layout class="QHBoxLayout" name="api_layout">
<property name="leftMargin">
<number>0</number>
</property>
</item>
<item>
<property name="text">
<string notr="true">Vulkan</string>
<property name="topMargin">
<number>0</number>
</property>
</item>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="api_label">
<property name="text">
<string>API:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="api">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string notr="true">OpenGL</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Vulkan</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="device_label">
<property name="text">
<string>Device:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="device"/>
</item>
</layout>
</widget>
</item>
@@ -23,13 +23,11 @@ ConfigureGraphicsAdvanced::~ConfigureGraphicsAdvanced() = default;
void ConfigureGraphicsAdvanced::SetConfiguration() {
const bool runtime_lock = !Core::System::GetInstance().IsPoweredOn();
ui->use_vsync->setEnabled(runtime_lock);
ui->use_assembly_shaders->setEnabled(runtime_lock);
ui->use_asynchronous_shaders->setEnabled(runtime_lock);
ui->anisotropic_filtering_combobox->setEnabled(runtime_lock);
ui->use_vsync->setChecked(Settings::values.use_vsync.GetValue());
ui->disable_fps_limit->setChecked(Settings::values.disable_fps_limit.GetValue());
ui->use_assembly_shaders->setChecked(Settings::values.use_assembly_shaders.GetValue());
ui->use_asynchronous_shaders->setChecked(Settings::values.use_asynchronous_shaders.GetValue());
ui->use_caches_gc->setChecked(Settings::values.use_caches_gc.GetValue());
ui->use_fast_gpu_time->setChecked(Settings::values.use_fast_gpu_time.GetValue());
@@ -61,8 +59,6 @@ void ConfigureGraphicsAdvanced::ApplyConfiguration() {
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_vsync, ui->use_vsync, use_vsync);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.disable_fps_limit,
ui->disable_fps_limit, disable_fps_limit);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_assembly_shaders,
ui->use_assembly_shaders, use_assembly_shaders);
ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_asynchronous_shaders,
ui->use_asynchronous_shaders,
use_asynchronous_shaders);
@@ -104,7 +100,6 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() {
ui->gpu_accuracy->setEnabled(Settings::values.gpu_accuracy.UsingGlobal());
ui->use_vsync->setEnabled(Settings::values.use_vsync.UsingGlobal());
ui->disable_fps_limit->setEnabled(Settings::values.disable_fps_limit.UsingGlobal());
ui->use_assembly_shaders->setEnabled(Settings::values.use_assembly_shaders.UsingGlobal());
ui->use_asynchronous_shaders->setEnabled(
Settings::values.use_asynchronous_shaders.UsingGlobal());
ui->use_fast_gpu_time->setEnabled(Settings::values.use_fast_gpu_time.UsingGlobal());
@@ -118,8 +113,6 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() {
ConfigurationShared::SetColoredTristate(ui->use_vsync, Settings::values.use_vsync, use_vsync);
ConfigurationShared::SetColoredTristate(ui->disable_fps_limit,
Settings::values.disable_fps_limit, disable_fps_limit);
ConfigurationShared::SetColoredTristate(
ui->use_assembly_shaders, Settings::values.use_assembly_shaders, use_assembly_shaders);
ConfigurationShared::SetColoredTristate(ui->use_asynchronous_shaders,
Settings::values.use_asynchronous_shaders,
use_asynchronous_shaders);
@@ -36,7 +36,6 @@ private:
ConfigurationShared::CheckState use_vsync;
ConfigurationShared::CheckState disable_fps_limit;
ConfigurationShared::CheckState use_assembly_shaders;
ConfigurationShared::CheckState use_asynchronous_shaders;
ConfigurationShared::CheckState use_fast_gpu_time;
ConfigurationShared::CheckState use_caches_gc;
@@ -94,16 +94,6 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="use_assembly_shaders">
<property name="toolTip">
<string>Enabling this reduces shader stutter. Enables OpenGL assembly shaders on supported Nvidia devices (NV_gpu_program5 is required). This feature is experimental.</string>
</property>
<property name="text">
<string>Use assembly shaders (experimental, Nvidia OpenGL only)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="use_asynchronous_shaders">
<property name="toolTip">
@@ -162,22 +152,22 @@
</item>
<item>
<property name="text">
<string>2x</string>
<string>2x (WILL BREAK THINGS)</string>
</property>
</item>
<item>
<property name="text">
<string>4x</string>
<string>4x (WILL BREAK THINGS)</string>
</property>
</item>
<item>
<property name="text">
<string>8x</string>
<string>8x (WILL BREAK THINGS)</string>
</property>
</item>
<item>
<property name="text">
<string>16x</string>
<string>16x (WILL BREAK THINGS)</string>
</property>
</item>
</widget>
+11 -31
View File
@@ -1631,35 +1631,15 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target
void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) {
const auto shader_cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir);
const auto transferable_shader_cache_folder_path = shader_cache_dir / "opengl" / "transferable";
const auto transferable_shader_cache_file_path =
transferable_shader_cache_folder_path / fmt::format("{:016X}.bin", program_id);
if (!Common::FS::Exists(transferable_shader_cache_file_path)) {
const auto shader_cache_folder_path{shader_cache_dir / fmt::format("{:016x}", program_id)};
if (!Common::FS::Exists(shader_cache_folder_path)) {
QMessageBox::warning(this, tr("Error Opening Transferable Shader Cache"),
tr("A shader cache for this title does not exist."));
return;
}
const auto qt_shader_cache_folder_path =
QString::fromStdString(Common::FS::PathToUTF8String(transferable_shader_cache_folder_path));
const auto qt_shader_cache_file_path =
QString::fromStdString(Common::FS::PathToUTF8String(transferable_shader_cache_file_path));
// Windows supports opening a folder with selecting a specified file in explorer. On every other
// OS we just open the transferable shader cache folder without preselecting the transferable
// shader cache file for the selected game.
#if defined(Q_OS_WIN)
const QString explorer = QStringLiteral("explorer");
QStringList param;
if (!QFileInfo(qt_shader_cache_file_path).isDir()) {
param << QStringLiteral("/select,");
}
param << QDir::toNativeSeparators(qt_shader_cache_file_path);
QProcess::startDetached(explorer, param);
#else
QDesktopServices::openUrl(QUrl::fromLocalFile(qt_shader_cache_folder_path));
#endif
const auto shader_path_string{Common::FS::PathToUTF8String(shader_cache_folder_path)};
const auto qt_shader_cache_path = QString::fromStdString(shader_path_string);
QDesktopServices::openUrl(QUrl::fromLocalFile(qt_shader_cache_path));
}
static std::size_t CalculateRomFSEntrySize(const FileSys::VirtualDir& dir, bool full) {
@@ -2877,13 +2857,13 @@ void GMainWindow::UpdateStatusBar() {
return;
}
auto results = Core::System::GetInstance().GetAndResetPerfStats();
auto& shader_notify = Core::System::GetInstance().GPU().ShaderNotify();
const auto shaders_building = shader_notify.GetShadersBuilding();
auto& system = Core::System::GetInstance();
auto results = system.GetAndResetPerfStats();
auto& shader_notify = system.GPU().ShaderNotify();
const int shaders_building = shader_notify.ShadersBuilding();
if (shaders_building != 0) {
shader_building_label->setText(
tr("Building: %n shader(s)", "", static_cast<int>(shaders_building)));
if (shaders_building > 0) {
shader_building_label->setText(tr("Building: %n shader(s)", "", shaders_building));
shader_building_label->setVisible(true);
} else {
shader_building_label->setVisible(false);