-void BufferCache::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32 binding_index,
- bool needs_bind) {
+void BufferCache
::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32 binding_index, bool needs_bind) {
+ ++channel_state->uniform_cache_shots[0];
const Binding& binding = channel_state->uniform_buffers[stage][index];
const DAddr device_addr = binding.device_addr;
const u32 size = (std::min)(binding.size, (*channel_state->uniform_buffer_sizes)[stage][index]);
@@ -823,12 +823,9 @@ void BufferCache
::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32
return;
}
// Classic cached path
- const bool sync_cached = SynchronizeBuffer(buffer, device_addr, size);
- if (sync_cached) {
+ if (SynchronizeBuffer(buffer, device_addr, size)) {
++channel_state->uniform_cache_hits[0];
}
- ++channel_state->uniform_cache_shots[0];
-
// Skip binding if it's not needed and if the bound buffer is not the fast version
// This exists to avoid instances where the fast buffer is bound and a GPU write happens
needs_bind |= HasFastUniformBufferBound(stage, binding_index);
diff --git a/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp b/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp
index 600003953d..3af9758a31 100644
--- a/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp
+++ b/src/video_core/renderer_vulkan/vk_descriptor_pool.cpp
@@ -31,7 +31,7 @@ struct DescriptorBank {
bool DescriptorBankInfo::IsSuperset(const DescriptorBankInfo& subset) const noexcept {
return uniform_buffers >= subset.uniform_buffers && storage_buffers >= subset.storage_buffers &&
texture_buffers >= subset.texture_buffers && image_buffers >= subset.image_buffers &&
- textures >= subset.textures && images >= subset.image_buffers;
+ textures >= subset.textures && images >= subset.images;
}
template
diff --git a/src/yuzu/applets/qt_software_keyboard.cpp b/src/yuzu/applets/qt_software_keyboard.cpp
index 2749e6ed31..ddaf1fb9ba 100644
--- a/src/yuzu/applets/qt_software_keyboard.cpp
+++ b/src/yuzu/applets/qt_software_keyboard.cpp
@@ -1,3 +1,5 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -1492,53 +1494,36 @@ void QtSoftwareKeyboardDialog::MoveTextCursorDirection(Direction direction) {
}
void QtSoftwareKeyboardDialog::StartInputThread() {
- if (input_thread_running) {
- return;
- }
-
- input_thread_running = true;
-
- input_thread = std::thread(&QtSoftwareKeyboardDialog::InputThread, this);
+ input_thread = std::jthread([&](std::stop_token stoken) {
+ while (!stoken.stop_requested()) {
+ input_interpreter->PollInput();
+ HandleButtonPressedOnce<
+ Core::HID::NpadButton::A, Core::HID::NpadButton::B, Core::HID::NpadButton::X,
+ Core::HID::NpadButton::Y, Core::HID::NpadButton::StickL, Core::HID::NpadButton::StickR,
+ Core::HID::NpadButton::L, Core::HID::NpadButton::R, Core::HID::NpadButton::Plus,
+ Core::HID::NpadButton::Left, Core::HID::NpadButton::Up, Core::HID::NpadButton::Right,
+ Core::HID::NpadButton::Down, Core::HID::NpadButton::StickLLeft,
+ Core::HID::NpadButton::StickLUp, Core::HID::NpadButton::StickLRight,
+ Core::HID::NpadButton::StickLDown, Core::HID::NpadButton::StickRLeft,
+ Core::HID::NpadButton::StickRUp, Core::HID::NpadButton::StickRRight,
+ Core::HID::NpadButton::StickRDown>();
+ HandleButtonHold();
+ std::this_thread::sleep_for(std::chrono::milliseconds(50));
+ }
+ });
}
void QtSoftwareKeyboardDialog::StopInputThread() {
- input_thread_running = false;
-
- if (input_thread.joinable()) {
- input_thread.join();
- }
-
- if (input_interpreter) {
+ input_thread.request_stop();
+ if (input_interpreter)
input_interpreter->ResetButtonStates();
- }
-}
-
-void QtSoftwareKeyboardDialog::InputThread() {
- while (input_thread_running) {
- input_interpreter->PollInput();
-
- HandleButtonPressedOnce<
- Core::HID::NpadButton::A, Core::HID::NpadButton::B, Core::HID::NpadButton::X,
- Core::HID::NpadButton::Y, Core::HID::NpadButton::StickL, Core::HID::NpadButton::StickR,
- Core::HID::NpadButton::L, Core::HID::NpadButton::R, Core::HID::NpadButton::Plus,
- Core::HID::NpadButton::Left, Core::HID::NpadButton::Up, Core::HID::NpadButton::Right,
- Core::HID::NpadButton::Down, Core::HID::NpadButton::StickLLeft,
- Core::HID::NpadButton::StickLUp, Core::HID::NpadButton::StickLRight,
- Core::HID::NpadButton::StickLDown, Core::HID::NpadButton::StickRLeft,
- Core::HID::NpadButton::StickRUp, Core::HID::NpadButton::StickRRight,
- Core::HID::NpadButton::StickRDown>();
-
- HandleButtonHold();
-
- std::this_thread::sleep_for(std::chrono::milliseconds(50));
- }
}
QtSoftwareKeyboard::QtSoftwareKeyboard(GMainWindow& main_window) {
diff --git a/src/yuzu/applets/qt_software_keyboard.h b/src/yuzu/applets/qt_software_keyboard.h
index 7e2fdf09ea..217d305ffc 100644
--- a/src/yuzu/applets/qt_software_keyboard.h
+++ b/src/yuzu/applets/qt_software_keyboard.h
@@ -1,3 +1,5 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -182,9 +184,6 @@ private:
void StartInputThread();
void StopInputThread();
- /// The thread where input is being polled and processed.
- void InputThread();
-
std::unique_ptr ui;
Core::System& system;
@@ -220,10 +219,7 @@ private:
std::atomic caps_lock_enabled{false};
std::unique_ptr input_interpreter;
-
- std::thread input_thread;
-
- std::atomic input_thread_running{};
+ std::jthread input_thread;
};
class QtSoftwareKeyboard final : public QObject, public Core::Frontend::SoftwareKeyboardApplet {
diff --git a/src/yuzu/applets/qt_web_browser.cpp b/src/yuzu/applets/qt_web_browser.cpp
index a287ea16df..3a01b0bc17 100644
--- a/src/yuzu/applets/qt_web_browser.cpp
+++ b/src/yuzu/applets/qt_web_browser.cpp
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -282,54 +285,41 @@ void QtNXWebEngineView::SendKeyPressEvent(int key) {
}
void QtNXWebEngineView::StartInputThread() {
- if (input_thread_running) {
- return;
- }
+ input_thread = std::jthread([&](std::stop_token stoken) {
+ // Wait for 1 second before allowing any inputs to be processed.
+ std::this_thread::sleep_for(std::chrono::seconds(1));
+ if (is_local) {
+ QWidget::grabKeyboard();
+ }
+ while (!stoken.stop_requested()) {
+ input_interpreter->PollInput();
- input_thread_running = true;
- input_thread = std::thread(&QtNXWebEngineView::InputThread, this);
+ HandleWindowFooterButtonPressedOnce();
+
+ HandleWindowKeyButtonPressedOnce<
+ Core::HID::NpadButton::Left, Core::HID::NpadButton::Up, Core::HID::NpadButton::Right,
+ Core::HID::NpadButton::Down, Core::HID::NpadButton::StickLLeft,
+ Core::HID::NpadButton::StickLUp, Core::HID::NpadButton::StickLRight,
+ Core::HID::NpadButton::StickLDown>();
+
+ HandleWindowKeyButtonHold<
+ Core::HID::NpadButton::Left, Core::HID::NpadButton::Up, Core::HID::NpadButton::Right,
+ Core::HID::NpadButton::Down, Core::HID::NpadButton::StickLLeft,
+ Core::HID::NpadButton::StickLUp, Core::HID::NpadButton::StickLRight,
+ Core::HID::NpadButton::StickLDown>();
+
+ std::this_thread::sleep_for(std::chrono::milliseconds(50));
+ }
+ });
}
void QtNXWebEngineView::StopInputThread() {
if (is_local) {
QWidget::releaseKeyboard();
}
-
- input_thread_running = false;
- if (input_thread.joinable()) {
- input_thread.join();
- }
-}
-
-void QtNXWebEngineView::InputThread() {
- // Wait for 1 second before allowing any inputs to be processed.
- std::this_thread::sleep_for(std::chrono::seconds(1));
-
- if (is_local) {
- QWidget::grabKeyboard();
- }
-
- while (input_thread_running) {
- input_interpreter->PollInput();
-
- HandleWindowFooterButtonPressedOnce();
-
- HandleWindowKeyButtonPressedOnce<
- Core::HID::NpadButton::Left, Core::HID::NpadButton::Up, Core::HID::NpadButton::Right,
- Core::HID::NpadButton::Down, Core::HID::NpadButton::StickLLeft,
- Core::HID::NpadButton::StickLUp, Core::HID::NpadButton::StickLRight,
- Core::HID::NpadButton::StickLDown>();
-
- HandleWindowKeyButtonHold<
- Core::HID::NpadButton::Left, Core::HID::NpadButton::Up, Core::HID::NpadButton::Right,
- Core::HID::NpadButton::Down, Core::HID::NpadButton::StickLLeft,
- Core::HID::NpadButton::StickLUp, Core::HID::NpadButton::StickLRight,
- Core::HID::NpadButton::StickLDown>();
-
- std::this_thread::sleep_for(std::chrono::milliseconds(50));
- }
+ input_thread.request_stop();
}
void QtNXWebEngineView::LoadExtractedFonts() {
diff --git a/src/yuzu/applets/qt_web_browser.h b/src/yuzu/applets/qt_web_browser.h
index e8a0b6931b..773726f1ac 100644
--- a/src/yuzu/applets/qt_web_browser.h
+++ b/src/yuzu/applets/qt_web_browser.h
@@ -1,3 +1,6 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -155,9 +158,6 @@ private:
void StartInputThread();
void StopInputThread();
- /// The thread where input is being polled and processed.
- void InputThread();
-
/// Loads the extracted fonts using JavaScript.
void LoadExtractedFonts();
@@ -165,24 +165,13 @@ private:
void FocusFirstLinkElement();
InputCommon::InputSubsystem* input_subsystem;
-
std::unique_ptr url_interceptor;
-
std::unique_ptr input_interpreter;
-
- std::thread input_thread;
-
- std::atomic input_thread_running{};
-
+ std::jthread input_thread;
std::atomic finished{};
-
- Service::AM::Frontend::WebExitReason exit_reason{
- Service::AM::Frontend::WebExitReason::EndButtonPressed};
-
+ Service::AM::Frontend::WebExitReason exit_reason{Service::AM::Frontend::WebExitReason::EndButtonPressed};
std::string last_url{"http://localhost/"};
-
bool is_local{};
-
QWebEngineProfile* default_profile;
QWebEngineSettings* global_settings;
};
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 19162a4ab7..d2c12c9d40 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -35,7 +35,6 @@
#include "applets/qt_profile_select.h"
#include "applets/qt_software_keyboard.h"
#include "applets/qt_web_browser.h"
-#include "common/nvidia_flags.h"
#include "common/settings_enums.h"
#include "configuration/configure_input.h"
#include "configuration/configure_per_game.h"
@@ -4917,7 +4916,6 @@ int main(int argc, char* argv[]) {
#endif
Common::DetachedTasks detached_tasks;
- Common::ConfigureNvidiaEnvironmentFlags();
// Init settings params
QCoreApplication::setOrganizationName(QStringLiteral("eden"));
diff --git a/src/yuzu/util/overlay_dialog.cpp b/src/yuzu/util/overlay_dialog.cpp
index 466bbe7b25..01b894f744 100644
--- a/src/yuzu/util/overlay_dialog.cpp
+++ b/src/yuzu/util/overlay_dialog.cpp
@@ -1,3 +1,5 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@@ -231,34 +233,20 @@ void OverlayDialog::TranslateButtonPress(Core::HID::NpadButton button) {
}
void OverlayDialog::StartInputThread() {
- if (input_thread_running) {
- return;
- }
-
- input_thread_running = true;
-
- input_thread = std::thread(&OverlayDialog::InputThread, this);
+ input_thread = std::jthread([&](std::stop_token stoken) {
+ while (!stoken.stop_requested()) {
+ input_interpreter->PollInput();
+ HandleButtonPressedOnce();
+ std::this_thread::sleep_for(std::chrono::milliseconds(50));
+ }
+ });
}
void OverlayDialog::StopInputThread() {
- input_thread_running = false;
-
- if (input_thread.joinable()) {
- input_thread.join();
- }
-}
-
-void OverlayDialog::InputThread() {
- while (input_thread_running) {
- input_interpreter->PollInput();
-
- HandleButtonPressedOnce();
-
- std::this_thread::sleep_for(std::chrono::milliseconds(50));
- }
+ input_thread.request_stop();
}
void OverlayDialog::keyPressEvent(QKeyEvent* e) {
diff --git a/src/yuzu/util/overlay_dialog.h b/src/yuzu/util/overlay_dialog.h
index 62f9da311d..36c9b52339 100644
--- a/src/yuzu/util/overlay_dialog.h
+++ b/src/yuzu/util/overlay_dialog.h
@@ -1,9 +1,10 @@
+// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
-#include
#include
#include
@@ -91,9 +92,6 @@ private:
void StartInputThread();
void StopInputThread();
-
- /// The thread where input is being polled and processed.
- void InputThread();
void keyPressEvent(QKeyEvent* e) override;
std::unique_ptr ui;
@@ -101,8 +99,5 @@ private:
bool use_rich_text;
std::unique_ptr input_interpreter;
-
- std::thread input_thread;
-
- std::atomic input_thread_running{};
+ std::jthread input_thread;
};
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 599582aba9..4a99f34861 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -16,7 +16,6 @@
#include "common/detached_tasks.h"
#include "common/logging/backend.h"
#include "common/logging/log.h"
-#include "common/nvidia_flags.h"
#include "common/scm_rev.h"
#include "common/scope_exit.h"
#include "common/settings.h"
@@ -334,8 +333,6 @@ int main(int argc, char** argv) {
LocalFree(argv_w);
#endif
- Common::ConfigureNvidiaEnvironmentFlags();
-
if (filepath.empty()) {
LOG_CRITICAL(Frontend, "Failed to load ROM: No ROM specified");
return -1;
diff --git a/tools/optimize-assets.sh b/tools/optimize-assets.sh
new file mode 100755
index 0000000000..07facc8fa0
--- /dev/null
+++ b/tools/optimize-assets.sh
@@ -0,0 +1,6 @@
+#!/bin/sh -e
+# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
+# SPDX-License-Identifier: GPL-3.0-or-later
+# Optimizes assets of eden (requires OptiPng)
+which optipng || exit
+find . -type f -name *.png -exec optipng -o7 {} \;
diff --git a/.ci/update-icons.sh b/tools/update-icons.sh
similarity index 95%
rename from .ci/update-icons.sh
rename to tools/update-icons.sh
index c95ba0ad82..da54156665 100755
--- a/.ci/update-icons.sh
+++ b/tools/update-icons.sh
@@ -1,8 +1,7 @@
#!/bin/sh -e
-
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
# SPDX-License-Identifier: GPL-3.0-or-later
-
+# Updates main icons for eden
which png2icns || [ which yay && yay libicns ] || exit
which magick || exit