From 8ad5da99c3a4a91c44d0c34980eef86703d34ff6 Mon Sep 17 00:00:00 2001 From: JPikachu Date: Fri, 9 May 2025 16:57:52 +0100 Subject: [PATCH 01/26] vulkan: Enable required descriptor indexing features ready for blindless texture tracking --- src/video_core/vulkan_common/vulkan_device.cpp | 11 ++++++++++- src/video_core/vulkan_common/vulkan_device.h | 9 +++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index f0b3ed4e6b..ff62b95919 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -1092,7 +1092,16 @@ bool Device::GetSuitability(bool requires_swapchain) { #undef EXT_FEATURE #undef FEATURE - // Perform the feature test. + if (extensions.descriptor_indexing) { + features.descriptor_indexing.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT; + features.descriptor_indexing.pNext = nullptr; + features.descriptor_indexing.descriptorBindingVariableDescriptorCount = VK_TRUE; + features.descriptor_indexing.runtimeDescriptorArray = VK_TRUE; + features.descriptor_indexing.descriptorBindingPartiallyBound = VK_TRUE; + SetNext(next, features.descriptor_indexing); + } + + // Perform the feature test. physical.GetFeatures2(features2); // Base Vulkan 1.0 features are always valid regardless of instance version. diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index ddc9451a7e..2a12219d48 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -42,6 +42,7 @@ VK_DEFINE_HANDLE(VmaAllocator) #define FOR_EACH_VK_FEATURE_EXT(FEATURE) \ FEATURE(EXT, CustomBorderColor, CUSTOM_BORDER_COLOR, custom_border_color) \ FEATURE(EXT, DepthBiasControl, DEPTH_BIAS_CONTROL, depth_bias_control) \ + FEATURE(EXT, DescriptorIndexing, DESCRIPTOR_INDEXING, descriptor_indexing) \ FEATURE(EXT, DepthClipControl, DEPTH_CLIP_CONTROL, depth_clip_control) \ FEATURE(EXT, ExtendedDynamicState, EXTENDED_DYNAMIC_STATE, extended_dynamic_state) \ FEATURE(EXT, ExtendedDynamicState2, EXTENDED_DYNAMIC_STATE_2, extended_dynamic_state2) \ @@ -100,6 +101,7 @@ VK_DEFINE_HANDLE(VmaAllocator) EXTENSION_NAME(VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME) \ EXTENSION_NAME(VK_EXT_DEPTH_BIAS_CONTROL_EXTENSION_NAME) \ EXTENSION_NAME(VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME) \ + EXTENSION_NAME(VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME) \ EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME) \ EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME) \ EXTENSION_NAME(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME) \ @@ -154,6 +156,13 @@ VK_DEFINE_HANDLE(VmaAllocator) FEATURE_NAME(depth_bias_control, depthBiasControl) \ FEATURE_NAME(depth_bias_control, leastRepresentableValueForceUnormRepresentation) \ FEATURE_NAME(depth_bias_control, depthBiasExact) \ + FEATURE_NAME(descriptor_indexing, descriptorBindingPartiallyBound) \ + FEATURE_NAME(descriptor_indexing, descriptorBindingVariableDescriptorCount) \ + FEATURE_NAME(descriptor_indexing, runtimeDescriptorArray) \ + FEATURE_NAME(descriptor_indexing, descriptorBindingVariableDescriptorCount) \ + FEATURE_NAME(descriptor_indexing, shaderSampledImageArrayNonUniformIndexing) \ + FEATURE_NAME(descriptor_indexing, shaderStorageBufferArrayNonUniformIndexing) \ + FEATURE_NAME(descriptor_indexing, shaderStorageImageArrayNonUniformIndexing) \ FEATURE_NAME(extended_dynamic_state, extendedDynamicState) \ FEATURE_NAME(format_a4b4g4r4, formatA4B4G4R4) \ FEATURE_NAME(index_type_uint8, indexTypeUint8) \ From 7e943732bf025bb7ead5ee3e104b88c020f9f422 Mon Sep 17 00:00:00 2001 From: swurl Date: Sun, 11 May 2025 23:58:25 +0000 Subject: [PATCH 02/26] fix a large variety of issues (#101) - GLASM/SPIR-V mixup on Android - potential greenscreen fix (thx suyu) - save memory layout and add 10gb/12gb options - potential samsung gaming hub fix - fix layout of controller UI - fix default settings to sensible defaults. - note to TotK that you should increase memory layout - Error checking for Windows linking - fix an IDE error - improved migration system w/threading and busy indicator - disabled citron migration for now - replaced some user-facing legacy strings with eden - Added 10GB and 12GB DRAM layouts - Fix Android black screen issues - add discord link & update FAQ/Quickstart - update links in about page - add back rich presence - add Don't show again for desktop pre alpha banner - add citron warning to android and polaris to desktop Signed-off-by: swurl Co-authored-by: Pavel Barabanov Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/101 Co-authored-by: swurl Co-committed-by: swurl --- .ci/linux/build.sh | 1 - .ci/linux/package.sh | 11 +- .github/workflows/trigger_release.yml | 3 +- CMakeLists.txt | 66 +++---- src/android/app/build.gradle.kts | 1 - src/android/app/src/main/AndroidManifest.xml | 3 +- .../yuzu_emu/fragments/EmulationFragment.kt | 4 +- .../src/main/res/layout/header_in_game.xml | 2 +- .../app/src/main/res/values-ar/strings.xml | 16 +- .../app/src/main/res/values-ckb/strings.xml | 16 +- .../app/src/main/res/values-cs/strings.xml | 43 ++++- .../app/src/main/res/values-de/strings.xml | 33 +++- .../app/src/main/res/values-es/strings.xml | 16 +- .../app/src/main/res/values-fa/strings.xml | 16 +- .../app/src/main/res/values-fr/strings.xml | 16 +- .../app/src/main/res/values-he/strings.xml | 16 +- .../app/src/main/res/values-hu/strings.xml | 16 +- .../app/src/main/res/values-id/strings.xml | 14 +- .../app/src/main/res/values-it/strings.xml | 16 +- .../app/src/main/res/values-ja/strings.xml | 16 +- .../app/src/main/res/values-ko/strings.xml | 13 +- .../app/src/main/res/values-nb/strings.xml | 16 +- .../app/src/main/res/values-pl/strings.xml | 14 +- .../src/main/res/values-pt-rBR/strings.xml | 16 +- .../src/main/res/values-pt-rPT/strings.xml | 16 +- .../app/src/main/res/values-ru/strings.xml | 16 +- .../app/src/main/res/values-uk/strings.xml | 56 ++++-- .../app/src/main/res/values-vi/strings.xml | 16 +- .../src/main/res/values-zh-rCN/strings.xml | 16 +- .../src/main/res/values-zh-rTW/strings.xml | 14 +- .../app/src/main/res/values/arrays.xml | 2 + .../app/src/main/res/values/strings.xml | 22 ++- src/common/settings.h | 18 +- src/common/settings_enums.h | 2 +- .../board/nintendo/nx/k_system_control.cpp | 20 ++ .../kernel/board/nintendo/nx/secure_monitor.h | 4 + .../am/service/common_state_getter.cpp | 13 +- .../service/am/service/common_state_getter.h | 1 - src/video_core/host1x/ffmpeg/ffmpeg.cpp | 182 +++++++++++++++++- .../renderer_vulkan/renderer_vulkan.cpp | 112 +++++++---- .../renderer_vulkan/vk_present_manager.cpp | 41 +++- .../renderer_vulkan/vk_present_manager.h | 18 +- .../renderer_vulkan/vk_query_cache.cpp | 2 +- .../renderer_vulkan/vk_swapchain.cpp | 62 +++++- src/video_core/renderer_vulkan/vk_swapchain.h | 26 ++- src/video_core/vulkan_common/vulkan_wrapper.h | 4 + src/yuzu/CMakeLists.txt | 2 + src/yuzu/aboutdialog.ui | 2 +- src/yuzu/bootmanager.cpp | 4 +- src/yuzu/compatdb.ui | 18 +- src/yuzu/configuration/configure_debug.ui | 4 +- .../configure_graphics_extensions.ui | 2 +- .../configuration/configure_input_advanced.ui | 6 +- .../configuration/configure_input_player.ui | 98 +++++----- .../configuration/configure_motion_touch.cpp | 2 +- src/yuzu/configuration/configure_tas.ui | 2 +- .../configure_touchscreen_advanced.ui | 2 +- src/yuzu/configuration/configure_web.cpp | 2 +- src/yuzu/configuration/configure_web.ui | 4 +- src/yuzu/configuration/shared_translation.cpp | 8 +- src/yuzu/discord_impl.cpp | 18 +- src/yuzu/game_list.cpp | 22 ++- src/yuzu/game_list.h | 3 + src/yuzu/main.cpp | 38 ++-- src/yuzu/main.h | 1 + src/yuzu/main.ui | 6 + src/yuzu/migration_worker.cpp | 123 ++++++++++++ src/yuzu/migration_worker.h | 41 ++++ src/yuzu/multiplayer/host_room.cpp | 4 +- src/yuzu/user_data_migration.cpp | 161 +++++----------- src/yuzu/user_data_migration.h | 20 +- src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 12 +- .../emu_window/emu_window_sdl2_gl.cpp | 2 +- .../emu_window/emu_window_sdl2_null.cpp | 2 +- .../emu_window/emu_window_sdl2_vk.cpp | 6 +- src/yuzu_cmd/yuzu.cpp | 8 +- 76 files changed, 1154 insertions(+), 516 deletions(-) create mode 100644 src/yuzu/migration_worker.cpp create mode 100644 src/yuzu/migration_worker.h diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh index f804474814..c020cc7edd 100755 --- a/.ci/linux/build.sh +++ b/.ci/linux/build.sh @@ -61,7 +61,6 @@ cmake .. -G Ninja \ -DYUZU_USE_QT_WEB_ENGINE=OFF \ -DENABLE_QT_TRANSLATION=ON \ -DUSE_DISCORD_PRESENCE=OFF \ - -DBUNDLE_SPEEX=ON \ -DYUZU_USE_FASTER_LD=OFF \ -DYUZU_ENABLE_LTO=ON \ -DCMAKE_LINKER=/usr/bin/mold \ diff --git a/.ci/linux/package.sh b/.ci/linux/package.sh index 8d0cd14894..4d58b8f328 100755 --- a/.ci/linux/package.sh +++ b/.ci/linux/package.sh @@ -28,21 +28,22 @@ VERSION="$(echo "$EDEN_TAG")" mkdir -p ./AppDir cd ./AppDir -cat > org.eden_emu.eden.desktop << EOL +cat > eden.desktop << EOL [Desktop Entry] Type=Application Name=Eden -Icon=org.eden_emu.eden +Icon=eden +StartupWMClass=eden Exec=eden Categories=Game;Emulator; EOL -cp ../dist/eden.svg ./org.eden_emu.eden.svg +cp ../dist/eden.svg ./eden.svg -ln -sf ./org.eden_emu.eden.svg.svg ./.DirIcon +ln -sf ./eden.svg ./.DirIcon if [ "$DEVEL" = 'true' ]; then - sed -i 's|Name=Eden|Name=Eden Nightly|' ./org.eden_emu.eden.desktop + sed -i 's|Name=Eden|Name=Eden Nightly|' ./eden.desktop UPINFO="$(echo "$UPINFO" | sed 's|latest|nightly|')" fi diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index 91bd4d2d15..5553884862 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -102,7 +102,7 @@ jobs: uses: forgejo/upload-artifact@v4 with: name: linux.zip - path: ./*.AppImage + path: ./*.AppImage* android: runs-on: android @@ -177,6 +177,7 @@ jobs: mkdir -p dist cp linux.zip/Eden-*.AppImage dist/Eden-Linux-${{ env.VERSION }}-amd64.AppImage + cp linux.zip/Eden-*.AppImage.zsync dist/Eden-Linux-${{ env.VERSION }}-amd64.AppImage.zsync cp msvc.zip/eden-windows-msvc*.zip dist/Eden-Windows-MSVC-${{ env.VERSION }}-amd64.zip cp android.zip/eden-android*.apk dist/Eden-Android-${{ env.VERSION }}.apk cp android.zip/eden-android*.aab dist/Eden-Android-${{ env.VERSION }}.aab diff --git a/CMakeLists.txt b/CMakeLists.txt index b88ab64e53..72b03ec2e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,13 +105,13 @@ if (ANDROID AND YUZU_DOWNLOAD_ANDROID_VVL) file(DOWNLOAD "${vvl_base_url}/${vvl_version}/android-binaries-${vvl_version}-android.zip" "${vvl_zip_file}" SHOW_PROGRESS) execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf "${vvl_zip_file}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals") + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/externals") endif() # Copy the arm64 binary to src/android/app/main/jniLibs set(vvl_lib_path "${CMAKE_CURRENT_SOURCE_DIR}/src/android/app/src/main/jniLibs/arm64-v8a/") file(COPY "${CMAKE_BINARY_DIR}/externals/android-binaries-${vvl_version}/arm64-v8a/libVkLayer_khronos_validation.so" - DESTINATION "${vvl_lib_path}") + DESTINATION "${vvl_lib_path}") endif() if (ANDROID) @@ -209,7 +209,7 @@ function(check_submodules_present) string(REGEX REPLACE "path *= *" "" module ${module}) if (NOT EXISTS "${PROJECT_SOURCE_DIR}/${module}/.git") message(FATAL_ERROR "Git submodule ${module} not found. " - "Please run: \ngit submodule update --init --recursive") + "Please run: \ngit submodule update --init --recursive") endif() endforeach() endfunction() @@ -218,12 +218,12 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/.gitmodules AND YUZU_CHECK_SUBMODULES) check_submodules_present() endif() configure_file(${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.qrc - ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc - COPYONLY) + ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.qrc + COPYONLY) if (EXISTS ${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.json) configure_file("${PROJECT_SOURCE_DIR}/dist/compatibility_list/compatibility_list.json" - "${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json" - COPYONLY) + "${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json" + COPYONLY) endif() if (ENABLE_COMPATIBILITY_LIST_DOWNLOAD AND NOT EXISTS ${PROJECT_BINARY_DIR}/dist/compatibility_list/compatibility_list.json) message(STATUS "Downloading compatibility list for yuzu...") @@ -431,34 +431,34 @@ if (ENABLE_QT) endif() function(set_yuzu_qt_components) -# Best practice is to ask for all components at once, so they are from the same version -set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent) -if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") -list(APPEND YUZU_QT_COMPONENTS2 DBus) -endif() -if (YUZU_USE_QT_MULTIMEDIA) -list(APPEND YUZU_QT_COMPONENTS2 Multimedia) + # Best practice is to ask for all components at once, so they are from the same version + set(YUZU_QT_COMPONENTS2 Core Widgets Concurrent) + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + list(APPEND YUZU_QT_COMPONENTS2 DBus) + endif() + if (YUZU_USE_QT_MULTIMEDIA) + list(APPEND YUZU_QT_COMPONENTS2 Multimedia) endif() if (YUZU_USE_QT_WEB_ENGINE) - list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets) + list(APPEND YUZU_QT_COMPONENTS2 WebEngineCore WebEngineWidgets) endif() if (ENABLE_QT_TRANSLATION) - list(APPEND YUZU_QT_COMPONENTS2 LinguistTools) + list(APPEND YUZU_QT_COMPONENTS2 LinguistTools) endif() if (USE_DISCORD_PRESENCE) - list(APPEND YUZU_QT_COMPONENTS2 Network) + list(APPEND YUZU_QT_COMPONENTS2 Network) endif() set(YUZU_QT_COMPONENTS ${YUZU_QT_COMPONENTS2} PARENT_SCOPE) - endfunction(set_yuzu_qt_components) +endfunction(set_yuzu_qt_components) - # List of all FFmpeg components required - set(FFmpeg_COMPONENTS +# List of all FFmpeg components required +set(FFmpeg_COMPONENTS avcodec avfilter avutil swscale) - if (UNIX AND NOT APPLE AND NOT ANDROID) +if (UNIX AND NOT APPLE AND NOT ANDROID) find_package(PkgConfig REQUIRED) pkg_check_modules(LIBVA libva) endif() @@ -468,12 +468,12 @@ if (NOT YUZU_USE_BUNDLED_FFMPEG) endif() if(ENABLE_QT) - set_yuzu_qt_components() - find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS}) - set(QT_MAJOR_VERSION 6) - # Qt6 sets cxx_std_17 and we need to undo that - set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "") - endif() + set_yuzu_qt_components() + find_package(Qt6 REQUIRED COMPONENTS ${YUZU_QT_COMPONENTS}) + set(QT_MAJOR_VERSION 6) + # Qt6 sets cxx_std_17 and we need to undo that + set_target_properties(Qt6::Platform PROPERTIES INTERFACE_COMPILE_FEATURES "") +endif() if (WIN32 AND YUZU_CRASH_DUMPS) set(BREAKPAD_VER "breakpad-c89f9dd") @@ -517,7 +517,7 @@ endif() set(CLANG_FORMAT_POSTFIX "-15") find_program(CLANG_FORMAT NAMES clang-format${CLANG_FORMAT_POSTFIX} - clang-format + clang-format PATHS ${PROJECT_BINARY_DIR}/externals) # if find_program doesn't find it, try to download from externals if (NOT CLANG_FORMAT) @@ -642,12 +642,12 @@ endif() # https://www.freedesktop.org/software/appstream/docs/ if(ENABLE_QT AND UNIX AND NOT APPLE) install(FILES "dist/org.yuzu_emu.yuzu.desktop" - DESTINATION "share/applications") + DESTINATION "share/applications") install(FILES "dist/eden.svg" - DESTINATION "share/icons/hicolor/scalable/apps" - RENAME "org.yuzu_emu.eden.svg") + DESTINATION "share/icons/hicolor/scalable/apps" + RENAME "org.yuzu_emu.eden.svg") install(FILES "dist/org.yuzu_emu.yuzu.xml" - DESTINATION "share/mime/packages") + DESTINATION "share/mime/packages") install(FILES "dist/org.yuzu_emu.yuzu.metainfo.xml" - DESTINATION "share/metainfo") + DESTINATION "share/metainfo") endif() diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index 8517855abc..95a9cd84f5 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -168,7 +168,6 @@ android { "-DENABLE_QT=0", // Don't use QT "-DENABLE_SDL2=0", // Don't use SDL "-DENABLE_WEB_SERVICE=0", // Don't use telemetry - "-DBUNDLE_SPEEX=ON", "-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work "-DYUZU_USE_BUNDLED_VCPKG=ON", "-DYUZU_USE_BUNDLED_FFMPEG=ON", diff --git a/src/android/app/src/main/AndroidManifest.xml b/src/android/app/src/main/AndroidManifest.xml index 51a4705f52..6ad1d1c1bf 100644 --- a/src/android/app/src/main/AndroidManifest.xml +++ b/src/android/app/src/main/AndroidManifest.xml @@ -29,7 +29,7 @@ SPDX-License-Identifier: GPL-3.0-or-later android:banner="@drawable/tv_banner" android:fullBackupContent="@xml/data_extraction_rules" android:dataExtractionRules="@xml/data_extraction_rules_api_31" - android:enableOnBackInvokedCallback="false"> + android:enableOnBackInvokedCallback="true"> @@ -44,6 +44,7 @@ SPDX-License-Identifier: GPL-3.0-or-later + diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index fcc0ae8b99..ddf3cb1fe1 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -565,11 +565,11 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { var fpsText = String.format("FPS: %.1f", actualFps) if (enableFrameInterpolation) { - fpsText += ("(Enhanced)") + fpsText += " " + getString(R.string.enhanced_fps_suffix) } if (enableFrameSkipping) { - fpsText += " [Skipping]" + fpsText += " " + getString(R.string.skipping_fps_suffix) } sb.append(fpsText) diff --git a/src/android/app/src/main/res/layout/header_in_game.xml b/src/android/app/src/main/res/layout/header_in_game.xml index 7e75c624c8..32aa84ebfe 100644 --- a/src/android/app/src/main/res/layout/header_in_game.xml +++ b/src/android/app/src/main/res/layout/header_in_game.xml @@ -30,7 +30,7 @@ android:textColor="?attr/colorOnSurfaceVariant" android:textAlignment="viewStart" android:layout_marginEnd="4dp" - android:text="System Info:" /> + android:text="@string/system_info_label" /> لم يتم منح إذن الإشعار + (مُحسَّن) + (تخطي) + النظام: عرض إحصائيات الأداء تخصيص الرؤية @@ -19,9 +22,9 @@ عرض السرعة عرض نسبة سرعة المحاكاة عرض استخدام ذاكرة التطبيق - عرض كمية الذاكرة المستخدمة من قبل المحاكي + عرض كمية ذاكرة الوصول العشوائي التي يستخدمها المحاكي عرض استخدام ذاكرة النظام - عرض كمية الذاكرة المستخدمة من قبل النظام + عرض كمية ذاكرة الوصول العشوائي المستخدمة من قبل النظام عرض درجة حرارة البطارية عرض درجة حرارة البطارية الحالية موضع العرض @@ -49,7 +52,7 @@ EDS3 + VertexInputDynamicState يحسن الأداء على الأجهزة الأحدث. مدعوم فقط على وحدات معالجة الرسومات التي تدعم فولكان 1.3+. مزامنة سرعة النواة - قم بمزامنة سرعة النواة مع النسبة المئوية القصوى للسرعة لتحسين الأداء دون تغيير السرعة الفعلية للعبة. + مزامنة سرعة النواة مع النسبة القصوى للسرعة لتحسين الأداء دون تغيير السرعة الفعلية للعبة. استخدام الستاب التلقائي يقوم تلقائيًا بإضافة خدمات ووظائف ناقصة. قد يحسن التوافق ولكنه قد يتسبب في تعطل المشغل ومشاكل في الاستقرار. إزالة البرنامج الثابت @@ -86,8 +89,9 @@ خلفية Shader اختيار طريقة ترجمة Shaders - GLSL - SPIR-V + عام + Mali + Adreno/Xclipse محاكاة NVDEC @@ -373,7 +377,7 @@ تناسب الابعاد طريقة مكافحة التعرج استخدم تظليل غير متزامن - يجمع التظليل بشكل غير متزامن، مما يقلل من التأتأة ولكنه قد يؤدي إلى حدوث بعض الأخطاء. + تجميع الظلال بشكل غير متزامن. قد يقلل هذا من التقطع ولكنه قد يتسبب أيضًا في حدوث أخطاء. استخدم التنظيف التفاعلي تحسين دقة العرض في بعض الألعاب على حساب الأداء يقلل من التأتأة عن طريق تخزين وتحميل التظليلات التي تم إنشاؤها محليًا. diff --git a/src/android/app/src/main/res/values-ckb/strings.xml b/src/android/app/src/main/res/values-ckb/strings.xml index b82b3f56b1..a96132bfbb 100644 --- a/src/android/app/src/main/res/values-ckb/strings.xml +++ b/src/android/app/src/main/res/values-ckb/strings.xml @@ -7,6 +7,9 @@ مۆڵەتی ئاگادارکردنەوە نەدراوە! + (پێشکەوتوو) + (بازدان) + سیستەم: پیشاندانی ستاتیستی کارایی خۆڕێکخستن دیاربوون @@ -20,9 +23,9 @@ نیشاندانی خێرایی نیشاندانی خێرایی ئیمولەیشن بە ڕێژە نیشاندانی بەکارهێنانی RAMی ئەپ - نیشاندانی بەکارهێنانی RAM لەلایەن ئیمولەیتەر + نیشاندانی بڕی RAM کە ئێمولاتۆر بەکاردەهێنێت نیشاندانی بەکارهێنانی RAMی سیستەم - نیشاندانی بەکارهێنانی RAM لەلایەن سیستەم + نیشاندانی بڕی RAM کە سیستم بەکاردەهێنێت نیشاندانی پلەی گەرمی بەتری نیشاندانی پلەی گەرمی بەتری بە سەدی و فارینهایت شوێنی ئاوێرە @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState يحسن الأداء على الأجهزة الأحدث. مدعوم فقط على وحدات معالجة الرسومات التي تدعم فولكان 1.3+. مزامنة سرعة النواة - قم بمزامنة سرعة النواة مع النسبة المئوية القصوى للسرعة لتحسين الأداء دون تغيير السرعة الفعلية للعبة. + خێرایی تیکەکانی ناوک ڕێکبخە لەگەڵ ڕێژەی خێرایی بەرزترین بۆ باشترکردنی کارایی بەبێ گۆڕینی خێرایی ڕاستەقینەی یارییەکە. استخدام الستاب التلقائي يقوم تلقائيًا بإضافة خدمات ووظائف ناقصة. قد يحسن التوافق ولكنه قد يتسبب في تعطل المشغل ومشاكل في الاستقرار. إزالة البرنامج الثابت @@ -87,8 +90,9 @@ شادەر باکند هەڵبژاردنی ڕێگای پێکهێنانی شادەر - GLSL - SPIR-V + گشتی + Mali + Adreno/Xclipse ئیمولەیشنی NVDEC @@ -328,7 +332,7 @@ ناچاریکردن بۆ زۆرترین کاتژمێر (تەنها ئەدرینۆ) GPU ناچار دەکات بە زۆرترین کاتژمێر کاربکات (هێشتا سنووردارکردنی گەرمی جێبەجێ دەکرێت). بەکارهێنانی سێبەری ناهاوسەنگ - سێبەرەکان بە شێوەیەکی ناهاوسەنگ کۆدەکاتەوە، پچڕپچڕی کەمدەکاتەوە بەڵام لەوانەیە گلێچ دروستکا. + کۆمپایلکردنی شادەرەکان بەشێوەی ناڕێک. ئەمە ڕەنگە کەمکردنەوەی ستەتەر بکات بەڵام لەوانەیە هەڵەش دروست بکات. بەکارهێنانی بەرپێچدەرەوە وردی ڕێندەرکردن لە هەندێک یاریدا باشتر دەکات لەسەر تێچووی کارایی. بیرگەخێرای سێبەری دیسک diff --git a/src/android/app/src/main/res/values-cs/strings.xml b/src/android/app/src/main/res/values-cs/strings.xml index 9cdbf53d32..76ef57a906 100644 --- a/src/android/app/src/main/res/values-cs/strings.xml +++ b/src/android/app/src/main/res/values-cs/strings.xml @@ -6,6 +6,9 @@ Oznámení nejsou oprávněna! + (Vylepšený) + (Přeskakování) + Systém: Zobrazit překryv statistik výkonu Přizpůsobení Viditelnost @@ -19,9 +22,9 @@ Zobrazit rychlost Aktuální rychlost emulace v procentech Zobrazit využití RAM aplikace - Množství RAM používané emulátorem + Zobrazit množství RAM, které emulátor používá Zobrazit využití systémové RAM - Množství RAM používané systémem + Zobrazit množství RAM využívané systémem Zobrazit teplotu baterie Aktuální teplota baterie ve °C a °F Pozice překryvu @@ -49,7 +52,7 @@ EDS3 + VertexInputDynamicState Zlepšuje výkon na novějších zařízeních. Podporováno pouze na GPU s Vulkan 1.3+. Synchronizovat rychlost jádra - Synchronizuje rychlost jádra s maximální procentuální rychlostí pro lepší výkon bez změny skutečné rychlosti hry. + Synchronizuje rychlost jádra s maximálním procentem rychlosti, aby se zlepšil výkon bez změny skutečné rychlosti hry. Použít automatický stub Automaticky doplňuje chybějící služby a funkce. Může zlepšit kompatibilitu, ale také způsobit pády a problémy se stabilitou. Odinstalovat firmware @@ -86,8 +89,9 @@ Backend shaderů Způsob kompilace shaderů - GLSL - SPIR-V + Univerzální + Mali + Adreno/Xclipse Emulace NVDEC @@ -292,16 +296,43 @@ Omezit rychlost - CPU přesnost + Omezení emulační rychlosti + Procento omezení + Procento normální rychlosti + CPU backend + Přesnost CPU + %1$s%2$s + Název zařízení + Docked režim + Větší rozlišení, menší výkon Emulovaná oblast Emulovaný jazyk + Vybrat datum RTC + Vybrat čas RTC Vlastní RTC + Vlastní nastavení času + Nastavit vlastní RTC Úroveň přesnosti + Rozlišení (Handheld/Docked) VSync režim Orientace Poměr stran + Filtr přizpůsobení + Ostrost FSR + Nastavení ostrosti pro FSR + Anti-aliasing + Maximální takt (Adreno) + Maximální výkon GPU + Asynchronní shadery + Kompiluje stínovače asynchronně. Může to snížit trhání, ale také způsobit grafické chyby. + Reaktivní flushing + Zlepšení přesnosti vykreslování + Shader cache na disku + Snížení trhání ukládáním shaderů + Anizotropní filtrování + Zlepšení kvality textur CPU diff --git a/src/android/app/src/main/res/values-de/strings.xml b/src/android/app/src/main/res/values-de/strings.xml index 872df8ad80..805db9adcc 100644 --- a/src/android/app/src/main/res/values-de/strings.xml +++ b/src/android/app/src/main/res/values-de/strings.xml @@ -7,6 +7,9 @@ Berechtigung für Benachrichtigungen nicht erlaubt! + (Enhanced) + (Skipping) + System: Leistungsstatistik Overlay anzeigen Anpassung Sichtbarkeit @@ -20,9 +23,9 @@ Geschwindigkeit anzeigen Emulationsgeschwindigkeit in Prozent App-RAM-Nutzung anzeigen - RAM-Nutzung durch den Emulator + Zeigt den RAM-Verbrauch des Emulators an System-RAM-Nutzung anzeigen - RAM-Nutzung durch das System + Zeigt den vom System genutzten RAM an Batterietemperatur anzeigen Aktuelle Batterietemperatur in °C/°F Overlay-Position @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState Verbessert die Leistung auf neueren Geräten. Wird nur von GPUs mit Vulkan 1.3+ unterstützt. Kern-Geschwindigkeit synchronisieren - Synchronisiert die Kern-Taktgeschwindigkeit mit der maximalen Geschwindigkeit, um die Leistung zu verbessern, ohne die tatsächliche Spielgeschwindigkeit zu ändern. + Synchronisiert die Taktrate des Kerns mit der maximalen Geschwindigkeit, um die Leistung zu verbessern, ohne die tatsächliche Spielgeschwindigkeit zu verändern. Auto-Stub verwenden Ergänzt automatisch fehlende Dienste und Funktionen. Kann die Kompatibilität verbessern, aber auch zu Abstürzen und Stabilitätsproblemen führen. Firmware deinstallieren @@ -87,8 +90,9 @@ Shader-Backend Methode zur Shader-Kompilierung - GLSL - SPIR-V + Universal + Mali + Adreno/Xclipse NVDEC-Emulation @@ -343,15 +347,24 @@ Wird der Handheld-Modus verwendet, verringert es die Auflösung und erhöht die Benutzerdefinierte Echtzeituhr Genauigkeitsstufe - Auflösung (Mobil/Gedockt) + Auflösung (Handheld/Gedockt) VSync-Modus - Orientierung + Ausrichtung Seitenverhältnis - Fensteranpassungsfilter + Skalierungsfilter + FSR-Schärfe + Bestimmt die Schärfe bei FSR-Nutzung. Kantenglättung Maximale Taktfrequenz erzwingen (nur Adreno) - Erzwingt den Betrieb der GPU mit der maximal möglichen Taktfrequenz (Temperaturbeschränkungen werden weiterhin angewendet). - Asynchrone Shader nutzen + Erzwingt maximale GPU-Taktfrequenz. + Asynchrone Shader + Kompiliert Shader asynchron. Dies kann Ruckler reduzieren, aber auch Grafikfehler verursachen. + Reaktives Flushing + Verbessert die Genauigkeit in einigen Spielen. + Shader-Cache auf Festplatte + Reduziert Ruckler durch Shader-Caching. + Anisotrope Filterung + Verbessert die Texturenqualität. CPU CPU Debugging diff --git a/src/android/app/src/main/res/values-es/strings.xml b/src/android/app/src/main/res/values-es/strings.xml index 2305234df3..5137b04d18 100644 --- a/src/android/app/src/main/res/values-es/strings.xml +++ b/src/android/app/src/main/res/values-es/strings.xml @@ -7,6 +7,9 @@ ¡Permisos de notificación no concedidos! + (Mejorado) + (Saltando) + Sistema: Mostrar superposición de estadísticas de rendimiento Personalización Visibilidad @@ -20,9 +23,9 @@ Mostrar velocidad Mostrar porcentaje de velocidad de emulación Mostrar uso de RAM de la app - Mostrar RAM utilizada por el emulador + Mostrar la cantidad de RAM que utiliza el emulador Mostrar uso de RAM del sistema - Mostrar RAM utilizada por el sistema + Mostrar la cantidad de RAM utilizada por el sistema Mostrar temperatura de batería Mostrar temperatura en Celsius y Fahrenheit Posición de la superposición @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState Mejora el rendimiento en dispositivos nuevos. Solo compatible con GPUs Vulkan 1.3+. Sincronizar velocidad del núcleo - Sincroniza la velocidad del núcleo con el porcentaje máximo para mejorar el rendimiento sin alterar la velocidad real del juego. + Sincroniza la velocidad del núcleo con el porcentaje máximo de velocidad para mejorar el rendimiento sin alterar la velocidad real del juego. Usar Auto Stub Rellena automáticamente servicios y funciones faltantes. Puede mejorar compatibilidad pero causar cierres inesperados. Desinstalar firmware @@ -87,8 +90,9 @@ Backend de shaders Elegir cómo se compilan shaders - GLSL - SPIR-V + Universal + Mali + Adreno/Xclipse Emulación NVDEC @@ -408,7 +412,7 @@ Forzar velocidad al máximo (solo Adreno) Fuerza a la GPU a ejecutarse a la velocidad máxima de reloj posible (se seguirán aplicando restricciones térmicas). Usar shaders asíncronos - Compila shaders de manera asíncrona, reduce los parones pero puede introducir fallos. + Compila los shaders de forma asíncrona. Esto puede reducir los tirones, pero también puede introducir errores gráficos. Usar limpieza reactiva Mejora la precisión de renderizado en algunos juegos, pero reduce el rendimiento. Caché de shaders en disco diff --git a/src/android/app/src/main/res/values-fa/strings.xml b/src/android/app/src/main/res/values-fa/strings.xml index 6cf7b35bf5..9513e16bc0 100644 --- a/src/android/app/src/main/res/values-fa/strings.xml +++ b/src/android/app/src/main/res/values-fa/strings.xml @@ -7,6 +7,9 @@ مجوز اعلان داده نشده! + (بهبودیافته) + (رد کردن) + سیستم: نمایش آمار عملکرد سفارشی‌سازی نمایش @@ -20,9 +23,9 @@ نمایش سرعت نمایش درصد سرعت شبیه‌سازی نمایش مصرف رم برنامه - نمایش میزان رم استفاده‌شده توسط شبیه‌ساز + نمایش میزان رم مورد استفاده شبیه‌ساز نمایش مصرف رم سیستم - نمایش میزان رم استفاده‌شده توسط سیستم + نمایش میزان رم استفاده شده توسط سیستم نمایش دمای باتری نمایش دمای باتری به سانتی‌گراد و فارنهایت موقعیت اورلی @@ -50,7 +53,7 @@ EDS3 + حالت پویای ورودی رأس عملکرد را در دستگاه‌های جدیدتر بهبود می‌بخشد. فقط در کارت‌های گرافیک با پشتیبانی از ولکان 1.3+ قابل استفاده است همگام‌سازی سرعت هسته - سرعت تیک هسته را با حداکثر درصد سرعت همگام می‌کند تا عملکرد بهبود یابد بدون آنکه سرعت واقعی بازی تغییر کند + همگام‌سازی سرعت هسته با حداکثر درصد سرعت برای بهبود عملکرد بدون تغییر سرعت واقعی بازی. استفاده از استاب خودکار به طور خودکار سرویس‌ها و توابع از دست رفته را استاب می‌کند. این ممکن است سازگاری را بهبود بخشد اما می‌تواند باعث کرش و مشکلات پایداری شود حذف فرمور @@ -87,8 +90,9 @@ بک‌اند شیدر انتخاب روش کامپایل و ترجمه شیدرها - GLSL - SPIR-V + همه‌کاره + Mali + Adreno/Xclipse شبیه‌سازی NVDEC @@ -408,7 +412,7 @@ اجبار به حداکثر فرکانس (فقط برای Adreno) پردازنده گرافیکی را مجبور می‌کند تا با بیشترین فرکانس کار کند (محدودیت‌های حرارتی همچنان اعمال خواهند شد). استفاده از سایه‌زن‌های ناهمزمان - سایه‌زن‌ها را به صورت ناهمزمان کامپایل می کند، لکنت را کاهش می‌دهد اما ممکن است اشکالاتی ایجاد کند. + کامپایل شیدرها به صورت ناهمزمان. این ممکن است باعث کاهش مکث شود اما ممکن است مشکلات گرافیکی نیز ایجاد کند. استفاده از فلاش کردن واکنشی دقت تفسیر تصاویر را در برخی از بازی‌ها به قیمت عملکرد بهبود می‌بخشد. ذخیره سایه‌زنی‌ها در حافظه diff --git a/src/android/app/src/main/res/values-fr/strings.xml b/src/android/app/src/main/res/values-fr/strings.xml index f13945e77a..7eeaebc7b7 100644 --- a/src/android/app/src/main/res/values-fr/strings.xml +++ b/src/android/app/src/main/res/values-fr/strings.xml @@ -7,6 +7,9 @@ Permission de notification non accordée ! + (Amélioré) + (Saut) + Système: Afficher les stats de performance Personnalisation Visibilité @@ -20,9 +23,9 @@ Afficher vitesse Afficher la vitesse d`émulation RAM app - Afficher la RAM utilisée par l`émulateur + Afficher la quantité de RAM utilisée par l\'émulateur RAM système - Afficher la RAM système utilisée + Afficher la quantité de RAM utilisée par le système Temp. batterie Afficher la température de la batterie Position overlay @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState Améliore les performances sur les appareils récents. Pris en charge uniquement par les GPU Vulkan 1.3+. Synchroniser la vitesse du cœur - Synchronise la vitesse de base avec le pourcentage de vitesse maximal pour améliorer les performances sans altérer la vitesse réelle du jeu. + Synchronise la vitesse du cœur avec le pourcentage de vitesse maximal pour améliorer les performances sans modifier la vitesse réelle du jeu. Utiliser le stub automatique Comble automatiquement les services et fonctions manquants. Peut améliorer la compatibilité mais peut provoquer des plantages et des problèmes de stabilité. Désinstaller le firmware @@ -87,8 +90,9 @@ Backend shader Méthode de compilation - GLSL - SPIR-V + Universel + Mali + Adreno/Xclipse Émulation NVDEC @@ -410,7 +414,7 @@ Forcer les fréquences maximales (Adreno uniquement) Forcer le GPU à fonctionner à ses fréquences maximales possibles (les contraintes thermiques seront toujours appliquées). Utiliser les shaders asynchrones - Compile les shaders de manière asynchrone, réduisant les saccades mais pouvant entraîner des problèmes visuels. + Compile les shaders de manière asynchrone. Cela peut réduire les saccades mais peut aussi provoquer des problèmes graphiques. Utiliser le vidage réactif Améliore la précision du rendu dans certains jeux au détriment des performances. Utiliser les shader cache diff --git a/src/android/app/src/main/res/values-he/strings.xml b/src/android/app/src/main/res/values-he/strings.xml index 3b6a09266d..7437db4f9f 100644 --- a/src/android/app/src/main/res/values-he/strings.xml +++ b/src/android/app/src/main/res/values-he/strings.xml @@ -7,6 +7,9 @@ הרשאות התראות לא ניתנה! + (משופר) + (דילוג) + מערכת: הצג סטטיסטיקות ביצועים התאמה אישית נראות @@ -20,9 +23,9 @@ הצג מהירות מציג את אחוז מהירות האמולציה הצג שימוש זיכרון - מציג את כמות הזיכרון בשימוש על ידי האמולטור + הצג את כמות ה-RAM שהאמולטור משתמש בה הצג שימוש זיכרון מערכת - מציג את כמות הזיכרון בשימוש על ידי המערכת + הצג את כמות ה-RAM שבה המערכת משתמשת הצג טמפרטורת סוללה מציג טמפרטורת סוללה במעלות צלזיוס ופרנהייט מיקום שכבה @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState משפר ביצועים במכשירים חדשים יותר. נתמך רק בכרטיסי מסך עם Vulkan 1.3+. סנכרון מהירות ליבה - מסנכרן את מהירות הליבה לאחוז המהירות המקסימלי כדי לשפר ביצועים ללא שינוי במהירות המשחק בפועל. + סנכרן את מהירות הליבה לאחוז המהירות המרבי כדי לשפר ביצועים מבלי לשנות את מהירות המשחק בפועל. שימוש ב-Auto Stub משלים אוטומטית שירותים ופונקציות חסרים. עשוי לשפר תאימות אך עלול לגרום לקריסות ובעיות יציבות. הסרת קושחה @@ -87,8 +90,9 @@ מנוע שיידרים בחר כיצד לקמפל שיידרים - GLSL - SPIR-V + אוניברסלי + Mali + Adreno/Xclipse אמולציית NVDEC @@ -391,7 +395,7 @@ החזק מהירות שעון מקסימלית (רק ל Adreno) מכריח לדחוף את מהירויות המעבד הגרפי למקסימום (הגבלות חום ימשיכו לתפקד). השתמש בשיידרים אסינכרונים - מקמפל שיידרים בצורה אסנכרונית, מפחית תקיעות אך עלול לגרום לבעיות גרפיות. + מקמפל שיידרים באופן אסינכרוני. זה עשוי להפחית קפיצות אך גם עלול לגרום לתקלות גרפיות. השתמש בהבהוב תגובתי משפר את הדיוק של האמולציה במשחקים מסויימים במחיר של ביצועים. מטמון השיידר של הדיסק diff --git a/src/android/app/src/main/res/values-hu/strings.xml b/src/android/app/src/main/res/values-hu/strings.xml index bab82f1fa5..9fb6f6321d 100644 --- a/src/android/app/src/main/res/values-hu/strings.xml +++ b/src/android/app/src/main/res/values-hu/strings.xml @@ -7,6 +7,9 @@ Nincs engedély az értesítés megjelenítéséhez! + (Továbbfejlesztett) + (Kihagyás) + Rendszer: Teljesítmény statisztikák megjelenítése Testreszabás Láthatóság @@ -20,9 +23,9 @@ Sebesség mutatása Emulációs sebesség százalékban Alkalmazás RAM-használat - Az emulátor által használt RAM + Az emulátor által használt RAM mennyiségének megjelenítése Rendszer RAM-használat - A rendszer által használt RAM + A rendszer által használt RAM mennyiségének megjelenítése Akkumulátor hőmérséklet Aktuális hőmérséklet Celsiusban és Fahrenheitben Overlay pozíció @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState Javítja a teljesítményt újabb eszközökön. Csak Vulkan 1.3+ GPU-kon támogatott. Magsebesség szinkronizálása - Szinkronizálja a magsebességet a maximális sebesség százalékához a teljesítmény javításához anélkül, hogy megváltoztatná a játék tényleges sebességét. + A mag sebességének szinkronizálása a maximális sebesség százalékával a teljesítmény javítása érdekében a játék tényleges sebességének megváltoztatása nélkül. Automatikus Stub használata Automatusan kiegészíti a hiányzó szolgáltatásokat és funkciókat. Növelheti a kompatibilitást, de összeomlásokat és stabilitási problémákat okozhat. Firmware eltávolítása @@ -87,8 +90,9 @@ Shader backend Shaderek fordításának módja - GLSL - SPIR-V + Univerzális + Mali + Adreno/Xclipse NVDEC emuláció @@ -404,7 +408,7 @@ Maximum órajel kényszerítése (csak Adreno) Kényszeríti a GPU-t a lehető legnagyobb órajelen működésre (a hőmérséklet korlátozások továbbra is érvényben maradnak). Aszinkron árnyékolók használata - Aszinkron módon fordítja az árnyékolókat, ami csökkenti az akadozást, de hibákat okozhat. + A shaderek aszinkron fordítása. Csökkentheti a belassulásokat, de hibákat is okozhat. Reaktív ürítés használata Javítja a renderelési pontosságot néhány játékban a teljesítmény rovására. Lemez árnyékoló gyorsítótár diff --git a/src/android/app/src/main/res/values-id/strings.xml b/src/android/app/src/main/res/values-id/strings.xml index b2442010c8..4c8a969e5d 100644 --- a/src/android/app/src/main/res/values-id/strings.xml +++ b/src/android/app/src/main/res/values-id/strings.xml @@ -7,6 +7,9 @@ Izin notifikasi tidak diberikan! + (Ditingkatkan) + (Melewatkan) + Sistem: Tampilkan Overlay Statistik Performa Kustomisasi Visibilitas @@ -20,7 +23,7 @@ Tampilkan Kecepatan Tampilkan persentase kecepatan emulasi saat ini Tampilkan Penggunaan RAM Aplikasi - Tampilkan jumlah RAM yang digunakan oleh emulator + Tampilkan jumlah RAM yang digunakan emulator Tampilkan Penggunaan RAM Sistem Tampilkan jumlah RAM yang digunakan oleh sistem Tampilkan Suhu Baterai @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState Meningkatkan performa di perangkat baru. Hanya didukung di GPU Vulkan 1.3+. Sinkronisasi Kecepatan Inti - Sinkronkan kecepatan inti ke persentase kecepatan maksimum untuk meningkatkan performa tanpa mengubah kecepatan aktual game. + Sinkronkan kecepatan inti dengan persentase kecepatan maksimum untuk meningkatkan performa tanpa mengubah kecepatan sebenarnya dari permainan. Gunakan Auto Stub Otomatis menyediakan layanan dan fungsi yang hilang. Dapat meningkatkan kompatibilitas tetapi mungkin menyebabkan crash dan masalah stabilitas. Copot Firmware @@ -87,8 +90,9 @@ Backend Shader Pilih cara shader dikompilasi dan diterjemahkan untuk GPU Anda. - GLSL - SPIR-V + Universal + Mali + Adreno/Xclipse Emulasi NVDEC @@ -404,7 +408,7 @@ Paksa jam maximum (hanya untuk Adreno) Memaksa GPU untuk berjalan pada kecepatan maksimum yang mungkin (batasan termal masih akan diterapkan). Gunakan shader asinkron - Mengompilasi shader secara asinkron mengurangi Tutup Paksa tetapi dapat menimbulkan gangguan. + Kompilasi shader secara asinkron. Ini dapat mengurangi lag tetapi juga dapat menyebabkan glitch. Gunakan reactive flushing Meningkatkan akurasi rendering dalam beberapa permainan dengan mengorbankan performa. Cache shader disk diff --git a/src/android/app/src/main/res/values-it/strings.xml b/src/android/app/src/main/res/values-it/strings.xml index bcd6c3ae4f..69a55c7a06 100644 --- a/src/android/app/src/main/res/values-it/strings.xml +++ b/src/android/app/src/main/res/values-it/strings.xml @@ -7,6 +7,9 @@ Autorizzazione di notifica non concessa! + (Migliorato) + (Salto) + Sistema: Mostra overlay prestazioni Personalizzazione Visibilità @@ -20,9 +23,9 @@ Mostra velocità Mostra percentuale velocità emulazione Mostra RAM app - Mostra RAM usata dall`emulatore + Mostra la quantità di RAM utilizzata dall\'emulatore Mostra RAM sistema - Mostra RAM usata dal sistema + Mostra la quantità di RAM utilizzata dal sistema Mostra temperatura batteria Mostra temperatura batteria in °C e °F Posizione overlay @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState Migliora le prestazioni sui dispositivi più recenti. Supportato solo su GPU Vulkan 1.3+. Sincronizza velocità core - Sincronizza la velocità del core alla percentuale massima per migliorare le prestazioni senza alterare la velocità effettiva del gioco. + Sincronizza la velocità del core con la percentuale massima di velocità per migliorare le prestazioni senza alterare la velocità effettiva del gioco. Usa Auto Stub Aggiunge automaticamente servizi e funzioni mancanti. Può migliorare la compatibilità ma causare crash e problemi di stabilità. Disinstalla firmware @@ -87,8 +90,9 @@ Backend shader Scegli come compilare gli shader - GLSL - SPIR-V + Universale + Mali + Adreno/Xclipse Emulazione NVDEC @@ -394,7 +398,7 @@ Forza clock massimi (solo Adreno) Forza la GPU a girare col massimo clock possibile (i vincoli alla temperatura saranno comunque applicati) Usa shaders asincrone - Compila le shader in modo asincrone, riducendo lo stutter. Può causare glitch grafici. + Compila gli shader in modo asincrono. Può ridurre gli scatti, ma può anche causare glitch grafici. Abilita il Reactive Flushing Migliora l\'accuratezza della grafica in alcuni giochi, al costo delle performance. Usa la cache delle shader diff --git a/src/android/app/src/main/res/values-ja/strings.xml b/src/android/app/src/main/res/values-ja/strings.xml index 3ab0e79c10..8314382285 100644 --- a/src/android/app/src/main/res/values-ja/strings.xml +++ b/src/android/app/src/main/res/values-ja/strings.xml @@ -7,6 +7,9 @@ 通知が許可されていません! + (強化) + (スキップ) + システム: パフォーマンス統計オーバーレイを表示 カスタマイズ 表示項目 @@ -20,9 +23,9 @@ 速度表示 現在のエミュレーション速度を表示 アプリRAM使用量 - エミュレータのRAM使用量を表示 + エミュレーターが使用しているRAMの量を表示 システムRAM使用量 - システムのRAM使用量を表示 + システムが使用しているRAMの量を表示 バッテリー温度 バッテリー温度を表示(℃/℉) オーバーレイ位置 @@ -50,7 +53,7 @@ EDS3 + 頂点入力動的状態 新しいデバイスでパフォーマンスを向上させます。Vulkan 1.3+ GPUでのみサポートされています。 コア速度の同期 - コアの動作速度を最大速度パーセンテージに同期させ、ゲームの実際の速度を変更することなくパフォーマンスを向上させます。 + コアの速度を最大速度パーセンテージに同期させ、ゲームの実際の速度を変えずにパフォーマンスを向上させます。 自動スタブを使用 不足しているサービスや機能を自動的にスタブします。互換性が向上する可能性がありますが、クラッシュや安定性の問題を引き起こす可能性があります。 ファームウェアをアンインストール @@ -87,8 +90,9 @@ シェーダーバックエンド シェーダーのコンパイル方法 - GLSL - SPIR-V + ユニバーサル + Mali + Adreno/Xclipse NVDECエミュレーション @@ -356,7 +360,7 @@ 最大クロックを強制 (Adrenoのみ) GPUを最大限可能な周波数で動作させます (過熱制限は引き続き適用されます)。 非同期シェーダー - シェーダーを非同期でコンパイルします。コマ落ちが軽減されますが、不具合が発生する可能性があります。 + シェーダーを非同期でコンパイルします。これによりカクつきが減る可能性がありますが、グラフィックの不具合が発生する場合もあります。 即時書き込み 一部のゲームにおいて、パフォーマンスを犠牲にしながらも、レンダリング精度を向上させます。 ディスクシェーダーキャッシュ diff --git a/src/android/app/src/main/res/values-ko/strings.xml b/src/android/app/src/main/res/values-ko/strings.xml index 54df91f2a7..ede1e59d92 100644 --- a/src/android/app/src/main/res/values-ko/strings.xml +++ b/src/android/app/src/main/res/values-ko/strings.xml @@ -7,6 +7,9 @@ 알림 권한이 부여되지 않았습니다! + (향상됨) + (건너뜀) + 시스템: 성능 통계 오버레이 표시 사용자 지정 표시 항목 @@ -50,7 +53,7 @@ EDS3 + 정점 입력 동적 상태 최신 기기에서 성능을 향상시킵니다. Vulkan 1.3+ GPU에서만 지원됩니다. 코어 속도 동기화 - 코어 틱 속도를 최대 속도 백분율로 동기화하여 게임의 실제 속도를 변경하지 않고 성능을 개선합니다. + 코어 틱 속도를 최대 속도 백분율과 동기화하여 게임의 실제 속도를 변경하지 않고 성능을 향상시킵니다. 자동 스텁 사용 누락된 서비스와 기능을 자동으로 스텁합니다. 호환성을 개선할 수 있지만 충돌과 안정성 문제를 일으킬 수 있습니다. 펌웨어 제거 @@ -87,9 +90,9 @@ 셰이더 백엔드 셰이더 컴파일 방식 선택 - GLSL - SPIR-V - + 범용 + Mali + Adreno/Xclipse NVDEC 에뮬레이션 비디오 디코딩 처리 방식 선택 @@ -402,7 +405,7 @@ 최대 클럭 강제 설정 (아드레노 전용) GPU가 가능한 최대 클럭으로 실행되도록 강제합니다 (열 제약 조건은 여전히 적용됩니다). 비동기 셰이더 사용 - 셰이더를 비동기식으로 컴파일하여 끊김 현상을 줄이지만 글리치가 발생할 수 있습니다. + 셰이더를 비동기적으로 컴파일합니다. 이로 인해 끊김 현상이 줄어들 수 있지만 그래픽 오류가 발생할 수도 있습니다. 반응형 플러싱 사용 일부 게임에서 성능 저하를 감수하고 렌더링 정확도를 향상합니다. 디스크 셰이더 캐시 diff --git a/src/android/app/src/main/res/values-nb/strings.xml b/src/android/app/src/main/res/values-nb/strings.xml index 1852e4c55c..22792fb302 100644 --- a/src/android/app/src/main/res/values-nb/strings.xml +++ b/src/android/app/src/main/res/values-nb/strings.xml @@ -7,6 +7,9 @@ Varslingstillatelse ikke gitt! + (Forbedret) + (Hopp) + System: Vis ytelsesstatistikkoverlay Tilpasning Synlighet @@ -20,9 +23,9 @@ Vis hastighet Vis emuleringshastighet i prosent Vis appminnebruk - Vis RAM-bruk av emulatoren + Vis hvor mye RAM emulatoren bruker Vis systemminnebruk - Vis systemets RAM-bruk + Vis hvor mye RAM systemet bruker Vis batteritemperatur Vis batteritemperatur i Celsius og Fahrenheit Overlayposisjon @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState Forbedrer ytelsen på nyere enheter. Støttes kun på Vulkan 1.3+ GPU-er. Synkroniser kjernespeed - Synkroniser kjernetaktfrekvensen til maksimal hastighetsprosent for å forbedre ytelsen uten å endre spillets faktiske hastighet. + Synkroniser kjernens hastighet med maksimal hastighetsprosent for å forbedre ytelsen uten å endre spillets faktiske hastighet. Bruk Auto Stub Automatisk stubber manglende tjenester og funksjoner. Kan forbedre kompatibilitet, men kan forårsake krasj og stabilitetsproblemer. Avinstaller firmware @@ -87,8 +90,9 @@ Shader-backend Velg hvordan shadere kompileres - GLSL - SPIR-V + Universell + Mali + Adreno/Xclipse NVDEC-emulering @@ -328,7 +332,7 @@ Tving fram maksimal klokkefrekvens (kun Adreno) Tvinger GPU-en til å kjøre med maksimal klokkefrekvens (termiske begrensninger vil fortsatt gjelde). Bruk asynkrone shaders - Kompilerer shaders asynkront, noe som reduserer hakking, men kan føre til feil. + Kompilerer shadere asynkront. Dette kan redusere rykk, men kan også forårsake grafiske feil. Bruk reaktiv spyling Forbedrer gjengivelsesnøyaktigheten i enkelte spill på bekostning av ytelsen. Disk shader-hurtigbuffer diff --git a/src/android/app/src/main/res/values-pl/strings.xml b/src/android/app/src/main/res/values-pl/strings.xml index 679ca30114..55702b21ce 100644 --- a/src/android/app/src/main/res/values-pl/strings.xml +++ b/src/android/app/src/main/res/values-pl/strings.xml @@ -7,6 +7,9 @@ Nie zezwolono na powiadomienia! + (Ulepszony) + (Pomijanie) + System: Pokaż nakładkę statystyk wydajności Dostosowanie Widoczność @@ -20,9 +23,9 @@ Pokaż prędkość Wyświetla procentową prędkość emulacji Pokaż użycie RAM aplikacji - Wyświetla ilość RAM używanego przez emulator + Wyświetl ilość pamięci RAM używanej przez emulator Pokaż użycie RAM systemu - Wyświetla ilość RAM używanego przez system + Wyświetl ilość pamięci RAM używanej przez system Pokaż temperaturę baterii Wyświetla temperaturę baterii w °C i °F Pozycja nakładki @@ -87,8 +90,9 @@ Backend shaderów Wybierz metodę kompilacji shaderów. - GLSL - SPIR-V + Uniwersalny + Mali + Adreno/Xclipse Emulacja NVDEC @@ -328,7 +332,7 @@ Maksymalne taktowanie GPU (układy Adreno) Wymusza uruchomienie maksymalnego taktowania układu graficznego (zabezpieczenia termiczne będą dalej aktywne). Wyłącz synchronizację shaderów - Kompiluj oświetlenie bez synchronizacji, poprawi wydajność ale może powodować błędy. + Kompiluje shadery asynchronicznie. Może to zmniejszyć zacinanie, ale może też powodować błędy graficzne. Użyj spłukiwania reaktywnego - reactive flushing Poprawia jakość renderowania w kilku grach, kosztem wydajności. Pamięć podręczna shaderów diff --git a/src/android/app/src/main/res/values-pt-rBR/strings.xml b/src/android/app/src/main/res/values-pt-rBR/strings.xml index bf24f1b367..8ea90ceb61 100644 --- a/src/android/app/src/main/res/values-pt-rBR/strings.xml +++ b/src/android/app/src/main/res/values-pt-rBR/strings.xml @@ -7,6 +7,9 @@ Acesso às notificações não concedido! + (Aprimorado) + (Pular) + Sistema: Mostrar sobreposição de estatísticas de desempenho Personalização Visibilidade @@ -20,9 +23,9 @@ Mostrar velocidade Exibir porcentagem de velocidade de emulação Mostrar uso de RAM do app - Exibir quantidade de RAM usada pelo emulador + Mostrar a quantidade de RAM que o emulador está usando Mostrar uso de RAM do sistema - Exibir quantidade de RAM usada pelo sistema + Mostrar a quantidade de RAM usada pelo sistema Mostrar temperatura da bateria Exibir temperatura da bateria em Celsius e Fahrenheit Posição da sobreposição @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState Melhora desempenho em dispositivos mais novos. Suportado apenas em GPUs Vulkan 1.3+. Sincronizar velocidade do núcleo - Sincroniza a velocidade do núcleo com a porcentagem máxima para melhorar desempenho sem alterar a velocidade real do jogo. + Sincroniza a velocidade do núcleo com a porcentagem máxima de velocidade para melhorar o desempenho sem alterar a velocidade real do jogo. Usar Auto Stub Preenche automaticamente serviços e funções ausentes. Pode melhorar compatibilidade mas causar crashes e problemas de estabilidade. Desinstalar firmware @@ -87,8 +90,9 @@ Backend de shader Define como shaders são compilados - GLSL - SPIR-V + Universal + Mali + Adreno/Xclipse Emulação NVDEC @@ -410,7 +414,7 @@ Forçar velocidade máxima (somente Adreno) Força a GPU a rodar na velocidade máxima (restrições térmicas serão aplicadas) Usar shaders assíncronos - Compila os shaders de forma assíncrona, reduzindo engasgos, mas pode apresentar problemas. + Compila shaders de forma assíncrona. Isso pode reduzir engasgos, mas também pode introduzir falhas gráficas. Usar flushing reativo Melhora a precisão da renderização em alguns jogos ao custo de desempenho. Cache de shaders em disco diff --git a/src/android/app/src/main/res/values-pt-rPT/strings.xml b/src/android/app/src/main/res/values-pt-rPT/strings.xml index 3f3f840e0f..2006f4201a 100644 --- a/src/android/app/src/main/res/values-pt-rPT/strings.xml +++ b/src/android/app/src/main/res/values-pt-rPT/strings.xml @@ -7,6 +7,9 @@ Permissões de notificação não permitidas + (Melhorado) + (Saltar) + Sistema: Mostrar Overlay de Desempenho Personalização Visibilidade @@ -20,9 +23,9 @@ Mostrar Velocidade Exibir percentual de velocidade Mostrar RAM do App - Exibir uso de RAM pelo emulador + Mostrar a quantidade de RAM que o emulador está a utilizar Mostrar RAM do Sistema - Exibir uso de RAM pelo sistema + Mostrar a quantidade de RAM utilizada pelo sistema Mostrar Temp. Bateria Exibir temperatura em Celsius/Fahrenheit Posição do Overlay @@ -50,7 +53,7 @@ EDS3 + VertexInputDynamicState Melhora o desempenho em dispositivos mais recentes. Suportado apenas em GPUs Vulkan 1.3+. Sincronizar velocidade do núcleo - Sincroniza a velocidade do núcleo com a percentagem máxima para melhorar o desempenho sem alterar a velocidade real do jogo. + Sincroniza a velocidade do núcleo com a percentagem máxima de velocidade para melhorar o desempenho sem alterar a velocidade real do jogo. Usar Auto Stub Preenche automaticamente serviços e funções em falta. Pode melhorar a compatibilidade mas causar crashes e problemas de estabilidade. Desinstalar firmware @@ -87,8 +90,9 @@ Backend de Shader Método de compilação de shaders. - GLSL - SPIR-V + Universal + Mali + Adreno/Xclipse Emulação NVDEC @@ -410,7 +414,7 @@ Força velocidade máxima (Adreno only) Força o GPU a correr à velocidade máxima (restrições térmicas serão aplicadas) Usa shaders assíncronos - Compila os shaders de forma assíncrona, reduzindo travamentos, mas pode apresentar problemas. + Compila shaders de forma assíncrona. Isto pode reduzir engasgadelas, mas também pode introduzir falhas gráficas. Usar flushing reativo Melhora a precisão da renderização em alguns jogos ao custo de desempenho. Cache de shaders em disco diff --git a/src/android/app/src/main/res/values-ru/strings.xml b/src/android/app/src/main/res/values-ru/strings.xml index f7e5487e8f..b16dce419c 100644 --- a/src/android/app/src/main/res/values-ru/strings.xml +++ b/src/android/app/src/main/res/values-ru/strings.xml @@ -7,6 +7,9 @@ Вы не предоставили разрешение на уведомления! + (Улучшенный) + (Пропуск) + Система: Показать оверлей статистики Настройки Видимость @@ -20,9 +23,9 @@ Показать скорость Текущая скорость эмуляции в % Показать RAM эмулятора - Использование RAM эмулятором + Показать объем оперативной памяти, используемой эмулятором Показать RAM системы - Использование RAM системой + Показать объем оперативной памяти, используемой системой Показать температуру батареи Текущая температура батареи (°C/°F) Позиция оверлея @@ -50,7 +53,7 @@ EDS3 + Динамическое состояние ввода вершин Улучшает производительность на новых устройствах. Поддерживается только GPU с Vulkan 1.3+. Синхронизация скорости ядра - Синхронизирует скорость тактов ядра с максимальным процентом скорости для повышения производительности без изменения фактической скорости игры. + Синхронизирует скорость ядра с максимальным процентом скорости для улучшения производительности без изменения фактической скорости игры. Использовать Auto Stub Автоматически заглушает отсутствующие сервисы и функции. Может улучшить совместимость, но вызывать сбои и проблемы стабильности. Удалить прошивку @@ -87,8 +90,9 @@ Шейдерный бэкенд Метод компиляции шейдеров - GLSL - SPIR-V + Универсальный + Mali + Adreno/Xclipse Эмуляция NVDEC @@ -411,7 +415,7 @@ Принудительно заставить максимальную тактовую частоту (только для Adreno) Заставляет ГП работать на максимально возможных тактовых частотах (тепловые ограничения все равно будут применяться). Использовать асинхронные шейдеры - Компиляция шейдеров происходит асинхронно, что уменьшает зависания, но может привести к появлению багов. + Компилирует шейдеры асинхронно. Это может уменьшить подтормаживания, но также может вызвать графические артефакты. Реактивная очистка Повышение точности рендеринга в некоторых играх за счет снижения производительности. Кэш шейдеров на диске diff --git a/src/android/app/src/main/res/values-uk/strings.xml b/src/android/app/src/main/res/values-uk/strings.xml index b536c81e29..369f116308 100644 --- a/src/android/app/src/main/res/values-uk/strings.xml +++ b/src/android/app/src/main/res/values-uk/strings.xml @@ -7,6 +7,9 @@ Ви не надали дозвіл сповіщень! + (Покращений) + (Пропуск) + Система: Показати накладання статистики Налаштування Видимість @@ -20,9 +23,9 @@ Показати швидкість Відображати швидкість емуляції Показати використання RAM - Відображати використання пам`яті емулятором + Показати обсяг оперативної пам’яті, яку використовує емулятор Показати системну RAM - Відображати використання пам`яті системою + Показати обсяг оперативної пам’яті, яку використовує система Показати температуру батареї Відображати температуру батареї Позиція накладання @@ -50,7 +53,7 @@ EDS3 + Динамічний стан вводу вершин Покращує продуктивність на нових пристроях. Підтримується лише GPU з Vulkan 1.3+. Синхронізувати швидкість ядра - Синхронізує швидкість тактів ядра з максимальним відсотком швидкості для покращення продуктивності без зміни фактичної швидкості гри. + Синхронізує швидкість ядра з максимальним відсотком швидкості для покращення продуктивності без зміни реальної швидкості гри. Використовувати Auto Stub Автоматично замінює відсутні сервіси та функції. Може покращити сумісність, але викликати збої та проблеми стабільності. Видалити прошивку @@ -87,8 +90,9 @@ Вершинний шейдер Спосіб компіляції шейдерів - GLSL - SPIR-V + Універсальний + Mali + Adreno/Xclipse Емуляція NVDEC @@ -288,17 +292,45 @@ Наша нескінченна вдячність Ви зацікавлені? - Обмеження відсотка швидкості + Обмеження швидкості + Обмежує швидкість емуляції у відсотках від нормальної. + Відсоток обмеження + Вказує відсоток обмеження швидкості. 100% — нормальна швидкість. + Режим ЦП Точність ЦП - Емульований регіон - Емульована мова - Користувацький RTC + %1$s%2$s + + + Назва пристрою + Режим док-станції + Збільшує роздільну здатність, знижуючи продуктивність. У портативному режимі роздільна здатність нижча, а продуктивність вища. + Регіон + Мова + Вибрати дату + Вибрати час + Свій RTC + Дозволяє встановити власний час, відмінний від системного. + Встановити RTC Рівень точності + Роздільна здатність (Портативний/Док) Режим верт. синхронізації - Примусово змусити максимальну тактову частоту (тільки для Adreno) - Змушує ГП працювати на максимально можливих тактових частотах (теплові обмеження все одно будуть застосовуватися). - Використовувати асинхронні шейдери + Орієнтація + Співвідношення + Фільтр масштабування + Різкість FSR + Визначає різкість зображення при використанні FSR. + Згладжування + Максимальна тактова частота (тільки Adreno) + Змушує ГП працювати на максимальній тактовій частоті. + Асинхронні шейдери + Компілює шейдери асинхронно. Це може зменшити затримки, але також може спричинити графічні помилки. + Реактивне очищення + Покращує точність рендерингу в деяких іграх. + Кеш шейдерів + Зменшує затримки шляхом збереження шейдерів. + Анізотропне фільтрування + Покращує якість текстур під кутом. ЦП API diff --git a/src/android/app/src/main/res/values-vi/strings.xml b/src/android/app/src/main/res/values-vi/strings.xml index a1d4318d79..475b379b64 100644 --- a/src/android/app/src/main/res/values-vi/strings.xml +++ b/src/android/app/src/main/res/values-vi/strings.xml @@ -7,6 +7,9 @@ Ứng dụng không được cấp quyền thông báo! + (Nâng cao) + (Bỏ qua) + Hệ thống: Hiển thị thống kê hiệu suất Tùy chỉnh Hiển thị @@ -20,9 +23,9 @@ Hiển thị tốc độ Hiển thị phần trăm tốc độ giả lập Hiển thị RAM ứng dụng - Hiển thị lượng RAM sử dụng bởi giả lập + Hiển thị lượng RAM mà trình giả lập đang sử dụng Hiển thị RAM hệ thống - Hiển thị lượng RAM sử dụng bởi hệ thống + Hiển thị lượng RAM được hệ thống sử dụng Hiển thị nhiệt độ pin Hiển thị nhiệt độ pin (Celsius/Fahrenheit) Vị trí overlay @@ -50,7 +53,7 @@ EDS3 + Trạng thái động đầu vào đỉnh Cải thiện hiệu suất trên các thiết bị mới hơn. Chỉ được hỗ trợ trên GPU Vulkan 1.3+. Đồng bộ tốc độ lõi - Đồng bộ tốc độ xung nhịp lõi với phần trăm tốc độ tối đa để cải thiện hiệu suất mà không thay đổi tốc độ thực tế của trò chơi. + Đồng bộ tốc độ lõi với tỷ lệ phần trăm tốc độ tối đa để cải thiện hiệu suất mà không làm thay đổi tốc độ thực tế của trò chơi. Sử dụng Auto Stub Tự động thay thế các dịch vụ và chức năng bị thiếu. Có thể cải thiện khả năng tương thích nhưng gây ra sự cố và vấn đề ổn định. Gỡ cài đặt firmware @@ -87,8 +90,9 @@ Backend Shader Chọn cách biên dịch shader - GLSL - SPIR-V + Đa năng + Mali + Adreno/Xclipse Giả lập NVDEC @@ -328,7 +332,7 @@ Buộc chạy ở xung nhịp tối đa (chỉ Adreno) Buộc GPU hoạt động ở xung nhịp tối đa có thể (ràng buộc nhiệt độ vẫn sẽ được áp dụng). Dùng các shader bất đồng bộ - Biên dịch các shader bất đồng bộ, giảm tình trạng giật lag nhưng có thể gây ra các lỗi. + Biên dịch shader không đồng bộ. Điều này có thể giảm giật lag nhưng cũng có thể gây ra lỗi đồ họa. Bật xả tương ứng Cải thiện độ chính xác hiển thị trong một số trò chơi nhưng đồng thời giảm hiệu suất chơi. Lưu bộ nhớ đệm shader trên ổ cứng diff --git a/src/android/app/src/main/res/values-zh-rCN/strings.xml b/src/android/app/src/main/res/values-zh-rCN/strings.xml index 0e69ca0c06..a57b0def0c 100644 --- a/src/android/app/src/main/res/values-zh-rCN/strings.xml +++ b/src/android/app/src/main/res/values-zh-rCN/strings.xml @@ -7,6 +7,9 @@ 未授予通知权限! + (增强) + (跳过) + 系统: 显示性能统计悬浮窗 自定义 显示项 @@ -20,9 +23,9 @@ 显示速度 显示当前模拟速度百分比 显示应用内存占用 - 显示模拟器内存使用量 + 显示模拟器正在使用的内存量 显示系统内存占用 - 显示系统内存使用量 + 显示系统使用的内存量 显示电池温度 显示当前电池温度(℃/℉) 悬浮窗位置 @@ -50,7 +53,7 @@ EDS3 + 顶点输入动态状态 提高新设备上的性能。仅支持Vulkan 1.3+ GPU。 同步核心速度 - 将核心时钟速度同步到最大速度百分比以提高性能,而不改变游戏实际速度。 + 将核心速度与最大速度百分比同步,在不改变游戏实际速度的情况下提高性能。 使用自动存根 自动补全缺失的服务和功能。可提高兼容性但可能导致崩溃和稳定性问题。 卸载固件 @@ -87,8 +90,9 @@ 着色器后端 选择着色器编译方式 - GLSL - SPIR-V + 通用 + Mali + Adreno/Xclipse NVDEC模拟 @@ -405,7 +409,7 @@ 强制最大时钟 (仅限 Adreno) 强制 GPU 以最大时钟运行 (仍被温控限制)。 使用异步着色器 - 异步编译着色器,减少卡顿,但可能引入故障。 + 异步编译着色器。这可能会减少卡顿,但也可能会导致图形错误。 启用反应性刷新 牺牲性能,提高某些游戏的渲染精度。 磁盘着色器缓存 diff --git a/src/android/app/src/main/res/values-zh-rTW/strings.xml b/src/android/app/src/main/res/values-zh-rTW/strings.xml index 6449d2d554..80a3a89c56 100644 --- a/src/android/app/src/main/res/values-zh-rTW/strings.xml +++ b/src/android/app/src/main/res/values-zh-rTW/strings.xml @@ -7,6 +7,9 @@ 未授予通知權限! + (增強) + (跳過) + 系統: 顯示效能統計疊加層 自訂 可見項目 @@ -20,7 +23,7 @@ 顯示速度 顯示當前模擬速度百分比 顯示應用記憶體用量 - 顯示模擬器使用的記憶體量 + 顯示模擬器正在使用的記憶體量 顯示系統記憶體用量 顯示系統使用的記憶體量 顯示電池溫度 @@ -50,7 +53,7 @@ EDS3 + 頂點輸入動態狀態 提高新裝置上的效能。僅支援Vulkan 1.3+ GPU。 同步核心速度 - 將核心時脈速度同步到最大速度百分比以提高效能,而不改變遊戲實際速度。 + 將核心速度與最大速度百分比同步,在不改變遊戲實際速度的情況下提高效能。 使用自動存根 自動補全缺失的服務和功能。可提高相容性但可能導致崩潰和穩定性問題。 解除安裝韌體 @@ -87,8 +90,9 @@ 著色器後端 選擇著色器的編譯與轉譯方式 - GLSL - SPIR-V + 通用 + Mali + Adreno/Xclipse NVDEC模擬 @@ -406,7 +410,7 @@ 強制最大時脈 (僅 Adreno) 強制 GPU 以最大可能時脈執行 (熱溫限制仍被套用)。 使用非同步著色器 - 非同步編譯著色器,將會減少間斷,但可能會引入故障。 + 非同步編譯著色器。這可能會減少卡頓,但也可能導致圖形錯誤。 使用重新啟用排清 犧牲效能,以改善部分遊戲的轉譯準確度。 磁碟著色器快取 diff --git a/src/android/app/src/main/res/values/arrays.xml b/src/android/app/src/main/res/values/arrays.xml index adaa67415d..cb108dc548 100644 --- a/src/android/app/src/main/res/values/arrays.xml +++ b/src/android/app/src/main/res/values/arrays.xml @@ -87,12 +87,14 @@ @string/shader_backend_glsl + @string/shader_backend_glasm @string/shader_backend_spirv 0 1 + 2 diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 427b2890ad..cb9930d0a3 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -10,6 +10,9 @@ Notification permission not granted! + (Enhanced) + (Skipping) + System: ShoW Performance Stats Overlay Customization Visibility @@ -23,9 +26,9 @@ Show Speed Display current emulation speed percentage Show App Memory Usage - Display the amount of RAM getting used by the emulator + Display the amount of RAM the emulator is using Show System Memory Usage - Display the amount of RAM getting used by the system + Display the amount of RAM used by the system Show Battery Temperature Display current Battery temperature in Celsius and Fahrenheit Overlay Position @@ -49,7 +52,7 @@ EDS3 + VertexInputDynamicState Improves performance on newer devices. Only supported on Vulkan 1.3+ GPUs. Synchronize Core Speed - Synchronize the core tick speed to the maximum speed percentage to improve performance without altering the games actual speed. + Synchronize the core tick speed to the maximum speed percentage to improve performance without altering the game\'s actual speed. Use Auto Stub Automatically stub missing services and functions. This may improve compatibility but can cause crashes and stability issues. Uninstall firmware @@ -64,8 +67,9 @@ Shader Backend Choose how shaders are compiled and translated for your GPU. - GLSL - SPIR-V + Universal + Mali + Adreno/Xclipse NVDEC Emulation @@ -325,7 +329,7 @@ Projects that make eden for Android possible Build User data - Import/export all app data.\n\nWhen importing user data, all existing user data will be deleted! + Import/export all app data.\n\nWhen importing user data, all existing user data will be deleted!\n\nImporting data from Citron may cause issues. It\'s recommended to manually import all needed data. Exporting user data… Importing user data… Import user data @@ -334,8 +338,8 @@ User data imported successfully Export cancelled Make sure the user data folders are at the root of the zip folder and contain a config file at config/config.ini and try again. - https://discord.gg/Xa3ssgxrY7 - https://bixthefin.github.io// + https://discord.gg/hab4Sh8qj6 + https://eden-emulator.github.io https://git.eden-emu.dev/eden-emu @@ -388,7 +392,7 @@ Optimize SPIRV output Optimizes compiled shader to improve GPU efficiency. Use asynchronous shaders - Compiles shaders asynchronously, reducing stutter but may introduce glitches. + Compiles shaders asynchronously. This may reduce stutters but may also introduce glitches. Use Fast GPU Time Forces most games to run at their highest native resolution. This option is hacky and may cause issues. Use reactive flushing diff --git a/src/common/settings.h b/src/common/settings.h index 92e02d9887..6b4532c961 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -196,11 +196,11 @@ struct Values { SwitchableSetting memory_layout_mode{linkage, MemoryLayout::Memory_4Gb, MemoryLayout::Memory_4Gb, - MemoryLayout::Memory_8Gb, + MemoryLayout::Memory_12Gb, "memory_layout_mode", Category::Core, Specialization::Default, - false}; + true}; SwitchableSetting use_speed_limit{ linkage, true, "use_speed_limit", Category::Core, Specialization::Paired, true, true}; SwitchableSetting speed_limit{linkage, @@ -447,9 +447,9 @@ struct Values { SwitchableSetting dyna_state{linkage, #ifdef ANDROID - 0, + 2, #else - 1, + 2, #endif 0, 2, @@ -457,9 +457,9 @@ struct Values { Category::RendererExtensions, Specialization::Scalar}; - SwitchableSetting dyna_state3{linkage, false, "dyna_state3", Category::RendererExtensions}; - SwitchableSetting provoking_vertex{linkage, false, "provoking_vertex", Category::RendererExtensions}; - SwitchableSetting descriptor_indexing{linkage, false, "descriptor_indexing", Category::RendererExtensions}; + SwitchableSetting dyna_state3{linkage, true, "dyna_state3", Category::RendererExtensions}; + SwitchableSetting provoking_vertex{linkage, true, "provoking_vertex", Category::RendererExtensions}; + SwitchableSetting descriptor_indexing{linkage, true, "descriptor_indexing", Category::RendererExtensions}; Setting renderer_debug{linkage, false, "debug", Category::RendererDebug}; Setting renderer_shader_feedback{linkage, false, "shader_feedback", @@ -640,6 +640,10 @@ struct Values { Setting log_flush_lines{linkage, false, "flush_lines", Category::Miscellaneous}; Setting use_dev_keys{linkage, false, "use_dev_keys", Category::Miscellaneous}; Setting first_launch{linkage, true, "first_launch", Category::Miscellaneous}; + Setting hide_pre_alpha_warning{linkage, + false, + "hide_pre_alpha_warning", + Category::Miscellaneous}; // Network Setting network_interface{linkage, std::string(), "network_interface", diff --git a/src/common/settings_enums.h b/src/common/settings_enums.h index 75189e60d7..43abe150f8 100644 --- a/src/common/settings_enums.h +++ b/src/common/settings_enums.h @@ -134,7 +134,7 @@ ENUM(CpuBackend, Dynarmic, Nce); ENUM(CpuAccuracy, Auto, Accurate, Unsafe, Paranoid); -ENUM(MemoryLayout, Memory_4Gb, Memory_6Gb, Memory_8Gb); +ENUM(MemoryLayout, Memory_4Gb, Memory_6Gb, Memory_8Gb, Memory_10Gb, Memory_12Gb); ENUM(ConfirmStop, Ask_Always, Ask_Based_On_Game, Ask_Never); diff --git a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp index 37fa39a734..f62f3e4767 100644 --- a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp +++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp @@ -48,6 +48,10 @@ u32 GetMemorySizeForInit() { return Smc::MemorySize_6GB; case Settings::MemoryLayout::Memory_8Gb: return Smc::MemorySize_8GB; + case Settings::MemoryLayout::Memory_10Gb: + return Smc::MemorySize_10GB; + case Settings::MemoryLayout::Memory_12Gb: + return Smc::MemorySize_12GB; } return Smc::MemorySize_4GB; } @@ -60,6 +64,10 @@ Smc::MemoryArrangement GetMemoryArrangeForInit() { return Smc::MemoryArrangement_6GB; case Settings::MemoryLayout::Memory_8Gb: return Smc::MemoryArrangement_8GB; + case Settings::MemoryLayout::Memory_10Gb: + return Smc::MemoryArrangement_10GB; + case Settings::MemoryLayout::Memory_12Gb: + return Smc::MemoryArrangement_12GB; } return Smc::MemoryArrangement_4GB; } @@ -79,6 +87,10 @@ size_t KSystemControl::Init::GetIntendedMemorySize() { return 6_GiB; case Smc::MemorySize_8GB: return 8_GiB; + case Smc::MemorySize_10GB: + return 10_GiB; + case Smc::MemorySize_12GB: + return 12_GiB; } } @@ -114,6 +126,10 @@ std::size_t KSystemControl::Init::GetApplicationPoolSize() { case Smc::MemoryArrangement_8GB: // Real kernel sets this to 4916_MiB. We are not debugging applets. return 6547_MiB; + case Smc::MemoryArrangement_10GB: + return 8178_MiB; + case Smc::MemoryArrangement_12GB: + return 9809_MiB; } }(); @@ -139,6 +155,10 @@ size_t KSystemControl::Init::GetAppletPoolSize() { case Smc::MemoryArrangement_8GB: //! Real kernel sets this to 2193_MiB. We are not debugging applets. return 562_MiB; + case Smc::MemoryArrangement_10GB: + return 562_MiB; + case Smc::MemoryArrangement_12GB: + return 562_MiB; } }(); diff --git a/src/core/hle/kernel/board/nintendo/nx/secure_monitor.h b/src/core/hle/kernel/board/nintendo/nx/secure_monitor.h index b0e4123f08..ffec06f2d5 100644 --- a/src/core/hle/kernel/board/nintendo/nx/secure_monitor.h +++ b/src/core/hle/kernel/board/nintendo/nx/secure_monitor.h @@ -9,6 +9,8 @@ enum MemorySize { MemorySize_4GB = 0, MemorySize_6GB = 1, MemorySize_8GB = 2, + MemorySize_10GB = 3, + MemorySize_12GB = 4, }; enum MemoryArrangement { @@ -18,6 +20,8 @@ enum MemoryArrangement { MemoryArrangement_6GB = 3, MemoryArrangement_6GBForAppletDev = 4, MemoryArrangement_8GB = 5, + MemoryArrangement_10GB = 6, + MemoryArrangement_12GB = 7, }; } // namespace Kernel::Board::Nintendo::Nx::Smc diff --git a/src/core/hle/service/am/service/common_state_getter.cpp b/src/core/hle/service/am/service/common_state_getter.cpp index c445e5e776..c179102f76 100644 --- a/src/core/hle/service/am/service/common_state_getter.cpp +++ b/src/core/hle/service/am/service/common_state_getter.cpp @@ -38,7 +38,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_, std::shared_ptr, "GetReaderLockAccessorEx"}, {32, D<&ICommonStateGetter::GetWriterLockAccessorEx>, "GetWriterLockAccessorEx"}, - {40, D<&ICommonStateGetter::GetCradleFwVersion>, "GetCradleFwVersion"}, + {40, nullptr, "GetCradleFwVersion"}, {50, D<&ICommonStateGetter::IsVrModeEnabled>, "IsVrModeEnabled"}, {51, D<&ICommonStateGetter::SetVrModeEnabled>, "SetVrModeEnabled"}, {52, D<&ICommonStateGetter::SetLcdBacklighOffEnabled>, "SetLcdBacklighOffEnabled"}, @@ -172,17 +172,6 @@ Result ICommonStateGetter::GetBootMode(Out out_boot_mode) { R_SUCCEED(); } -Result ICommonStateGetter::GetCradleFwVersion(OutArray out_version) { - LOG_DEBUG(Service_AM, "(STUBBED) called"); - - out_version[0] = 0; - out_version[1] = 0; - out_version[2] = 0; - out_version[3] = 0; - - R_SUCCEED(); -} - Result ICommonStateGetter::IsVrModeEnabled(Out out_is_vr_mode_enabled) { LOG_DEBUG(Service_AM, "called"); diff --git a/src/core/hle/service/am/service/common_state_getter.h b/src/core/hle/service/am/service/common_state_getter.h index a326e11053..0cafbfe176 100644 --- a/src/core/hle/service/am/service/common_state_getter.h +++ b/src/core/hle/service/am/service/common_state_getter.h @@ -39,7 +39,6 @@ private: Result GetHdcpAuthenticationStateChangeEvent(OutCopyHandle out_event); Result GetOperationMode(Out out_operation_mode); Result GetPerformanceMode(Out out_performance_mode); - Result GetCradleFwVersion(OutArray out_version); Result GetBootMode(Out out_boot_mode); Result IsVrModeEnabled(Out out_is_vr_mode_enabled); Result SetVrModeEnabled(bool is_vr_mode_enabled); diff --git a/src/video_core/host1x/ffmpeg/ffmpeg.cpp b/src/video_core/host1x/ffmpeg/ffmpeg.cpp index 7e955223db..fe85efaab3 100644 --- a/src/video_core/host1x/ffmpeg/ffmpeg.cpp +++ b/src/video_core/host1x/ffmpeg/ffmpeg.cpp @@ -1,6 +1,12 @@ // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: Copyright 2024 suyu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +// SPDX-FileCopyrightText: Copyright 2025 eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + #include "common/assert.h" #include "common/logging/log.h" #include "common/scope_exit.h" @@ -49,7 +55,8 @@ AVPixelFormat GetGpuFormat(AVCodecContext* codec_context, const AVPixelFormat* p return codec_context->pix_fmt; } -std::string AVError(int errnum) { +std::string AVError(int errnum) +{ char errbuf[AV_ERROR_MAX_STRING_SIZE] = {}; av_make_error_string(errbuf, sizeof(errbuf) - 1, errnum); return errbuf; @@ -218,6 +225,167 @@ bool DecoderContext::OpenContext(const Decoder& decoder) { return true; } +// Nasty but allows linux builds to pass. +// Requires double checks when FFMPEG gets updated. +// Hopefully a future FFMPEG update will all and expose a solution in the public API. +namespace { + +typedef struct FFCodecDefault { + const char* key; + const char* value; +} FFCodecDefault; + +typedef struct FFCodec { + /** + * The public AVCodec. See codec.h for it. + */ + AVCodec p; + + /** + * Internal codec capabilities FF_CODEC_CAP_*. + */ + unsigned caps_internal : 29; + + /** + * This field determines the type of the codec (decoder/encoder) + * and also the exact callback cb implemented by the codec. + * cb_type uses enum FFCodecType values. + */ + unsigned cb_type : 3; + + int priv_data_size; + /** + * @name Frame-level threading support functions + * @{ + */ + /** + * Copy necessary context variables from a previous thread context to the current one. + * If not defined, the next thread will start automatically; otherwise, the codec + * must call ff_thread_finish_setup(). + * + * dst and src will (rarely) point to the same context, in which case memcpy should be skipped. + */ + int (*update_thread_context)(struct AVCodecContext* dst, const struct AVCodecContext* src); + + /** + * Copy variables back to the user-facing context + */ + int (*update_thread_context_for_user)(struct AVCodecContext* dst, + const struct AVCodecContext* src); + /** @} */ + + /** + * Private codec-specific defaults. + */ + const FFCodecDefault* defaults; + + /** + * Initialize codec static data, called from av_codec_iterate(). + * + * This is not intended for time consuming operations as it is + * run for every codec regardless of that codec being used. + */ + void (*init_static_data)(struct FFCodec* codec); + + int (*init)(struct AVCodecContext*); + + union { + /** + * Decode to an AVFrame. + * cb is in this state if cb_type is FF_CODEC_CB_TYPE_DECODE. + * + * @param avctx codec context + * @param[out] frame AVFrame for output + * @param[out] got_frame_ptr decoder sets to 0 or 1 to indicate that + * a non-empty frame was returned in frame. + * @param[in] avpkt AVPacket containing the data to be decoded + * @return amount of bytes read from the packet on success, + * negative error code on failure + */ + int (*decode)(struct AVCodecContext* avctx, struct AVFrame* frame, int* got_frame_ptr, + struct AVPacket* avpkt); + /** + * Decode subtitle data to an AVSubtitle. + * cb is in this state if cb_type is FF_CODEC_CB_TYPE_DECODE_SUB. + * + * Apart from that this is like the decode callback. + */ + int (*decode_sub)(struct AVCodecContext* avctx, struct AVSubtitle* sub, int* got_frame_ptr, + const struct AVPacket* avpkt); + /** + * Decode API with decoupled packet/frame dataflow. + * cb is in this state if cb_type is FF_CODEC_CB_TYPE_RECEIVE_FRAME. + * + * This function is called to get one output frame. It should call + * ff_decode_get_packet() to obtain input data. + */ + int (*receive_frame)(struct AVCodecContext* avctx, struct AVFrame* frame); + /** + * Encode data to an AVPacket. + * cb is in this state if cb_type is FF_CODEC_CB_TYPE_ENCODE + * + * @param avctx codec context + * @param[out] avpkt output AVPacket + * @param[in] frame AVFrame containing the input to be encoded + * @param[out] got_packet_ptr encoder sets to 0 or 1 to indicate that a + * non-empty packet was returned in avpkt. + * @return 0 on success, negative error code on failure + */ + int (*encode)(struct AVCodecContext* avctx, struct AVPacket* avpkt, + const struct AVFrame* frame, int* got_packet_ptr); + /** + * Encode subtitles to a raw buffer. + * cb is in this state if cb_type is FF_CODEC_CB_TYPE_ENCODE_SUB. + */ + int (*encode_sub)(struct AVCodecContext* avctx, uint8_t* buf, int buf_size, + const struct AVSubtitle* sub); + /** + * Encode API with decoupled frame/packet dataflow. + * cb is in this state if cb_type is FF_CODEC_CB_TYPE_RECEIVE_PACKET. + * + * This function is called to get one output packet. + * It should call ff_encode_get_frame() to obtain input data. + */ + int (*receive_packet)(struct AVCodecContext* avctx, struct AVPacket* avpkt); + } cb; + + int (*close)(struct AVCodecContext*); + + /** + * Flush buffers. + * Will be called when seeking + */ + void (*flush)(struct AVCodecContext*); + + /** + * Decoding only, a comma-separated list of bitstream filters to apply to + * packets before decoding. + */ + const char* bsfs; + + /** + * Array of pointers to hardware configurations supported by the codec, + * or NULL if no hardware supported. The array is terminated by a NULL + * pointer. + * + * The user can only access this field via avcodec_get_hw_config(). + */ + const struct AVCodecHWConfigInternal* const* hw_configs; + + /** + * List of supported codec_tags, terminated by FF_CODEC_TAGS_END. + */ + const uint32_t* codec_tags; +} FFCodec; + +#ifndef ANDROID +static av_always_inline const FFCodec* ffcodec(const AVCodec* codec) { + return (const FFCodec*)codec; +} +#endif +} // namespace + + bool DecoderContext::SendPacket(const Packet& packet) { m_temp_frame = std::make_shared(); m_got_frame = 0; @@ -227,8 +395,12 @@ bool DecoderContext::SendPacket(const Packet& packet) { #ifndef ANDROID if (!m_codec_context->hw_device_ctx && m_codec_context->codec_id == AV_CODEC_ID_H264) { m_decode_order = true; - const int ret = avcodec_send_frame(m_codec_context, m_temp_frame->GetFrame()); - if (ret < 0) { + auto* codec{ffcodec(m_decoder.GetCodec())}; + if (const int ret = codec->cb.decode(m_codec_context, + m_temp_frame->GetFrame(), + &m_got_frame, + packet.GetPacket()); + ret < 0) { LOG_DEBUG(Service_NVDRV, "avcodec_send_packet error {}", AVError(ret)); return false; } @@ -247,9 +419,11 @@ bool DecoderContext::SendPacket(const Packet& packet) { std::shared_ptr DecoderContext::ReceiveFrame() { // Android can randomly crash when calling decode directly, so skip. // TODO update ffmpeg and hope that fixes it. +// TODO: This is causing issues on linux, need to bisect #ifndef ANDROID if (!m_codec_context->hw_device_ctx && m_codec_context->codec_id == AV_CODEC_ID_H264) { m_decode_order = true; + auto* codec{ffcodec(m_decoder.GetCodec())}; int ret{0}; if (m_got_frame == 0) { @@ -257,7 +431,7 @@ std::shared_ptr DecoderContext::ReceiveFrame() { auto* pkt = packet.GetPacket(); pkt->data = nullptr; pkt->size = 0; - ret = avcodec_receive_packet(m_codec_context, pkt); + ret = codec->cb.decode(m_codec_context, m_temp_frame->GetFrame(), &m_got_frame, pkt); m_codec_context->has_b_frames = 0; } diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 3260ef8cc2..30f5ff7a75 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -1,6 +1,9 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +// SPDX-FileCopyrightText: Copyright 2025 eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + #include #include #include @@ -99,52 +102,91 @@ Device CreateDevice(const vk::Instance& instance, const vk::InstanceDispatch& dl } RendererVulkan::RendererVulkan(Core::Frontend::EmuWindow& emu_window, - Tegra::MaxwellDeviceMemoryManager& device_memory_, Tegra::GPU& gpu_, - std::unique_ptr context_) try - : RendererBase(emu_window, std::move(context_)), device_memory(device_memory_), gpu(gpu_), - library(OpenLibrary(context.get())), - // Create raw Vulkan instance first - instance(CreateInstance(*library, dld, VK_API_VERSION_1_1, render_window.GetWindowInfo().type, - Settings::values.renderer_debug.GetValue())), - // Now create RAII wrappers for the resources in the correct order - managed_instance(MakeManagedInstance(instance, dld)), - // Create debug messenger if debug is enabled - debug_messenger(Settings::values.renderer_debug ? CreateDebugUtilsCallback(instance) - : vk::DebugUtilsMessenger{}), - managed_debug_messenger(Settings::values.renderer_debug - ? MakeManagedDebugUtilsMessenger(debug_messenger, instance, dld) - : ManagedDebugUtilsMessenger{}), - // Create surface - surface(CreateSurface(instance, render_window.GetWindowInfo())), - managed_surface(MakeManagedSurface(surface, instance, dld)), - device(CreateDevice(instance, dld, *surface)), - memory_allocator(device), state_tracker(), - scheduler(device, state_tracker), - swapchain(*surface, device, scheduler, render_window.GetFramebufferLayout().width, - render_window.GetFramebufferLayout().height), - present_manager(instance, render_window, device, memory_allocator, scheduler, swapchain, - *surface), - blit_swapchain(device_memory, device, memory_allocator, present_manager, scheduler, - PresentFiltersForDisplay), - blit_capture(device_memory, device, memory_allocator, present_manager, scheduler, - PresentFiltersForDisplay), - blit_applet(device_memory, device, memory_allocator, present_manager, scheduler, - PresentFiltersForAppletCapture), - rasterizer(render_window, gpu, device_memory, device, memory_allocator, state_tracker, - scheduler), - applet_frame() { + Tegra::MaxwellDeviceMemoryManager& device_memory_, + Tegra::GPU& gpu_, + std::unique_ptr context_) +try + : RendererBase(emu_window, std::move(context_)) + , device_memory(device_memory_) + , gpu(gpu_) + , library(OpenLibrary(context.get())) + , + // Create raw Vulkan instance first + instance(CreateInstance(*library, + dld, + VK_API_VERSION_1_1, + render_window.GetWindowInfo().type, + Settings::values.renderer_debug.GetValue())) + , + // Now create RAII wrappers for the resources in the correct order + managed_instance(MakeManagedInstance(instance, dld)) + , + // Create debug messenger if debug is enabled + debug_messenger(Settings::values.renderer_debug ? CreateDebugUtilsCallback(instance) + : vk::DebugUtilsMessenger{}) + , managed_debug_messenger(Settings::values.renderer_debug + ? MakeManagedDebugUtilsMessenger(debug_messenger, instance, dld) + : ManagedDebugUtilsMessenger{}) + , + // Create surface + surface(CreateSurface(instance, render_window.GetWindowInfo())) + , managed_surface(MakeManagedSurface(surface, instance, dld)) + , device(CreateDevice(instance, dld, *surface)) + , memory_allocator(device) + , state_tracker() + , scheduler(device, state_tracker) + , swapchain(*surface, + device, + scheduler, + render_window.GetFramebufferLayout().width, + render_window.GetFramebufferLayout().height) + , present_manager(instance, + render_window, + device, + memory_allocator, + scheduler, + swapchain, +#ifdef ANDROID + surface) + , +#else + *surface) + , +#endif + blit_swapchain(device_memory, + device, + memory_allocator, + present_manager, + scheduler, + PresentFiltersForDisplay) + , blit_capture(device_memory, + device, + memory_allocator, + present_manager, + scheduler, + PresentFiltersForDisplay) + , blit_applet(device_memory, + device, + memory_allocator, + present_manager, + scheduler, + PresentFiltersForAppletCapture) + , rasterizer(render_window, gpu, device_memory, device, memory_allocator, state_tracker, scheduler) + , applet_frame() { - if (Settings::values.renderer_force_max_clock.GetValue() && device.ShouldBoostClocks()) { + if (Settings::values.renderer_force_max_clock.GetValue() && device.ShouldBoostClocks()) { turbo_mode.emplace(instance, dld); scheduler.RegisterOnSubmit([this] { turbo_mode->QueueSubmitted(); }); } +#ifndef ANDROID // Release ownership from the old instance and surface instance.release(); surface.release(); if (Settings::values.renderer_debug) { debug_messenger.release(); } +#endif Report(); } catch (const vk::Exception& exception) { diff --git a/src/video_core/renderer_vulkan/vk_present_manager.cpp b/src/video_core/renderer_vulkan/vk_present_manager.cpp index 8f5edeae24..a448dc5288 100644 --- a/src/video_core/renderer_vulkan/vk_present_manager.cpp +++ b/src/video_core/renderer_vulkan/vk_present_manager.cpp @@ -95,15 +95,31 @@ bool CanBlitToSwapchain(const vk::PhysicalDevice& physical_device, VkFormat form } // Anonymous namespace -PresentManager::PresentManager(const vk::Instance& instance_, Core::Frontend::EmuWindow& render_window_, - const Device& device_, MemoryAllocator& memory_allocator_, Scheduler& scheduler_, - Swapchain& swapchain_, VkSurfaceKHR_T* surface_handle_) - : instance{instance_}, render_window{render_window_}, device{device_}, - memory_allocator{memory_allocator_}, scheduler{scheduler_}, swapchain{swapchain_}, - surface_handle{surface_handle_}, - blit_supported{CanBlitToSwapchain(device.GetPhysical(), - swapchain.GetImageViewFormat())}, - use_present_thread{Settings::values.async_presentation.GetValue()} { +PresentManager::PresentManager(const vk::Instance& instance_, + Core::Frontend::EmuWindow& render_window_, + const Device& device_, + MemoryAllocator& memory_allocator_, + Scheduler& scheduler_, + Swapchain& swapchain_, +#ifdef ANDROID + vk::SurfaceKHR& surface_) +#else + VkSurfaceKHR_T* surface_handle_) +#endif + : instance{instance_} + , render_window{render_window_} + , device{device_} + , memory_allocator{memory_allocator_} + , scheduler{scheduler_} + , swapchain{swapchain_} +#ifdef ANDROID + , surface{surface_} +#else + , surface_handle{surface_handle_} +#endif + , blit_supported{CanBlitToSwapchain(device.GetPhysical(), swapchain.GetImageViewFormat())} + , use_present_thread{Settings::values.async_presentation.GetValue()} +{ SetImageCount(); auto& dld = device.GetLogical(); @@ -289,7 +305,11 @@ void PresentManager::PresentThread(std::stop_token token) { } void PresentManager::RecreateSwapchain(Frame* frame) { +#ifndef ANDROID swapchain.Create(surface_handle, frame->width, frame->height); // Pass raw pointer +#else + swapchain.Create(*surface, frame->width, frame->height); // Pass raw pointer +#endif SetImageCount(); } @@ -307,6 +327,9 @@ void PresentManager::CopyToSwapchain(Frame* frame) { try { // Recreate surface and swapchain if needed. if (requires_recreation) { +#ifdef ANDROID + surface = CreateSurface(instance, render_window.GetWindowInfo()); +#endif RecreateSwapchain(frame); } diff --git a/src/video_core/renderer_vulkan/vk_present_manager.h b/src/video_core/renderer_vulkan/vk_present_manager.h index 96850ed56f..5820280602 100644 --- a/src/video_core/renderer_vulkan/vk_present_manager.h +++ b/src/video_core/renderer_vulkan/vk_present_manager.h @@ -37,9 +37,17 @@ struct Frame { class PresentManager { public: - PresentManager(const vk::Instance& instance, Core::Frontend::EmuWindow& render_window, - const Device& device, MemoryAllocator& memory_allocator, Scheduler& scheduler, - Swapchain& swapchain, VkSurfaceKHR_T* surface_handle); + PresentManager(const vk::Instance& instance, + Core::Frontend::EmuWindow& render_window, + const Device& device, + MemoryAllocator& memory_allocator, + Scheduler& scheduler, + Swapchain& swapchain, +#ifdef ANDROID + vk::SurfaceKHR& surface); +#else + VkSurfaceKHR_T* surface_handle); +#endif ~PresentManager(); /// Returns the last used presentation frame @@ -73,7 +81,11 @@ private: MemoryAllocator& memory_allocator; Scheduler& scheduler; Swapchain& swapchain; +#ifdef ANDROID + vk::SurfaceKHR& surface; +#else VkSurfaceKHR_T* surface_handle; +#endif vk::CommandPool cmdpool; std::vector frames; std::queue present_queue; diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp index a28296bdaf..44c06eddf3 100644 --- a/src/video_core/renderer_vulkan/vk_query_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp @@ -176,7 +176,7 @@ public: PauseCounter(); } AbandonCurrentQuery(); - std::function func([this, counts = pending_flush_queries.size()] { + std::function func([this] { amend_value = 0; accumulation_value = 0; }); diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index ec96b75036..a002ca83a0 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp @@ -105,23 +105,58 @@ VkCompositeAlphaFlagBitsKHR ChooseAlphaFlags(const VkSurfaceCapabilitiesKHR& cap } // Anonymous namespace -Swapchain::Swapchain(VkSurfaceKHR_T* surface_handle_, const Device& device_, Scheduler& scheduler_, - u32 width_, u32 height_) - : surface_handle{surface_handle_}, device{device_}, scheduler{scheduler_} { +Swapchain::Swapchain( +#ifdef ANDROID + VkSurfaceKHR surface_, +#else + VkSurfaceKHR_T* surface_handle_, +#endif + const Device& device_, + Scheduler& scheduler_, + u32 width_, + u32 height_) +#ifdef ANDROID + : surface(surface_) +#else + : surface_handle{surface_handle_} +#endif + , device{device_} + , scheduler{scheduler_} +{ +#ifdef ANDROID + Create(surface, width_, height_); +#else Create(surface_handle, width_, height_); +#endif } Swapchain::~Swapchain() = default; -void Swapchain::Create(VkSurfaceKHR_T* surface_handle_, u32 width_, u32 height_) { +void Swapchain::Create( +#ifdef ANDROID + VkSurfaceKHR surface_, +#else + VkSurfaceKHR_T* surface_handle_, +#endif + u32 width_, + u32 height_) +{ is_outdated = false; is_suboptimal = false; width = width_; height = height_; +#ifdef ANDROID + surface = surface_; +#else surface_handle = surface_handle_; +#endif const auto physical_device = device.GetPhysical(); +#ifdef ANDROID + const auto capabilities{physical_device.GetSurfaceCapabilitiesKHR(surface)}; +#else const auto capabilities{physical_device.GetSurfaceCapabilitiesKHR(surface_handle)}; +#endif if (capabilities.maxImageExtent.width == 0 || capabilities.maxImageExtent.height == 0) { return; } @@ -199,10 +234,17 @@ void Swapchain::Present(VkSemaphore render_semaphore) { void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities) { const auto physical_device{device.GetPhysical()}; + +#ifdef ANDROID + const auto formats{physical_device.GetSurfaceFormatsKHR(surface)}; + const auto present_modes = physical_device.GetSurfacePresentModesKHR(surface); +#else const auto formats{physical_device.GetSurfaceFormatsKHR(surface_handle)}; const auto present_modes = physical_device.GetSurfacePresentModesKHR(surface_handle); - has_mailbox = std::find(present_modes.begin(), present_modes.end(), - VK_PRESENT_MODE_MAILBOX_KHR) != present_modes.end(); +#endif + + has_mailbox = std::find(present_modes.begin(), present_modes.end(), VK_PRESENT_MODE_MAILBOX_KHR) + != present_modes.end(); has_imm = std::find(present_modes.begin(), present_modes.end(), VK_PRESENT_MODE_IMMEDIATE_KHR) != present_modes.end(); has_fifo_relaxed = std::find(present_modes.begin(), present_modes.end(), @@ -228,7 +270,11 @@ void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities) { .sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, .pNext = nullptr, .flags = 0, +#ifdef ANDROID + .surface = surface, +#else .surface = surface_handle, +#endif .minImageCount = requested_image_count, .imageFormat = surface_format.format, .imageColorSpace = surface_format.colorSpace, @@ -269,7 +315,11 @@ void Swapchain::CreateSwapchain(const VkSurfaceCapabilitiesKHR& capabilities) { swapchain_ci.flags |= VK_SWAPCHAIN_CREATE_MUTABLE_FORMAT_BIT_KHR; } // Request the size again to reduce the possibility of a TOCTOU race condition. +#ifdef ANDROID + const auto updated_capabilities = physical_device.GetSurfaceCapabilitiesKHR(surface); +#else const auto updated_capabilities = physical_device.GetSurfaceCapabilitiesKHR(surface_handle); +#endif swapchain_ci.imageExtent = ChooseSwapExtent(updated_capabilities, width, height); // Don't add code within this and the swapchain creation. swapchain = device.GetLogical().CreateSwapchainKHR(swapchain_ci); diff --git a/src/video_core/renderer_vulkan/vk_swapchain.h b/src/video_core/renderer_vulkan/vk_swapchain.h index f5090c27f4..b3e1c4f025 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.h +++ b/src/video_core/renderer_vulkan/vk_swapchain.h @@ -21,12 +21,27 @@ class Scheduler; class Swapchain { public: - explicit Swapchain(VkSurfaceKHR_T* surface_handle, const Device& device, Scheduler& scheduler, u32 width, - u32 height); + explicit Swapchain( +#ifdef ANDROID + VkSurfaceKHR surface, +#else + VkSurfaceKHR_T* surface_handle, +#endif + const Device& device, + Scheduler& scheduler, + u32 width, + u32 height); ~Swapchain(); /// Creates (or recreates) the swapchain with a given size. - void Create(VkSurfaceKHR_T* surface_handle, u32 width, u32 height); + void Create( +#ifdef ANDROID + VkSurfaceKHR surface, +#else + VkSurfaceKHR_T* surface_handle, +#endif + u32 width, + u32 height); /// Acquires the next image in the swapchain, waits as needed. bool AcquireNextImage(); @@ -110,7 +125,12 @@ private: bool NeedsPresentModeUpdate() const; +#ifdef ANDROID + VkSurfaceKHR surface; +#else VkSurfaceKHR_T* surface_handle; +#endif + const Device& device; Scheduler& scheduler; diff --git a/src/video_core/vulkan_common/vulkan_wrapper.h b/src/video_core/vulkan_common/vulkan_wrapper.h index aa9fb8e17b..4607bf516c 100644 --- a/src/video_core/vulkan_common/vulkan_wrapper.h +++ b/src/video_core/vulkan_common/vulkan_wrapper.h @@ -430,6 +430,7 @@ public: return handle != nullptr; } +#ifndef ANDROID /** * Releases ownership of the managed handle. * The caller is responsible for managing the lifetime of the returned handle. @@ -438,6 +439,7 @@ public: Type release() noexcept { return std::exchange(handle, nullptr); } +#endif protected: Type handle = nullptr; @@ -510,6 +512,7 @@ public: return handle != nullptr; } +#ifndef ANDROID /** * Releases ownership of the managed handle. * The caller is responsible for managing the lifetime of the returned handle. @@ -518,6 +521,7 @@ public: Type release() noexcept { return std::exchange(handle, nullptr); } +#endif protected: Type handle = nullptr; diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 15b898279b..9425ee73f6 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -238,6 +238,8 @@ add_executable(yuzu yuzu.qrc yuzu.rc migration_dialog.h migration_dialog.cpp + migration_worker.h + migration_worker.cpp ) set_target_properties(yuzu PROPERTIES OUTPUT_NAME "eden") diff --git a/src/yuzu/aboutdialog.ui b/src/yuzu/aboutdialog.ui index e6f269ee69..46cdd28e63 100644 --- a/src/yuzu/aboutdialog.ui +++ b/src/yuzu/aboutdialog.ui @@ -128,7 +128,7 @@ li.checked::marker { content: "\2612"; } - <html><head/><body><p><a href="https://yuzu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://github.com/yuzu-emu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://github.com/yuzu-emu/yuzu/graphs/contributors"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://github.com/yuzu-emu/yuzu/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html> + <html><head/><body><p><a href="https://eden-emulator.github.io/"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://git.eden-emu.dev"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://git.eden-emu.dev/eden-emu/eden/activity/contributors"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://git.eden-emu.dev/eden-emu/eden/src/branch/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html> true diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 06ebb36442..8d773753c1 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -286,7 +286,7 @@ GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_, Core::System& system_) : QWidget(parent), emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)}, system{system_} { - setWindowTitle(QStringLiteral("yuzu %1 | %2-%3") + setWindowTitle(QStringLiteral("eden %1 | %2-%3") .arg(QString::fromUtf8(Common::g_build_name), QString::fromUtf8(Common::g_scm_branch), QString::fromUtf8(Common::g_scm_desc))); @@ -1137,4 +1137,4 @@ bool GRenderWindow::eventFilter(QObject* object, QEvent* event) { emit MouseActivity(); } return false; -} \ No newline at end of file +} diff --git a/src/yuzu/compatdb.ui b/src/yuzu/compatdb.ui index d11669df26..6a2632a1ce 100644 --- a/src/yuzu/compatdb.ui +++ b/src/yuzu/compatdb.ui @@ -20,7 +20,7 @@ Report Compatibility - QWizard::DisabledBackButtonOnLastPage|QWizard::HelpButtonOnRight|QWizard::NoBackButtonOnStartPage + QWizard::WizardOption::DisabledBackButtonOnLastPage|QWizard::WizardOption::HelpButtonOnRight|QWizard::WizardOption::NoBackButtonOnStartPage @@ -33,7 +33,7 @@ - <html><head/><body><p><span style=" font-size:10pt;">Should you choose to submit a test case to the </span><a href="https://yuzu-emu.org/game/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">yuzu Compatibility List</span></a><span style=" font-size:10pt;">, The following information will be collected and displayed on the site:</span></p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Hardware Information (CPU / GPU / Operating System)</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Which version of yuzu you are running</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The connected yuzu account</li></ul></body></html> + <html><head/><body><p><span style=" font-size:10pt;">Should you choose to submit a test case to the </span><a href="https://eden-emulator.github.io/game/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">eden Compatibility List</span></a><span style=" font-size:10pt;">, The following information will be collected and displayed on the site:</span></p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Hardware Information (CPU / GPU / Operating System)</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Which version of eden you are running</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The connected eden account</li></ul></body></html> true @@ -46,7 +46,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -84,7 +84,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -150,7 +150,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -202,7 +202,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -254,7 +254,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -313,7 +313,7 @@ - Qt::Vertical + Qt::Orientation::Vertical @@ -372,7 +372,7 @@ - Qt::Vertical + Qt::Orientation::Vertical diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui index 68c5a67b24..3a54d93b7b 100644 --- a/src/yuzu/configuration/configure_debug.ui +++ b/src/yuzu/configuration/configure_debug.ui @@ -424,7 +424,7 @@ - Enable Auto-Stub** + Enable Auto-Stub @@ -553,7 +553,7 @@ - **This will be reset automatically when yuzu closes. + **This will be reset automatically when eden closes. 20 diff --git a/src/yuzu/configuration/configure_graphics_extensions.ui b/src/yuzu/configuration/configure_graphics_extensions.ui index e9f5ace53e..df44b6c353 100644 --- a/src/yuzu/configuration/configure_graphics_extensions.ui +++ b/src/yuzu/configuration/configure_graphics_extensions.ui @@ -29,7 +29,7 @@ While it's recommended to use state 3, some games may perform better on lower states. Setting to 0 (disabled) may also break games. -If your device doesn't support the selected state, the renderer will automatically disable the unsupported states. +If your GPU is older (i.e. RX570/580 or older), it may not support these features. If this is the case, set the slider to 0 and uncheck all boxes. true diff --git a/src/yuzu/configuration/configure_input_advanced.ui b/src/yuzu/configuration/configure_input_advanced.ui index 2994d0ab48..2bdd137b08 100644 --- a/src/yuzu/configuration/configure_input_advanced.ui +++ b/src/yuzu/configuration/configure_input_advanced.ui @@ -2656,7 +2656,7 @@ - Requires restarting yuzu + Requires restarting eden @@ -2698,7 +2698,7 @@ - Requires restarting yuzu + Requires restarting eden @@ -2714,7 +2714,7 @@ - Requires restarting yuzu + Requires restarting eden diff --git a/src/yuzu/configuration/configure_input_player.ui b/src/yuzu/configuration/configure_input_player.ui index 012379a477..b8e0465386 100644 --- a/src/yuzu/configuration/configure_input_player.ui +++ b/src/yuzu/configuration/configure_input_player.ui @@ -1363,55 +1363,6 @@ - - - - Plus - - - Qt::AlignmentFlag::AlignCenter - - - - 3 - - - 3 - - - 3 - - - 3 - - - 3 - - - - - - 70 - 0 - - - - - 68 - 16777215 - - - - min-width: 68px; - - - Plus - - - - - - @@ -1461,6 +1412,55 @@ + + + + Plus + + + Qt::AlignmentFlag::AlignCenter + + + + 3 + + + 3 + + + 3 + + + 3 + + + 3 + + + + + + 70 + 0 + + + + + 68 + 16777215 + + + + min-width: 68px; + + + Plus + + + + + + diff --git a/src/yuzu/configuration/configure_motion_touch.cpp b/src/yuzu/configuration/configure_motion_touch.cpp index 6372ed4812..7a1cee463b 100644 --- a/src/yuzu/configuration/configure_motion_touch.cpp +++ b/src/yuzu/configuration/configure_motion_touch.cpp @@ -85,7 +85,7 @@ ConfigureMotionTouch::ConfigureMotionTouch(QWidget* parent, ui->udp_learn_more->setOpenExternalLinks(true); ui->udp_learn_more->setText( tr("Learn More")); diff --git a/src/yuzu/configuration/configure_tas.ui b/src/yuzu/configuration/configure_tas.ui index 625af0c891..d24f54b77b 100644 --- a/src/yuzu/configuration/configure_tas.ui +++ b/src/yuzu/configuration/configure_tas.ui @@ -14,7 +14,7 @@ - <html><head/><body><p>Reads controller input from scripts in the same format as TAS-nx scripts.<br/>For a more detailed explanation, please consult the <a href="https://yuzu-emu.org/help/feature/tas/"><span style=" text-decoration: underline; color:#039be5;">help page</span></a> on the yuzu website.</p></body></html> + <html><head/><body><p>Reads controller input from scripts in the same format as TAS-nx scripts.<br/>For a more detailed explanation, please consult the <a href="https://eden-emulator.github.io/help/feature/tas/"><span style=" text-decoration: underline; color:#039be5;">help page</span></a> on the eden website.</p></body></html> true diff --git a/src/yuzu/configuration/configure_touchscreen_advanced.ui b/src/yuzu/configuration/configure_touchscreen_advanced.ui index 88e7cf0506..6dce2e0097 100644 --- a/src/yuzu/configuration/configure_touchscreen_advanced.ui +++ b/src/yuzu/configuration/configure_touchscreen_advanced.ui @@ -23,7 +23,7 @@ - Warning: The settings in this page affect the inner workings of yuzu's emulated touchscreen. Changing them may result in undesirable behavior, such as the touchscreen partially or not working. You should only use this page if you know what you are doing. + Warning: The settings in this page affect the inner workings of eden's emulated touchscreen. Changing them may result in undesirable behavior, such as the touchscreen partially or not working. You should only use this page if you know what you are doing. true diff --git a/src/yuzu/configuration/configure_web.cpp b/src/yuzu/configuration/configure_web.cpp index 1f579a21e2..a513e1c1b0 100644 --- a/src/yuzu/configuration/configure_web.cpp +++ b/src/yuzu/configuration/configure_web.cpp @@ -66,7 +66,7 @@ void ConfigureWeb::RetranslateUI() { "color:#039be5;\">Sign up")); ui->web_token_info_link->setText( - tr("What is my token?")); } diff --git a/src/yuzu/configuration/configure_web.ui b/src/yuzu/configuration/configure_web.ui index af86e476e1..942fb05b26 100644 --- a/src/yuzu/configuration/configure_web.ui +++ b/src/yuzu/configuration/configure_web.ui @@ -22,13 +22,13 @@ - yuzu Web Service + eden Web Service - By providing your username and token, you agree to allow yuzu to collect additional usage data, which may include user identifying information. + By providing your username and token, you agree to allow eden to collect additional usage data, which may include user identifying information. diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 6307daeb5a..02bb9a322f 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -289,10 +289,10 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Ui General INSERT(UISettings, select_user_on_boot, tr("Prompt for user on game boot"), - tr("Ask to select a user profile on each boot, useful if multiple people use yuzu on " + tr("Ask to select a user profile on each boot, useful if multiple people use eden on " "the same PC.")); INSERT(UISettings, pause_when_in_background, tr("Pause emulation when in background"), - tr("This setting pauses yuzu when focusing other windows.")); + tr("This setting pauses eden when focusing other windows.")); INSERT(UISettings, confirm_before_stopping, tr("Confirm before stopping emulation"), tr("This setting overrides game prompts asking to confirm stopping the game.\nEnabling " "it bypasses such prompts and directly exits the emulation.")); @@ -544,7 +544,9 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { { PAIR(MemoryLayout, Memory_4Gb, tr("4GB DRAM (Default)")), PAIR(MemoryLayout, Memory_6Gb, tr("6GB DRAM (Unsafe)")), - PAIR(MemoryLayout, Memory_8Gb, tr("8GB DRAM (Unsafe)")), + PAIR(MemoryLayout, Memory_8Gb, tr("8GB DRAM")), + PAIR(MemoryLayout, Memory_10Gb, tr("10GB DRAM (Unsafe)")), + PAIR(MemoryLayout, Memory_12Gb, tr("12GB DRAM (Unsafe)")), }}); translations->insert({Settings::EnumMetadata::Index(), { diff --git a/src/yuzu/discord_impl.cpp b/src/yuzu/discord_impl.cpp index 57b50abd0d..7ed400c955 100644 --- a/src/yuzu/discord_impl.cpp +++ b/src/yuzu/discord_impl.cpp @@ -16,7 +16,6 @@ #include "core/core.h" #include "core/loader/loader.h" #include "yuzu/discord_impl.h" -#include "yuzu/uisettings.h" namespace DiscordRPC { @@ -24,7 +23,7 @@ DiscordImpl::DiscordImpl(Core::System& system_) : system{system_} { DiscordEventHandlers handlers{}; // The number is the client ID for yuzu, it's used for images and the // application name - Discord_Initialize("712465656758665259", &handlers, 1, nullptr); + Discord_Initialize("1371246384434380841", &handlers, 1, nullptr); } DiscordImpl::~DiscordImpl() { @@ -62,8 +61,9 @@ std::string DiscordImpl::GetGameString(const std::string& title) { } void DiscordImpl::UpdateGameStatus(bool use_default) { - const std::string default_text = "yuzu is an emulator for the Nintendo Switch"; - const std::string default_image = "yuzu_logo"; + const std::string default_text = "eden is an emulator for the Nintendo Switch"; + const std::string default_image = "https://git.eden-emu.dev/eden-emu/eden/raw/branch/master/" + "dist/qt_themes/default/icons/256x256/eden_named.png"; const std::string url = use_default ? default_image : game_url; s64 start_time = std::chrono::duration_cast( std::chrono::system_clock::now().time_since_epoch()) @@ -81,15 +81,18 @@ void DiscordImpl::UpdateGameStatus(bool use_default) { } void DiscordImpl::Update() { - const std::string default_text = "yuzu is an emulator for the Nintendo Switch"; - const std::string default_image = "yuzu_logo"; + const std::string default_text = "eden is an emulator for the Nintendo Switch"; + const std::string default_image = "https://git.eden-emu.dev/eden-emu/eden/raw/branch/master/" + "dist/qt_themes/default/icons/256x256/eden_named.png"; if (system.IsPoweredOn()) { system.GetAppLoader().ReadTitle(game_title); // Used to format Icon URL for yuzu website game compatibility page std::string icon_name = GetGameString(game_title); - game_url = fmt::format("https://yuzu-emu.org/images/game/boxart/{}.png", icon_name); + game_url = fmt::format( + "https://raw.githubusercontent.com/eden-emulator/boxart/refs/heads/master/img/{}.png", + icon_name); QNetworkAccessManager manager; QNetworkRequest request; @@ -100,6 +103,7 @@ void DiscordImpl::Update() { QObject::connect(reply, &QNetworkReply::finished, &request_event_loop, &QEventLoop::quit); request_event_loop.exec(); UpdateGameStatus(reply->error()); + return; } diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 30a6886d73..ced89a6287 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -374,20 +374,36 @@ GameList::GameList(FileSys::VirtualFilesystem vfs_, FileSys::ManualContentProvid warning_layout = new QHBoxLayout; pre_alpha_warning = new QLabel; pre_alpha_warning->setText( - tr("IMPORTANT: Eden is PRE-ALPHA SOFTWARE." + tr("IMPORTANT: Eden is PRE-ALPHA SOFTWARE. " "Bugs and unfinished features are expected to be present at this stage.")); pre_alpha_warning->setWordWrap(true); pre_alpha_warning->setOpenExternalLinks(true); pre_alpha_warning->setStyleSheet( QString::fromStdString("color: black; font-weight: bold;")); - warning_layout->addWidget(pre_alpha_warning); + warning_dont_show_again = new QPushButton(this); + warning_dont_show_again->setStyleSheet( + QString::fromStdString("color: #DFDFDF; background-color: #383838;")); + warning_dont_show_again->setText(tr("Don't Show Again")); + connect(warning_dont_show_again, &QPushButton::clicked, this, [=, this] { + Settings::values.hide_pre_alpha_warning.SetValue(true); + + layout->removeWidget(warning_widget); + warning_widget->hide(); + }); + + warning_layout->addWidget(pre_alpha_warning, 1); + warning_layout->addWidget(warning_dont_show_again); warning_layout->setContentsMargins(3, 3, 3, 3); warning_widget = new QWidget; warning_widget->setStyleSheet(QString::fromStdString("background-color: khaki;")); warning_widget->setLayout(warning_layout); - layout->addWidget(warning_widget); + if (!Settings::values.hide_pre_alpha_warning.GetValue()) { + layout->addWidget(warning_widget); + } else { + warning_widget->hide(); + } layout->addWidget(tree_view); layout->addWidget(search_field); diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h index d51110758a..a7f0201709 100644 --- a/src/yuzu/game_list.h +++ b/src/yuzu/game_list.h @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -172,8 +173,10 @@ private: QFileSystemWatcher* watcher = nullptr; ControllerNavigation* controller_navigation = nullptr; CompatibilityList compatibility_list; + QHBoxLayout* warning_layout = nullptr; QWidget* warning_widget = nullptr; + QPushButton* warning_dont_show_again = nullptr; QLabel* pre_alpha_warning = nullptr; friend class GameListSearchField; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 8cd20a452d..497c519f74 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -439,7 +439,7 @@ GMainWindow::GMainWindow(bool has_broken_vulkan) QMessageBox::warning(this, tr("Broken Vulkan Installation Detected"), tr("Vulkan initialization failed during boot.

Click " "here for instructions to fix the issue.")); @@ -1592,6 +1592,7 @@ void GMainWindow::ConnectMenuEvents() { // Help connect_menu(ui->action_Open_yuzu_Folder, &GMainWindow::OnOpenYuzuFolder); + connect_menu(ui->action_Discord, &GMainWindow::OnOpenDiscord); connect_menu(ui->action_Verify_installed_contents, &GMainWindow::OnVerifyInstalledContents); connect_menu(ui->action_Install_Firmware, &GMainWindow::OnInstallFirmware); connect_menu(ui->action_Install_Keys, &GMainWindow::OnInstallDecryptionKeys); @@ -1806,11 +1807,11 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa msg->setWindowTitle(tr("Game Updates Warning")); msg->setIcon(QMessageBox::Warning); msg->setText(tr("The game you are trying to launch is known to have performance or booting " - "issues when updates are applied. It's recommended to disable any updates " - "to this game before attempting to launch, or switch to an earlier update. " - "If you don't have any updates installed or enabled, you can safely ignore " - "this message.

Press \"OK\" to continue launching, or \"Cancel\" to " - "cancel the launch.")); + "issues when updates are applied. Please try increasing the memory layout to " + "6GB or 8GB if any issues occur.

Press \"OK\" to continue launching, or " + "\"Cancel\" to cancel the launch.")); + + // TODO: TMP: Recommends more memory for TotK. msg->setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); @@ -1859,7 +1860,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa "outdated format that has been superseded by others such as NCA, NAX, XCI, or " "NSP. Deconstructed ROM directories lack icons, metadata, and update " "support.

For an explanation of the various Switch formats eden supports, check out our " + "href='https://eden-emulator.github.io/wiki/overview-of-switch-game-formats'>check out our " "wiki. This message will not be shown again.")); } @@ -1877,7 +1878,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa "This is usually caused by outdated GPU drivers, including integrated ones. " "Please see the log for more details. " "For more information on accessing the log, please see the following page: " - "" + "" "How to Upload the Log File. ")); break; default: @@ -2882,7 +2883,7 @@ void GMainWindow::OnGameListNavigateToGamedbEntry(u64 program_id, directory = it->second.second; } - QDesktopServices::openUrl(QUrl(QStringLiteral("https://yuzu-emu.org/game/") + directory)); + QDesktopServices::openUrl(QUrl(QStringLiteral("https://eden-emulator.github.io/game/") + directory)); } bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, @@ -3040,8 +3041,8 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi } // Create icon file path - out_icon_path /= (program_id == 0 ? fmt::format("yuzu-{}.{}", game_file_name, ico_extension) - : fmt::format("yuzu-{:016X}.{}", program_id, ico_extension)); + out_icon_path /= (program_id == 0 ? fmt::format("eden-{}.{}", game_file_name, ico_extension) + : fmt::format("eden-{:016X}.{}", program_id, ico_extension)); return true; } @@ -3596,8 +3597,8 @@ void GMainWindow::OnMenuReportCompatibility() { } else { QMessageBox::critical( this, tr("Missing yuzu Account"), - tr("In order to submit a game compatibility test case, you must link your yuzu " - "account.

To link your yuzu account, go to Emulation > Configuration " + tr("In order to submit a game compatibility test case, you must link your eden " + "account.

To link your eden account, go to Emulation > Configuration " "> " "Web.")); } @@ -3621,11 +3622,16 @@ void GMainWindow::OnOpenModsPage() { } void GMainWindow::OnOpenQuickstartGuide() { - OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/help/quickstart/"))); + OpenURL(QUrl(QStringLiteral("https://yuzu-mirror.github.io/help/quickstart/"))); } void GMainWindow::OnOpenFAQ() { - OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/wiki/faq/"))); + OpenURL(QUrl(QStringLiteral("https://eden-emulator.github.io/"))); +} + +void GMainWindow::OnOpenDiscord() +{ + OpenURL(QUrl(QStringLiteral("https://discord.gg/edenemu"))); } void GMainWindow::ToggleFullscreen() { @@ -4199,7 +4205,7 @@ void GMainWindow::OnInstallFirmware() { if (!ContentManager::AreKeysPresent()) { QMessageBox::information( this, tr("Keys not installed"), - tr("Install decryption keys and restart yuzu before attempting to install firmware.")); + tr("Install decryption keys and restart eden before attempting to install firmware.")); return; } diff --git a/src/yuzu/main.h b/src/yuzu/main.h index a6e3bbaa6c..5afec3d199 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -338,6 +338,7 @@ private slots: void OnOpenModsPage(); void OnOpenQuickstartGuide(); void OnOpenFAQ(); + void OnOpenDiscord(); /// Called whenever a user selects a game in the game list widget. void OnGameListLoadFile(QString game_path, u64 program_id); void OnGameListOpenFolder(u64 program_id, GameListOpenTarget target, diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index 03078c0126..fbecd9eee3 100644 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui @@ -188,6 +188,7 @@ +
@@ -484,6 +485,11 @@ Open Home Menu
+ + + &Discord + + diff --git a/src/yuzu/migration_worker.cpp b/src/yuzu/migration_worker.cpp new file mode 100644 index 0000000000..2bb6eee944 --- /dev/null +++ b/src/yuzu/migration_worker.cpp @@ -0,0 +1,123 @@ +#include "migration_worker.h" + +#include + +#include "common/fs/path_util.h" + +MigrationWorker::MigrationWorker(const LegacyEmu selected_legacy_emu_, + const bool clear_shader_cache_, + const MigrationStrategy strategy_) + : QObject() + , selected_legacy_emu(selected_legacy_emu_) + , clear_shader_cache(clear_shader_cache_) + , strategy(strategy_) +{} + +void MigrationWorker::process() +{ + namespace fs = std::filesystem; + const auto copy_options = fs::copy_options::update_existing | fs::copy_options::recursive; + + std::string legacy_user_dir; + std::string legacy_config_dir; + std::string legacy_cache_dir; + +#define LEGACY_EMU(emu) \ + case LegacyEmu::emu: \ + legacy_user_dir = Common::FS::GetLegacyPath(Common::FS::LegacyPath::emu##Dir).string(); \ + legacy_config_dir = Common::FS::GetLegacyPath(Common::FS::LegacyPath::emu##ConfigDir) \ + .string(); \ + legacy_cache_dir = Common::FS::GetLegacyPath(Common::FS::LegacyPath::emu##CacheDir) \ + .string(); \ + break; + + switch (selected_legacy_emu) { + LEGACY_EMU(Citron) + LEGACY_EMU(Sudachi) + LEGACY_EMU(Yuzu) + LEGACY_EMU(Suyu) + } + +#undef LEGACY_EMU + + fs::path eden_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::EdenDir); + fs::path config_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::ConfigDir); + fs::path cache_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir); + fs::path shader_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::ShaderDir); + + try { + fs::remove_all(eden_dir); + } catch (fs::filesystem_error &_) { + // ignore because linux does stupid crap sometimes. + } + + switch (strategy) { + case MigrationStrategy::Link: + // Create symlinks/directory junctions if requested + + // Windows 11 has random permission nonsense to deal with. + try { + fs::create_directory_symlink(legacy_user_dir, eden_dir); + } catch (const fs::filesystem_error &e) { + emit error(tr("Linking the old directory failed. You may need to re-run with " + "administrative privileges on Windows.\nOS gave error: %1") + .arg(tr(e.what()))); + return; + } + +// Windows doesn't need any more links, because cache and config +// are already children of the root directory +#ifndef WIN32 + if (fs::is_directory(legacy_config_dir)) { + fs::create_directory_symlink(legacy_config_dir, config_dir); + } + + if (fs::is_directory(legacy_cache_dir)) { + fs::create_directory_symlink(legacy_cache_dir, cache_dir); + } +#endif + break; + case MigrationStrategy::Move: + // Rename directories if deletion is requested (achieves the same result) + fs::rename(legacy_user_dir, eden_dir); + +// Windows doesn't need any more renames, because cache and config +// are already children of the root directory +#ifndef WIN32 + if (fs::is_directory(legacy_config_dir)) { + fs::rename(legacy_config_dir, config_dir); + } + + if (fs::is_directory(legacy_cache_dir)) { + fs::rename(legacy_cache_dir, cache_dir); + } +#endif + break; + case MigrationStrategy::Copy: + default: + // Default behavior: copy + fs::copy(legacy_user_dir, eden_dir, copy_options); + + if (fs::is_directory(legacy_config_dir)) { + fs::copy(legacy_config_dir, config_dir, copy_options); + } + + if (fs::is_directory(legacy_cache_dir)) { + fs::copy(legacy_cache_dir, cache_dir, copy_options); + } + + success_text.append(tr("\n\nIf you wish to clean up the files which were left in the old " + "data location, you can do so by deleting the following directory:\n" + "%1") + .arg(QString::fromStdString(legacy_user_dir))); + break; + } + + // Delete and re-create shader dir + if (clear_shader_cache) { + fs::remove_all(shader_dir); + fs::create_directory(shader_dir); + } + + emit finished(success_text); +} diff --git a/src/yuzu/migration_worker.h b/src/yuzu/migration_worker.h new file mode 100644 index 0000000000..49bb695b32 --- /dev/null +++ b/src/yuzu/migration_worker.h @@ -0,0 +1,41 @@ +#ifndef MIGRATION_WORKER_H +#define MIGRATION_WORKER_H + +#include + +class MigrationWorker : public QObject +{ + Q_OBJECT +public: + enum class LegacyEmu { + Citron, + Sudachi, + Yuzu, + Suyu, + }; + + enum class MigrationStrategy { + Copy, + Move, + Link, + }; + + MigrationWorker(const LegacyEmu selected_legacy_emu, + const bool clear_shader_cache, + const MigrationStrategy strategy); + +public slots: + void process(); + +signals: + void finished(const QString &success_text); + void error(const QString &error_message); + +private: + LegacyEmu selected_legacy_emu; + bool clear_shader_cache; + MigrationStrategy strategy; + QString success_text = tr("Data was migrated successfully."); +}; + +#endif // MIGRATION_WORKER_H diff --git a/src/yuzu/multiplayer/host_room.cpp b/src/yuzu/multiplayer/host_room.cpp index ef364ee43a..09f783ad9f 100644 --- a/src/yuzu/multiplayer/host_room.cpp +++ b/src/yuzu/multiplayer/host_room.cpp @@ -58,7 +58,7 @@ HostRoomWindow::HostRoomWindow(QWidget* parent, QStandardItemModel* list, ui->username->setText( QString::fromStdString(UISettings::values.multiplayer_room_nickname.GetValue())); if (ui->username->text().isEmpty() && !Settings::values.yuzu_username.GetValue().empty()) { - // Use yuzu Web Service user name as nickname by default + // Use eden Web Service user name as nickname by default ui->username->setText(QString::fromStdString(Settings::values.yuzu_username.GetValue())); } ui->room_name->setText( @@ -184,7 +184,7 @@ void HostRoomWindow::Host() { QMessageBox::warning( this, tr("Error"), tr("Failed to announce the room to the public lobby. In order to host a " - "room publicly, you must have a valid yuzu account configured in " + "room publicly, you must have a valid eden account configured in " "Emulation -> Configure -> Web. If you do not want to publish a room in " "the public lobby, then select Unlisted instead.\nDebug Message: ") + QString::fromStdString(result.result_string), diff --git a/src/yuzu/user_data_migration.cpp b/src/yuzu/user_data_migration.cpp index 1946254fb2..1585695ff0 100644 --- a/src/yuzu/user_data_migration.cpp +++ b/src/yuzu/user_data_migration.cpp @@ -14,15 +14,17 @@ #include "migration_dialog.h" // Needs to be included at the end due to https://bugreports.qt.io/browse/QTBUG-73263 +#include #include #include +#include #include +#include #include namespace fs = std::filesystem; -UserDataMigrator::UserDataMigrator( - QMainWindow *main_window) +UserDataMigrator::UserDataMigrator(QMainWindow *main_window) { // NOTE: Logging is not initialized yet, do not produce logs here. @@ -34,8 +36,7 @@ UserDataMigrator::UserDataMigrator( } } -void UserDataMigrator::ShowMigrationPrompt( - QMainWindow *main_window) +void UserDataMigrator::ShowMigrationPrompt(QMainWindow *main_window) { namespace fs = std::filesystem; @@ -90,15 +91,15 @@ void UserDataMigrator::ShowMigrationPrompt( // Reflection would make this code 10x better // but for now... MACRO MADNESS!!!! QMap found; - QMap legacyMap; + QMap legacyMap; QMap buttonMap; #define EMU_MAP(name) \ const bool name##_found = fs::is_directory( \ Common::FS::GetLegacyPath(Common::FS::LegacyPath::name##Dir)); \ - legacyMap[main_window->tr(#name)] = LegacyEmu::name; \ - found[main_window->tr(#name)] = name##_found; \ - if (name##_found) \ + legacyMap[main_window->tr(#name)] = MigrationWorker::LegacyEmu::name; \ + found[main_window->tr(#name)] = name##_found; \ + if (name##_found) \ any_found = true; EMU_MAP(Citron) @@ -118,7 +119,15 @@ void UserDataMigrator::ShowMigrationPrompt( if (!iter.value()) continue; - buttonMap[iter.key()] = migration_prompt.addButton(iter.key()); + QAbstractButton *button = migration_prompt.addButton(iter.key()); + // TMP: disable citron + if (iter.key() == main_window->tr("Citron")) { + button->setEnabled(false); + button->setToolTip( + main_window->tr("Citron migration is known to cause issues. It's recommended " + "to manually set up your data again.")); + } + buttonMap[iter.key()] = button; promptText.append(main_window->tr("\n- %1").arg(iter.key())); } @@ -129,13 +138,13 @@ void UserDataMigrator::ShowMigrationPrompt( migration_prompt.exec(); - MigrationStrategy strategy; + MigrationWorker::MigrationStrategy strategy; if (link->isChecked()) { - strategy = MigrationStrategy::Link; + strategy = MigrationWorker::MigrationStrategy::Link; } else if (clear_old->isChecked()) { - strategy = MigrationStrategy::Move; + strategy = MigrationWorker::MigrationStrategy::Move; } else { - strategy = MigrationStrategy::Copy; + strategy = MigrationWorker::MigrationStrategy::Copy; } QMapIterator buttonIter(buttonMap); @@ -159,8 +168,7 @@ void UserDataMigrator::ShowMigrationPrompt( return; } -void UserDataMigrator::ShowMigrationCancelledMessage( - QMainWindow *main_window) +void UserDataMigrator::ShowMigrationCancelledMessage(QMainWindow *main_window) { QMessageBox::information(main_window, main_window->tr("Migration"), @@ -173,107 +181,38 @@ void UserDataMigrator::ShowMigrationCancelledMessage( QMessageBox::Ok); } -void UserDataMigrator::MigrateUserData( - QMainWindow *main_window, - const LegacyEmu selected_legacy_emu, - const bool clear_shader_cache, - const MigrationStrategy strategy) +void UserDataMigrator::MigrateUserData(QMainWindow *main_window, + const MigrationWorker::LegacyEmu selected_legacy_emu, + const bool clear_shader_cache, + const MigrationWorker::MigrationStrategy strategy) { - namespace fs = std::filesystem; - const auto copy_options = fs::copy_options::update_existing | fs::copy_options::recursive; + // Create a dialog to let the user know it's migrating, some users noted confusion. + QProgressDialog *progress = new QProgressDialog(main_window); + progress->setWindowTitle(main_window->tr("Migrating")); + progress->setLabelText(main_window->tr("Migrating, this may take a while...")); + progress->setRange(0, 0); + progress->setCancelButton(nullptr); + progress->setWindowModality(Qt::WindowModality::ApplicationModal); - QString success_text = main_window->tr("Data was migrated successfully."); + QThread *thread = new QThread(main_window); + MigrationWorker *worker = new MigrationWorker(selected_legacy_emu, clear_shader_cache, strategy); + worker->moveToThread(thread); - std::string legacy_user_dir; - std::string legacy_config_dir; - std::string legacy_cache_dir; + thread->connect(thread, &QThread::started, worker, &MigrationWorker::process); -#define LEGACY_EMU(emu) \ -case LegacyEmu::emu: \ - legacy_user_dir = Common::FS::GetLegacyPath(Common::FS::LegacyPath::emu##Dir).string(); \ - legacy_config_dir = Common::FS::GetLegacyPath(Common::FS::LegacyPath::emu##ConfigDir) \ - .string(); \ - legacy_cache_dir = Common::FS::GetLegacyPath(Common::FS::LegacyPath::emu##CacheDir) \ - .string(); \ - break; + thread->connect(worker, &MigrationWorker::finished, progress, [=](const QString &success_text) { + progress->close(); + QMessageBox::information(main_window, + main_window->tr("Migration"), + success_text, + QMessageBox::Ok); - switch (selected_legacy_emu) { - LEGACY_EMU(Citron) - LEGACY_EMU(Sudachi) - LEGACY_EMU(Yuzu) - LEGACY_EMU(Suyu) - } + thread->quit(); + }); -#undef LEGACY_EMU + thread->connect(worker, &MigrationWorker::finished, worker, &QObject::deleteLater); + thread->connect(thread, &QThread::finished, thread, &QObject::deleteLater); - fs::path eden_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::EdenDir); - fs::path config_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::ConfigDir); - fs::path cache_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir); - fs::path shader_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::ShaderDir); - - fs::remove_all(eden_dir); - - switch (strategy) { - case MigrationStrategy::Link: - // Create symlinks/directory junctions if requested - fs::create_directory_symlink(legacy_user_dir, eden_dir); - -// Windows doesn't need any more links, because cache and config -// are already children of the root directory -#ifndef WIN32 - if (fs::is_directory(legacy_config_dir)) { - fs::create_directory_symlink(legacy_config_dir, config_dir); - } - - if (fs::is_directory(legacy_cache_dir)) { - fs::create_directory_symlink(legacy_cache_dir, cache_dir); - } -#endif - break; - case MigrationStrategy::Move: - // Rename directories if deletion is requested (achieves the same result) - fs::rename(legacy_user_dir, eden_dir); - -// Windows doesn't need any more renames, because cache and config -// are already children of the root directory -#ifndef WIN32 - if (fs::is_directory(legacy_config_dir)) { - fs::rename(legacy_config_dir, config_dir); - } - - if (fs::is_directory(legacy_cache_dir)) { - fs::rename(legacy_cache_dir, cache_dir); - } -#endif - break; - case MigrationStrategy::Copy: - default: - // Default behavior: copy - fs::copy(legacy_user_dir, eden_dir, copy_options); - - if (fs::is_directory(legacy_config_dir)) { - fs::copy(legacy_config_dir, config_dir, copy_options); - } - - if (fs::is_directory(legacy_cache_dir)) { - fs::copy(legacy_cache_dir, cache_dir, copy_options); - } - - success_text.append( - main_window->tr("\n\nIf you wish to clean up the files which were left in the old " - "data location, you can do so by deleting the following directory:\n" - "%1").arg(QString::fromStdString(legacy_user_dir))); - break; - } - - // Delete and re-create shader dir - if (clear_shader_cache) { - fs::remove_all(shader_dir); - fs::create_directory(shader_dir); - } - - QMessageBox::information(main_window, - main_window->tr("Migration"), - success_text, - QMessageBox::Ok); + thread->start(); + progress->exec(); } diff --git a/src/yuzu/user_data_migration.h b/src/yuzu/user_data_migration.h index 3c4f745b87..fbf76eb334 100644 --- a/src/yuzu/user_data_migration.h +++ b/src/yuzu/user_data_migration.h @@ -8,27 +8,17 @@ #pragma once #include +#include "migration_worker.h" class UserDataMigrator { public: UserDataMigrator(QMainWindow* main_window); private: - enum class LegacyEmu { - Citron, - Sudachi, - Yuzu, - Suyu, - }; - - enum class MigrationStrategy { - Copy, - Move, - Link, - }; - void ShowMigrationPrompt(QMainWindow* main_window); void ShowMigrationCancelledMessage(QMainWindow* main_window); - void MigrateUserData(QMainWindow* main_window, const LegacyEmu selected_legacy_emu, - const bool clear_shader_cache, const MigrationStrategy strategy); + void MigrateUserData(QMainWindow* main_window, + const MigrationWorker::LegacyEmu selected_legacy_emu, + const bool clear_shader_cache, + const MigrationWorker::MigrationStrategy strategy); }; diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index eae614f9d0..3974e4b357 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp @@ -223,10 +223,12 @@ void EmuWindow_SDL2::WaitEvent() { const u32 current_time = SDL_GetTicks(); if (current_time > last_time + 2000) { const auto results = system.GetAndResetPerfStats(); - const auto title = - fmt::format("yuzu {} | {}-{} | FPS: {:.0f} ({:.0f}%)", Common::g_build_fullname, - Common::g_scm_branch, Common::g_scm_desc, results.average_game_fps, - results.emulation_speed * 100.0); + const auto title = fmt::format("eden {} | {}-{} | FPS: {:.0f} ({:.0f}%)", + Common::g_build_fullname, + Common::g_scm_branch, + Common::g_scm_desc, + results.average_game_fps, + results.emulation_speed * 100.0); SDL_SetWindowTitle(render_window, title.c_str()); last_time = current_time; } @@ -236,7 +238,7 @@ void EmuWindow_SDL2::WaitEvent() { void EmuWindow_SDL2::SetWindowIcon() { SDL_RWops* const yuzu_icon_stream = SDL_RWFromConstMem((void*)yuzu_icon, yuzu_icon_size); if (yuzu_icon_stream == nullptr) { - LOG_WARNING(Frontend, "Failed to create yuzu icon stream."); + LOG_WARNING(Frontend, "Failed to create eden icon stream."); return; } SDL_Surface* const window_icon = SDL_LoadBMP_RW(yuzu_icon_stream, 1); diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp index 35e8aeda79..2e90be35ae 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp @@ -90,7 +90,7 @@ EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsyste } SDL_GL_SetSwapInterval(0); - std::string window_title = fmt::format("yuzu {} | {}-{}", Common::g_build_fullname, + std::string window_title = fmt::format("eden {} | {}-{}", Common::g_build_fullname, Common::g_scm_branch, Common::g_scm_desc); render_window = SDL_CreateWindow(window_title.c_str(), diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_null.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_null.cpp index a969c1c291..043cdbf68d 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_null.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_null.cpp @@ -23,7 +23,7 @@ EmuWindow_SDL2_Null::EmuWindow_SDL2_Null(InputCommon::InputSubsystem* input_subsystem_, Core::System& system_, bool fullscreen) : EmuWindow_SDL2{input_subsystem_, system_} { - const std::string window_title = fmt::format("yuzu {} | {}-{} (Vulkan)", Common::g_build_name, + const std::string window_title = fmt::format("eden {} | {}-{} (Vulkan)", Common::g_build_name, Common::g_scm_branch, Common::g_scm_desc); render_window = SDL_CreateWindow(window_title.c_str(), SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp index c8378a5179..f4980932ed 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp @@ -18,8 +18,10 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem_, Core::System& system_, bool fullscreen) : EmuWindow_SDL2{input_subsystem_, system_} { - const std::string window_title = fmt::format("yuzu {} | {}-{} (Vulkan)", Common::g_build_name, - Common::g_scm_branch, Common::g_scm_desc); + const std::string window_title = fmt::format("eden {} | {}-{} (Vulkan)", + Common::g_build_name, + Common::g_scm_branch, + Common::g_scm_desc); render_window = SDL_CreateWindow(window_title.c_str(), SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, Layout::ScreenUndocked::Width, Layout::ScreenUndocked::Height, diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 790d630aad..35dc58e4e9 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp @@ -81,7 +81,7 @@ static void PrintHelp(const char* argv0) { } static void PrintVersion() { - std::cout << "yuzu " << Common::g_scm_branch << " " << Common::g_scm_desc << std::endl; + std::cout << "eden " << Common::g_scm_branch << " " << Common::g_scm_desc << std::endl; } static void OnStateChanged(const Network::RoomMember::State& state) { @@ -394,9 +394,11 @@ int main(int argc, char** argv) { const u16 error_id = static_cast(load_result) - loader_id; LOG_CRITICAL(Frontend, "While attempting to load the ROM requested, an error occurred. Please " - "refer to the yuzu wiki for more information or the yuzu discord for " + "refer to the eden wiki for more information or the eden discord for " "additional help.\n\nError Code: {:04X}-{:04X}\nError Description: {}", - loader_id, error_id, static_cast(error_id)); + loader_id, + error_id, + static_cast(error_id)); } break; } From 5608ab1cd485083e81cef5cd4bd5132f03d97077 Mon Sep 17 00:00:00 2001 From: Pavel Barabanov Date: Mon, 12 May 2025 03:11:56 +0300 Subject: [PATCH 03/26] everything related to the FW 20 has been deleted. --- src/core/hle/service/acc/acc.cpp | 18 +---- src/core/hle/service/acc/acc_su.cpp | 11 --- src/core/hle/service/acc/acc_u1.cpp | 3 - .../all_system_applet_proxies_service.cpp | 22 ------ .../all_system_applet_proxies_service.h | 1 - .../am/service/applet_common_functions.cpp | 2 - .../am/service/process_winding_controller.cpp | 7 +- .../am/service/process_winding_controller.h | 2 +- .../service/am/service/self_controller.cpp | 5 -- .../hle/service/am/service/self_controller.h | 1 - src/core/hle/service/caps/caps_a.cpp | 11 --- src/core/hle/service/caps/caps_a.h | 4 - src/core/hle/service/erpt/erpt.cpp | 2 - .../hle/service/filesystem/fsp/fsp_srv.cpp | 2 - src/core/hle/service/friend/friend.cpp | 15 ++-- src/core/hle/service/hid/hid_debug_server.cpp | 3 - src/core/hle/service/hid/hid_server.cpp | 8 +- src/core/hle/service/hid/hid_server.h | 2 +- .../hle/service/hid/hid_system_server.cpp | 12 --- src/core/hle/service/lm/lm.cpp | 2 - src/core/hle/service/mii/mii.cpp | 2 - src/core/hle/service/nifm/nifm.cpp | 8 +- .../ns/application_manager_interface.cpp | 20 ----- .../ns/application_manager_interface.h | 3 - .../service/ns/platform_service_manager.cpp | 1 - .../service/pctl/parental_control_service.cpp | 39 +--------- .../service/pctl/parental_control_service.h | 2 - .../set/firmware_debug_settings_server.cpp | 1 - .../service/set/system_settings_server.cpp | 8 -- src/core/hle/service/ssl/ssl.cpp | 2 - src/core/hle/service/ssl/ssl_types.h | 76 ++----------------- .../resources/touch_screen/touch_screen.cpp | 4 +- .../resources/touch_screen/touch_screen.h | 2 +- .../touch_screen/touch_screen_resource.cpp | 2 +- .../touch_screen/touch_screen_resource.h | 2 +- 35 files changed, 27 insertions(+), 278 deletions(-) diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 7e4001ef92..1fff04eead 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -104,9 +104,7 @@ public: {160, nullptr, "RequiresUpdateNetworkServiceAccountIdTokenCache"}, {161, nullptr, "RequireReauthenticationOfNetworkServiceAccount"}, {170, nullptr, "CreateDeviceHistoryRequest"}, // 17.0.0+ - {180, nullptr, "GetRequestForNintendoAccountReauthentication"}, // 18.0.0+ - {181, nullptr, "CreateProcedureToReauthenticateNintendoAccount"}, // 20.0.0+ - {182, nullptr, "ResumeProcedureToReauthenticateNintendoAccount"}, // 20.0.0+ + {180, nullptr, "GetRequestForNintendoAccountReauthentication"} // 18.0.0+ }; // clang-format on @@ -196,12 +194,6 @@ public: {161, nullptr, "RequireReauthenticationOfNetworkServiceAccount"}, {170, nullptr, "CreateDeviceHistoryRequest"}, // 17.0.0+ {180, nullptr, "GetRequestForNintendoAccountReauthentication"}, // 18.0.0+ - {181, nullptr, "CreateProcedureToReauthenticateNintendoAccount"}, // 20.0.0+ - {182, nullptr, "ResumeProcedureToReauthenticateNintendoAccount"}, // 20.0.0+ - {183, nullptr, "GetNintendoAccountReauthenticationRequest"}, // 20.0.0+ - {190, nullptr, "GetDeviceMigrationInfo"}, // 20.0.0+ - {191, nullptr, "CheckDeviceMigrationAvailabilityAsync"}, // 20.0.0+ - {192, nullptr, "StartDeviceMigrationAsync"}, // 20.0.0+ {200, nullptr, "IsRegistered"}, {201, nullptr, "RegisterAsync"}, {202, nullptr, "UnregisterAsync"}, @@ -309,11 +301,6 @@ public: {101, nullptr, "IsNetworkServiceAccountReplaced"}, {199, nullptr, "GetUrlForIntroductionOfExtraMembership"}, // 2.0.0 - 5.1.0 {200, nullptr, "ApplyAsyncWithAuthorizedToken"}, - {210, nullptr, "IsProfileAvailable"}, // 17.0.0+ - {220, nullptr, "RegisterUserAsyncWithoutProfile"}, // 17.0.0+ - {221, nullptr, "RegisterUserWithProfileAsync"}, // 17.0.0+ - {230, nullptr, "RegisterUserWithLargeImageProfileAsync"}, // 18.0.0+ - {240, nullptr, "RegisterUserWithReauthenticationAsync"}, // 20.0.0+ }; // clang-format on @@ -768,8 +755,7 @@ public: {210, nullptr, "IsProfileAvailable"}, // 17.0.0+ {220, nullptr, "RegisterUserAsyncWithoutProfile"}, // 17.0.0+ {221, nullptr, "RegisterUserWithProfileAsync"}, // 17.0.0+ - {230, nullptr, "RegisterUserWithLargeImageProfileAsync"}, // 18.0.0+ - {240, nullptr, "RegisterUserWithReauthenticationAsync"}, // 20.0.0+ + {230, nullptr, "RegisterUserWithLargeImageProfileAsync"} // 18.0.0+ }; // clang-format on diff --git a/src/core/hle/service/acc/acc_su.cpp b/src/core/hle/service/acc/acc_su.cpp index 92662ade29..3a737341f8 100644 --- a/src/core/hle/service/acc/acc_su.cpp +++ b/src/core/hle/service/acc/acc_su.cpp @@ -53,26 +53,15 @@ ACC_SU::ACC_SU(std::shared_ptr module_, std::shared_ptr {212, nullptr, "ResumeProcedureToRegisterUserWithNintendoAccount"}, {230, nullptr, "AuthenticateServiceAsync"}, {250, nullptr, "GetBaasAccountAdministrator"}, - {251, nullptr, "SynchronizeNetworkServiceAccountsSnapshotAsync"}, // 20.0.0+ {290, nullptr, "ProxyProcedureForGuestLoginWithNintendoAccount"}, {291, nullptr, "ProxyProcedureForFloatingRegistrationWithNintendoAccount"}, - {292, nullptr, "ProxyProcedureForDeviceMigrationAuthenticatingOperatingUser"}, // 20.0.0+ - {293, nullptr, "ProxyProcedureForDeviceMigrationDownload"}, // 20.0.0+ {299, nullptr, "SuspendBackgroundDaemon"}, - {350, nullptr, "CreateDeviceMigrationUserExportRequest"}, // 20.0.0+ - {351, nullptr, "UploadNasCredential"}, // 20.0.0+ - {352, nullptr, "CreateDeviceMigrationUserImportRequest"}, // 20.0.0+ - {353, nullptr, "DeleteUserMigrationSaveData"}, // 20.0.0+ {400, nullptr, "SetPinCode"}, // 18.0.0+ {401, nullptr, "GetPinCodeLength"}, // 18.0.0+ {402, nullptr, "GetPinCode"}, // 18.0.0+ - {403, nullptr, "GetPinCodeParity"}, // 20.0.0+ - {404, nullptr, "VerifyPinCode"}, // 20.0.0+ - {405, nullptr, "IsPinCodeVerificationForbidden"}, // 20.0.0+ {410, nullptr, "GetPinCodeErrorCount"}, // 18.0.0+ {411, nullptr, "ResetPinCodeErrorCount"}, // 18.0.0+ {412, nullptr, "IncrementPinCodeErrorCount"}, // 18.0.0+ - {413, nullptr, "SetPinCodeErrorCount"}, // 20.0.0+ {900, nullptr, "SetUserUnqualifiedForDebug"}, {901, nullptr, "UnsetUserUnqualifiedForDebug"}, {902, nullptr, "ListUsersUnqualifiedForDebug"}, diff --git a/src/core/hle/service/acc/acc_u1.cpp b/src/core/hle/service/acc/acc_u1.cpp index ecc17ef31b..3832f5216d 100644 --- a/src/core/hle/service/acc/acc_u1.cpp +++ b/src/core/hle/service/acc/acc_u1.cpp @@ -42,9 +42,6 @@ ACC_U1::ACC_U1(std::shared_ptr module_, std::shared_ptr {191, nullptr, "ActivateOpenContextHolder"}, {401, nullptr, "GetPinCodeLength"}, // 18.0.0+ {402, nullptr, "GetPinCode"}, // 18.0.0+ - {403, nullptr, "GetPinCodeParity"}, // 20.0.0+ - {404, nullptr, "VerifyPinCode"}, // 20.0.0+ - {405, nullptr, "IsPinCodeVerificationForbidden"}, // 20.0.0+ {997, nullptr, "DebugInvalidateTokenCacheForUser"}, {998, nullptr, "DebugSetUserStateClose"}, {999, nullptr, "DebugSetUserStateOpen"}, diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp b/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp index fc9c77fc36..5a787494a8 100644 --- a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp +++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp @@ -18,7 +18,6 @@ IAllSystemAppletProxiesService::IAllSystemAppletProxiesService(Core::System& sys // clang-format off static const FunctionInfo functions[] = { {100, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxy"}, - {110, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxyForDebug>, "OpenSystemAppletProxyForDebug"}, {200, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld>, "OpenLibraryAppletProxyOld"}, {201, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxy>, "OpenLibraryAppletProxy"}, {300, nullptr, "OpenOverlayAppletProxy"}, @@ -26,7 +25,6 @@ IAllSystemAppletProxiesService::IAllSystemAppletProxiesService(Core::System& sys {400, nullptr, "CreateSelfLibraryAppletCreatorForDevelop"}, {410, nullptr, "GetSystemAppletControllerForDebug"}, {450, D<&IAllSystemAppletProxiesService::GetSystemProcessCommonFunctions>, "GetSystemProcessCommonFunctions"}, // 19.0.0+ - {460, nullptr, "Unknown460"}, {1000, nullptr, "GetDebugFunctions"}, }; // clang-format on @@ -51,26 +49,6 @@ Result IAllSystemAppletProxiesService::OpenSystemAppletProxy( } } -Result IAllSystemAppletProxiesService::OpenSystemAppletProxyForDebug( - Out> out_proxy, ClientProcessId pid) { - LOG_DEBUG(Service_AM, "OpenSystemAppletProxyForDebug called"); - - auto process = system.ApplicationProcess(); - if (!process) { - LOG_ERROR(Service_AM, "No application process available"); - R_THROW(ResultUnknown); - } - - if (const auto applet = GetAppletFromProcessId(pid)) { - *out_proxy = std::make_shared( - system, applet, process, m_window_system); - R_SUCCEED(); - } - - LOG_ERROR(Service_AM, "Applet not found for pid={}", pid.pid); - R_THROW(ResultUnknown); -} - Result IAllSystemAppletProxiesService::OpenLibraryAppletProxy( Out> out_library_applet_proxy, ClientProcessId pid, InCopyHandle process_handle, diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.h b/src/core/hle/service/am/service/all_system_applet_proxies_service.h index 72730ea55a..a3111c4c9b 100644 --- a/src/core/hle/service/am/service/all_system_applet_proxies_service.h +++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.h @@ -27,7 +27,6 @@ private: Result OpenSystemAppletProxy(Out> out_system_applet_proxy, ClientProcessId pid, InCopyHandle process_handle); - Result OpenSystemAppletProxyForDebug(Out> out_proxy, ClientProcessId pid); Result OpenLibraryAppletProxy(Out> out_library_applet_proxy, ClientProcessId pid, InCopyHandle process_handle, diff --git a/src/core/hle/service/am/service/applet_common_functions.cpp b/src/core/hle/service/am/service/applet_common_functions.cpp index ed203e979a..1c9cd74533 100644 --- a/src/core/hle/service/am/service/applet_common_functions.cpp +++ b/src/core/hle/service/am/service/applet_common_functions.cpp @@ -33,10 +33,8 @@ IAppletCommonFunctions::IAppletCommonFunctions(Core::System& system_, {100, nullptr, "SetApplicationCoreUsageMode"}, {300, D<&IAppletCommonFunctions::GetCurrentApplicationId>, "GetCurrentApplicationId"}, {310, nullptr, "IsSystemAppletHomeMenu"}, //19.0.0+ - {311, nullptr, "Unknown311"}, {320, nullptr, "SetGpuTimeSliceBoost"}, //19.0.0+ {321, nullptr, "SetGpuTimeSliceBoostDueToApplication"}, //19.0.0+ - {350, nullptr, "Unknown350"}, }; // clang-format on diff --git a/src/core/hle/service/am/service/process_winding_controller.cpp b/src/core/hle/service/am/service/process_winding_controller.cpp index a150248e71..10df830d70 100644 --- a/src/core/hle/service/am/service/process_winding_controller.cpp +++ b/src/core/hle/service/am/service/process_winding_controller.cpp @@ -15,7 +15,7 @@ IProcessWindingController::IProcessWindingController(Core::System& system_, static const FunctionInfo functions[] = { {0, D<&IProcessWindingController::GetLaunchReason>, "GetLaunchReason"}, {11, D<&IProcessWindingController::OpenCallingLibraryApplet>, "OpenCallingLibraryApplet"}, - {21, D<&IProcessWindingController::PushContext>, "PushContext"}, + {21, nullptr, "PushContext"}, {22, nullptr, "PopContext"}, {23, nullptr, "CancelWindingReservation"}, {30, nullptr, "WindAndDoReserved"}, @@ -51,9 +51,4 @@ Result IProcessWindingController::OpenCallingLibraryApplet( R_SUCCEED(); } -Result IProcessWindingController::PushContext() { - LOG_WARNING(Service_AM, "(STUBBED) called"); - R_SUCCEED(); -} - } // namespace Service::AM diff --git a/src/core/hle/service/am/service/process_winding_controller.h b/src/core/hle/service/am/service/process_winding_controller.h index bcf341d94c..4408af1f1d 100644 --- a/src/core/hle/service/am/service/process_winding_controller.h +++ b/src/core/hle/service/am/service/process_winding_controller.h @@ -21,7 +21,7 @@ private: Result GetLaunchReason(Out out_launch_reason); Result OpenCallingLibraryApplet( Out> out_calling_library_applet); - Result PushContext(); + const std::shared_ptr m_applet; }; diff --git a/src/core/hle/service/am/service/self_controller.cpp b/src/core/hle/service/am/service/self_controller.cpp index fa36c93060..1db02b88fd 100644 --- a/src/core/hle/service/am/service/self_controller.cpp +++ b/src/core/hle/service/am/service/self_controller.cpp @@ -67,7 +67,6 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr {110, nullptr, "SetApplicationAlbumUserData"}, {120, D<&ISelfController::SaveCurrentScreenshot>, "SaveCurrentScreenshot"}, {130, D<&ISelfController::SetRecordVolumeMuted>, "SetRecordVolumeMuted"}, - {230, D<&ISelfController::Unknown230>, "Unknown230"}, {1000, nullptr, "GetDebugStorageChannel"}, }; // clang-format on @@ -395,10 +394,6 @@ Result ISelfController::SaveCurrentScreenshot(Capture::AlbumReportOption album_r R_SUCCEED(); } -Result ISelfController::Unknown230() { - LOG_WARNING(Service_AM, "(STUBBED) called - function 230 (0xE6)"); - R_SUCCEED(); -} Result ISelfController::SetRecordVolumeMuted(bool muted) { LOG_WARNING(Service_AM, "(STUBBED) called. muted={}", muted); diff --git a/src/core/hle/service/am/service/self_controller.h b/src/core/hle/service/am/service/self_controller.h index a384846231..eca083cfe5 100644 --- a/src/core/hle/service/am/service/self_controller.h +++ b/src/core/hle/service/am/service/self_controller.h @@ -62,7 +62,6 @@ private: Result GetAccumulatedSuspendedTickChangedEvent(OutCopyHandle out_event); Result SetAlbumImageTakenNotificationEnabled(bool enabled); Result SaveCurrentScreenshot(Capture::AlbumReportOption album_report_option); - Result Unknown230(); Result SetRecordVolumeMuted(bool muted); Kernel::KProcess* const m_process; diff --git a/src/core/hle/service/caps/caps_a.cpp b/src/core/hle/service/caps/caps_a.cpp index 588cf2f09b..52228b830a 100644 --- a/src/core/hle/service/caps/caps_a.cpp +++ b/src/core/hle/service/caps/caps_a.cpp @@ -53,8 +53,6 @@ IAlbumAccessorService::IAlbumAccessorService(Core::System& system_, {8021, nullptr, "GetAlbumEntryFromApplicationAlbumEntryAruid"}, {10011, nullptr, "SetInternalErrorConversionEnabled"}, {50000, nullptr, "LoadMakerNoteInfoForDebug"}, - {50011, C<&IAlbumAccessorService::GetAlbumAccessResultForDebug>, "GetAlbumAccessResultForDebug"}, - {50012, C<&IAlbumAccessorService::SetAlbumAccessResultForDebug>, "SetAlbumAccessResultForDebug"}, {60002, nullptr, "OpenAccessorSession"}, }; // clang-format on @@ -139,15 +137,6 @@ Result IAlbumAccessorService::LoadAlbumScreenShotThumbnailImageEx1( R_RETURN(TranslateResult(result)); } -Result IAlbumAccessorService::GetAlbumAccessResultForDebug() { - LOG_DEBUG(Service_Capture, "(STUBBED) called."); - R_SUCCEED(); -} - -Result IAlbumAccessorService::SetAlbumAccessResultForDebug() { - LOG_DEBUG(Service_Capture, "(STUBBED) called."); - R_SUCCEED(); -} Result IAlbumAccessorService::TranslateResult(Result in_result) { if (in_result.IsSuccess()) { return in_result; diff --git a/src/core/hle/service/caps/caps_a.h b/src/core/hle/service/caps/caps_a.h index 9590e71e70..c7a5208e32 100644 --- a/src/core/hle/service/caps/caps_a.h +++ b/src/core/hle/service/caps/caps_a.h @@ -50,10 +50,6 @@ private: OutArray out_image, OutArray out_buffer); - Result GetAlbumAccessResultForDebug(); - - Result SetAlbumAccessResultForDebug(); - Result TranslateResult(Result in_result); std::shared_ptr manager = nullptr; diff --git a/src/core/hle/service/erpt/erpt.cpp b/src/core/hle/service/erpt/erpt.cpp index 627ef72973..6b7eab5efd 100644 --- a/src/core/hle/service/erpt/erpt.cpp +++ b/src/core/hle/service/erpt/erpt.cpp @@ -30,8 +30,6 @@ public: {10, nullptr, "CreateReportWithAttachments"}, {11, C<&ErrorReportContext::CreateReportV1>, "CreateReportV1"}, {12, C<&ErrorReportContext::CreateReport>, "CreateReport"}, - {13, nullptr, "SubmitAttachmentWithLz4Compression"}, // 20.0.0+ - {14, nullptr, "CreateReportWithSpecifiedReprotId"}, // 20.0.0+ {20, nullptr, "RegisterRunningApplet"}, {21, nullptr, "UnregisterRunningApplet"}, {22, nullptr, "UpdateAppletSuspendedDuration"}, diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp index f95c83259c..005caf6562 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp @@ -76,7 +76,6 @@ FSP_SRV::FSP_SRV(Core::System& system_) {34, D<&FSP_SRV::GetCacheStorageSize>, "GetCacheStorageSize"}, {35, nullptr, "CreateSaveDataFileSystemByHashSalt"}, {36, nullptr, "OpenHostFileSystemWithOption"}, - {38, nullptr, "DetachSdCard"}, // 20.0.0+ {51, D<&FSP_SRV::OpenSaveDataFileSystem>, "OpenSaveDataFileSystem"}, {52, D<&FSP_SRV::OpenSaveDataFileSystemBySystemSaveDataId>, "OpenSaveDataFileSystemBySystemSaveDataId"}, {53, D<&FSP_SRV::OpenReadOnlySaveDataFileSystem>, "OpenReadOnlySaveDataFileSystem"}, @@ -118,7 +117,6 @@ FSP_SRV::FSP_SRV(Core::System& system_) {400, nullptr, "OpenDeviceOperator"}, {500, nullptr, "OpenSdCardDetectionEventNotifier"}, {501, nullptr, "OpenGameCardDetectionEventNotifier"}, - {502, nullptr, "OpenSdCardAwakenReadyEventNotifier"}, // 20.0.0+ {510, nullptr, "OpenSystemDataUpdateEventNotifier"}, {511, nullptr, "NotifySystemDataUpdateEvent"}, {520, nullptr, "SimulateGameCardDetectionEvent"}, diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index e4a6251dcc..84c73e9d6f 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp @@ -50,19 +50,16 @@ public: {20102, nullptr, "GetFriendDetailedInfo"}, {20103, nullptr, "SyncFriendList"}, {20104, &IFriendService::RequestSyncFriendList, "RequestSyncFriendList"}, - {20107, nullptr, "GetFriendDetailedInfoV2"}, // 20.0.0+ {20110, nullptr, "LoadFriendSetting"}, {20200, &IFriendService::GetReceivedFriendRequestCount, "GetReceivedFriendRequestCount"}, - {20201, nullptr, "GetFriendRequestListV1"}, // 20.0.0+ (1.0.0-19.0.1 GetFriendRequestList) - {20202, nullptr, "GetFriendRequestListV2"}, // 20.0.0+ + {20201, nullptr, "GetFriendRequestList"}, {20300, nullptr, "GetFriendCandidateList"}, {20301, nullptr, "GetNintendoNetworkIdInfo"}, {20302, nullptr, "GetSnsAccountLinkage"}, {20303, nullptr, "GetSnsAccountProfile"}, {20304, nullptr, "GetSnsAccountFriendList"}, - {20400, nullptr, "GetBlockedUserListV1"}, // 20.0.0+ (1.0.0-19.0.1 GetBlockedUserList) + {20400, nullptr, "GetBlockedUserList"}, {20401, nullptr, "SyncBlockedUserList"}, - {20402, nullptr, "GetBlockedUserListV2"}, // 20.0.0+ {20500, nullptr, "GetProfileExtraList"}, {20501, nullptr, "GetRelationship"}, {20600, &IFriendService::GetUserPresenceView, "GetUserPresenceView"}, @@ -81,7 +78,7 @@ public: {30120, nullptr, "ChangeFriendFavoriteFlag"}, {30121, nullptr, "ChangeFriendOnlineNotificationFlag"}, {30200, nullptr, "SendFriendRequest"}, - {30201, nullptr, "SendFriendRequestWithApplicationInfoV1"}, // 20.0.0+ (1.0.0-19.0.1 SendFriendRequestWithApplicationInfo) + {30201, nullptr, "SendFriendRequestWithApplicationInfo"}, {30202, nullptr, "CancelFriendRequest"}, {30203, nullptr, "AcceptFriendRequest"}, {30204, nullptr, "RejectFriendRequest"}, @@ -94,13 +91,11 @@ public: {30215, nullptr, "SendFriendRequestWithExternalApplicationCatalogId"}, {30216, nullptr, "ResendFacedFriendRequest"}, {30217, nullptr, "SendFriendRequestWithNintendoNetworkIdInfo"}, - {30218, nullptr, "SendFriendRequestWithApplicationInfoV2"}, // 20.0.0+ {30300, nullptr, "GetSnsAccountLinkPageUrl"}, {30301, nullptr, "UnlinkSnsAccount"}, {30400, nullptr, "BlockUser"}, - {30401, nullptr, "BlockUserWithApplicationInfoV1"}, // 20.0.0+ (1.0.0-19.0.1 BlockUserWithApplicationInfo) + {30401, nullptr, "BlockUserWithApplicationInfo"}, {30402, nullptr, "UnblockUser"}, - {30403, nullptr, "BlockUserWithApplicationInfoV2"}, // 20.0.0+ {30500, nullptr, "GetProfileExtraFromFriendCode"}, {30700, nullptr, "DeletePlayHistory"}, {30810, nullptr, "ChangePresencePermission"}, @@ -478,4 +473,4 @@ void LoopProcess(Core::System& system) { ServerManager::RunServer(std::move(server_manager)); } -} // namespace Service::Friend \ No newline at end of file +} // namespace Service::Friend diff --git a/src/core/hle/service/hid/hid_debug_server.cpp b/src/core/hle/service/hid/hid_debug_server.cpp index 1547192b1b..4e26636725 100644 --- a/src/core/hle/service/hid/hid_debug_server.cpp +++ b/src/core/hle/service/hid/hid_debug_server.cpp @@ -86,8 +86,6 @@ IHidDebugServer::IHidDebugServer(Core::System& system_, std::shared_ptr r {134, C<&IHidServer::SetNpadAnalogStickUseCenterClamp>, "SetNpadAnalogStickUseCenterClamp"}, {135, C<&IHidServer::SetNpadCaptureButtonAssignment>, "SetNpadCaptureButtonAssignment"}, {136, C<&IHidServer::ClearNpadCaptureButtonAssignment>, "ClearNpadCaptureButtonAssignment"}, - {137, nullptr, "SetNpadGcAnalogStick8bitRawValue"}, // 20.0.0+ {200, C<&IHidServer::GetVibrationDeviceInfo>, "GetVibrationDeviceInfo"}, {201, C<&IHidServer::SendVibrationValue>, "SendVibrationValue"}, {202, C<&IHidServer::GetActualVibrationValue>, "GetActualVibrationValue"}, @@ -184,8 +183,7 @@ IHidServer::IHidServer(Core::System& system_, std::shared_ptr r {1001, C<&IHidServer::GetNpadCommunicationMode>, "GetNpadCommunicationMode"}, {1002, C<&IHidServer::SetTouchScreenConfiguration>, "SetTouchScreenConfiguration"}, {1003, C<&IHidServer::IsFirmwareUpdateNeededForNotification>, "IsFirmwareUpdateNeededForNotification"}, - {1004, C<&IHidServer::SetTouchScreenOutputRanges>, "SetTouchScreenOutputRanges"}, // 20.0.0+ (17.0.0-19.0.1 SetTouchScreenResolution) - {1005, nullptr, "EnableNxTouchScreenEmulationForTouchEnter"}, // 20.0.0+ + {1004, C<&IHidServer::SetTouchScreenResolution>, "SetTouchScreenResolution"}, {2000, nullptr, "ActivateDigitizer"}, }; // clang-format on @@ -1434,12 +1432,12 @@ Result IHidServer::IsFirmwareUpdateNeededForNotification(Out out_is_firmwa R_SUCCEED(); } -Result IHidServer::SetTouchScreenOutputRanges(u32 width, u32 height, +Result IHidServer::SetTouchScreenResolution(u32 width, u32 height, ClientAppletResourceUserId aruid) { LOG_INFO(Service_HID, "called, width={}, height={}, applet_resource_user_id={}", width, height, aruid.pid); - GetResourceManager()->GetTouchScreen()->SetTouchScreenOutputRanges(width, height, aruid.pid); + GetResourceManager()->GetTouchScreen()->SetTouchScreenResolution(width, height, aruid.pid); R_SUCCEED(); } diff --git a/src/core/hle/service/hid/hid_server.h b/src/core/hle/service/hid/hid_server.h index 11884c8db3..9fdb25d5ca 100644 --- a/src/core/hle/service/hid/hid_server.h +++ b/src/core/hle/service/hid/hid_server.h @@ -258,7 +258,7 @@ private: ClientAppletResourceUserId aruid); Result IsFirmwareUpdateNeededForNotification(Out out_is_firmware_update_needed, s32 unknown, ClientAppletResourceUserId aruid); - Result SetTouchScreenOutputRanges(u32 width, u32 height, ClientAppletResourceUserId aruid); + Result SetTouchScreenResolution(u32 width, u32 height, ClientAppletResourceUserId aruid); std::shared_ptr resource_manager; std::shared_ptr firmware_settings; diff --git a/src/core/hle/service/hid/hid_system_server.cpp b/src/core/hle/service/hid/hid_system_server.cpp index 9edfc045bf..b0cd63d725 100644 --- a/src/core/hle/service/hid/hid_system_server.cpp +++ b/src/core/hle/service/hid/hid_system_server.cpp @@ -67,8 +67,6 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr, "Unknown4022"}, - {4023, D<&IApplicationManagerInterface::Unknown4023>, "Unknown4023"}, - {4088, D<&IApplicationManagerInterface::Unknown4088>, "Unknown4088"}, {9999, nullptr, "GetApplicationCertificate"}, }; // clang-format on @@ -512,23 +509,6 @@ Result IApplicationManagerInterface::CheckApplicationLaunchVersion(u64 applicati R_SUCCEED(); } -Result IApplicationManagerInterface::Unknown4022(Out out_unknown) { - LOG_WARNING(Service_NS, "(STUBBED) Unknown4022 called"); - *out_unknown = 0; - R_SUCCEED(); -} - -Result IApplicationManagerInterface::Unknown4023(Out out_unknown) { - LOG_WARNING(Service_NS, "(STUBBED) Unknown4022 called"); - - *out_unknown = 0; - R_SUCCEED(); -} -Result IApplicationManagerInterface::Unknown4088() { - LOG_WARNING(Service_NS, "(STUBBED) Unknown4088 called"); - R_SUCCEED(); -} - Result IApplicationManagerInterface::GetApplicationTerminateResult(Out out_result, u64 application_id) { LOG_WARNING(Service_NS, "(STUBBED) called. application_id={:016X}", application_id); diff --git a/src/core/hle/service/ns/application_manager_interface.h b/src/core/hle/service/ns/application_manager_interface.h index e96e50c8e1..f33d269b35 100644 --- a/src/core/hle/service/ns/application_manager_interface.h +++ b/src/core/hle/service/ns/application_manager_interface.h @@ -48,9 +48,6 @@ public: Result IsApplicationUpdateRequested(Out out_update_required, Out out_update_version, u64 application_id); Result CheckApplicationLaunchVersion(u64 application_id); - Result Unknown4022(Out out_unknown); - Result Unknown4023(Out out_unknown); - Result Unknown4088(); Result GetApplicationTerminateResult(Out out_result, u64 application_id); private: diff --git a/src/core/hle/service/ns/platform_service_manager.cpp b/src/core/hle/service/ns/platform_service_manager.cpp index fd144a4dff..23cf05005c 100644 --- a/src/core/hle/service/ns/platform_service_manager.cpp +++ b/src/core/hle/service/ns/platform_service_manager.cpp @@ -147,7 +147,6 @@ IPlatformServiceManager::IPlatformServiceManager(Core::System& system_, const ch {104, nullptr, "RequestApplicationFunctionAuthorizationByProgramId"}, {105, nullptr, "GetFunctionBlackListSystemVersionToAuthorize"}, {106, nullptr, "GetFunctionBlackListVersion"}, - {108, nullptr, "GetRequiredApplicationVersion"}, // 20.0.0+ {1000, nullptr, "LoadNgWordDataForPlatformRegionChina"}, {1001, nullptr, "GetNgWordDataSizeForPlatformRegionChina"}, }; diff --git a/src/core/hle/service/pctl/parental_control_service.cpp b/src/core/hle/service/pctl/parental_control_service.cpp index a65088de9c..3483ea30d9 100644 --- a/src/core/hle/service/pctl/parental_control_service.cpp +++ b/src/core/hle/service/pctl/parental_control_service.cpp @@ -35,8 +35,6 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili {1016, nullptr, "ConfirmShowNewsPermission"}, {1017, D<&IParentalControlService::EndFreeCommunication>, "EndFreeCommunication"}, {1018, D<&IParentalControlService::IsFreeCommunicationAvailable>, "IsFreeCommunicationAvailable"}, - {1019, nullptr, "ConfirmLaunchApplicationPermission"}, // 20.0.0+ - {1020, nullptr, "ConfirmLaunchSharedApplicationPermission"}, // 20.0.0+ {1031, D<&IParentalControlService::IsRestrictionEnabled>, "IsRestrictionEnabled"}, {1032, D<&IParentalControlService::GetSafetyLevel>, "GetSafetyLevel"}, {1033, nullptr, "SetSafetyLevel"}, @@ -51,11 +49,9 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili {1044, nullptr, "GetFreeCommunicationApplicationList"}, {1045, nullptr, "UpdateFreeCommunicationApplicationList"}, {1046, nullptr, "DisableFeaturesForReset"}, - {1047, nullptr, "NotifyApplicationDownloadStartedOld"}, // 20.0.0+ (3.0.0-19.0.1 NotifyApplicationDownloadStarted) + {1047, nullptr, "NotifyApplicationDownloadStarted"}, {1048, nullptr, "NotifyNetworkProfileCreated"}, {1049, nullptr, "ResetFreeCommunicationApplicationList"}, - {1050, nullptr, "AddToFreeCommunicationApplicationList"}, // 20.0.0+ - {1051, nullptr, "NotifyApplicationDownloadStarted"}, // 20.0.0+ {1061, D<&IParentalControlService::ConfirmStereoVisionRestrictionConfigurable>, "ConfirmStereoVisionRestrictionConfigurable"}, {1062, D<&IParentalControlService::GetStereoVisionRestriction>, "GetStereoVisionRestriction"}, {1063, D<&IParentalControlService::SetStereoVisionRestriction>, "SetStereoVisionRestriction"}, @@ -81,18 +77,16 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili {1451, D<&IParentalControlService::StartPlayTimer>, "StartPlayTimer"}, {1452, D<&IParentalControlService::StopPlayTimer>, "StopPlayTimer"}, {1453, D<&IParentalControlService::IsPlayTimerEnabled>, "IsPlayTimerEnabled"}, - {1454, D<&IParentalControlService::GetPlayTimerRemainingTime>, "GetPlayTimerRemainingTime"}, + {1454, nullptr, "GetPlayTimerRemainingTime"}, {1455, D<&IParentalControlService::IsRestrictedByPlayTimer>, "IsRestrictedByPlayTimer"}, {1456, D<&IParentalControlService::GetPlayTimerSettingsOld>, "GetPlayTimerSettingsOld"}, {1457, D<&IParentalControlService::GetPlayTimerEventToRequestSuspension>, "GetPlayTimerEventToRequestSuspension"}, {1458, D<&IParentalControlService::IsPlayTimerAlarmDisabled>, "IsPlayTimerAlarmDisabled"}, - {1459, D<&IParentalControlService::GetPlayTimerRemainingTimeDisplayInfo>, "GetPlayTimerRemainingTimeDisplayInfo"}, // 20.0.0+ {1471, nullptr, "NotifyWrongPinCodeInputManyTimes"}, {1472, nullptr, "CancelNetworkRequest"}, {1473, D<&IParentalControlService::GetUnlinkedEvent>, "GetUnlinkedEvent"}, {1474, nullptr, "ClearUnlinkedEvent"}, {1475, nullptr, "GetExtendedPlayTimerEvent"}, // 18.0.0+ - {1501, nullptr, "SetTimerEventEnabled"}, // 20.0.0+ {1601, nullptr, "DisableAllFeatures"}, {1602, nullptr, "PostEnableAllFeatures"}, {1603, nullptr, "IsAllFeaturesDisabled"}, @@ -112,9 +106,6 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili {1955, nullptr, "GetBedtimeAlarmTime"}, // 18.0.0+ {1956, nullptr, "GetBedtimeAlarmTimeHour"}, // 18.0.0+ {1957, nullptr, "GetBedtimeAlarmTimeMinute"}, // 18.0.0+ - {1958, nullptr, "GetBedtimeAlarmResetTimeHour"}, // 20.0.0+ - {1959, nullptr, "GetBedtimeAlarmResetTimeMinute"}, // 20.0.0+ - {1960, nullptr, "GetExtraPlayingTimeForDebug"}, // 20.0.0+ {2001, nullptr, "RequestPairingAsync"}, {2002, nullptr, "FinishRequestPairing"}, {2003, nullptr, "AuthorizePairingAsync"}, @@ -131,15 +122,6 @@ IParentalControlService::IParentalControlService(Core::System& system_, Capabili {2014, nullptr, "FinishSynchronizeParentalControlSettings"}, {2015, nullptr, "FinishSynchronizeParentalControlSettingsWithLastUpdated"}, {2016, nullptr, "RequestUpdateExemptionListAsync"}, - {2021, nullptr, "RequestCopyPairingAsync"}, // 20.0.0+ - {2022, nullptr, "FinishRequestCopyPairing"}, // 20.0.0+ - {2023, nullptr, "IsFromPairingActiveDevice"}, // 20.0.0+ - {3001, nullptr, "GetErrorContextChangedEvent"}, // 20.0.0+ - {9401, nullptr, "GetEvents"}, // 20.0.0+ - {9402, nullptr, "GetEventsWithJson"}, // 20.0.0+ - {9403, nullptr, "RequestPostEvents"}, // 20.0.0+ - {9404, nullptr, "GetPostEventInterval"}, // 20.0.0+ - {9405, nullptr, "SetPostEventInterval"}, // 20.0.0+ {145601, D<&IParentalControlService::GetPlayTimerSettings>, "GetPlayTimerSettings"} // 18.0.0+ }; // clang-format on @@ -388,12 +370,6 @@ Result IParentalControlService::IsPlayTimerEnabled(Out out_is_play_timer_e R_SUCCEED(); } -Result IParentalControlService::GetPlayTimerRemainingTime(Out out_remaining_minutes) { - *out_remaining_minutes = 0; - LOG_WARNING(Service_PCTL, "(STUBBED) called, remaining_minutes={}", *out_remaining_minutes); - R_SUCCEED(); -} - Result IParentalControlService::IsRestrictedByPlayTimer(Out out_is_restricted_by_play_timer) { *out_is_restricted_by_play_timer = false; LOG_WARNING(Service_PCTL, "(STUBBED) called, restricted={}", *out_is_restricted_by_play_timer); @@ -428,15 +404,6 @@ Result IParentalControlService::IsPlayTimerAlarmDisabled(Out out_play_time R_SUCCEED(); } -Result IParentalControlService::GetPlayTimerRemainingTimeDisplayInfo( - Out out_remaining_minutes, Out out_unknown) { - *out_remaining_minutes = 0; - *out_unknown = 0; - LOG_WARNING(Service_PCTL, "(STUBBED) called, remaining_minutes={}, unknown={}", - *out_remaining_minutes, *out_unknown); - R_SUCCEED(); -} - Result IParentalControlService::GetUnlinkedEvent(OutCopyHandle out_event) { LOG_INFO(Service_PCTL, "called"); *out_event = unlinked_event.GetHandle(); @@ -477,4 +444,4 @@ Result IParentalControlService::ResetConfirmedStereoVisionPermission() { R_SUCCEED(); } -} // namespace Service::PCTL \ No newline at end of file +} // namespace Service::PCTL diff --git a/src/core/hle/service/pctl/parental_control_service.h b/src/core/hle/service/pctl/parental_control_service.h index 5b72ed1f03..d58c75f380 100644 --- a/src/core/hle/service/pctl/parental_control_service.h +++ b/src/core/hle/service/pctl/parental_control_service.h @@ -45,12 +45,10 @@ private: Result StartPlayTimer(); Result StopPlayTimer(); Result IsPlayTimerEnabled(Out out_is_play_timer_enabled); - Result GetPlayTimerRemainingTime(Out out_remaining_minutes); Result IsRestrictedByPlayTimer(Out out_is_restricted_by_play_timer); Result GetPlayTimerSettingsOld(Out out_play_timer_settings); Result GetPlayTimerEventToRequestSuspension(OutCopyHandle out_event); Result IsPlayTimerAlarmDisabled(Out out_play_timer_alarm_disabled); - Result GetPlayTimerRemainingTimeDisplayInfo(Out out_remaining_minutes, Out out_unknown); Result GetUnlinkedEvent(OutCopyHandle out_event); Result GetStereoVisionRestriction(Out out_stereo_vision_restriction); Result SetStereoVisionRestriction(bool stereo_vision_restriction); diff --git a/src/core/hle/service/set/firmware_debug_settings_server.cpp b/src/core/hle/service/set/firmware_debug_settings_server.cpp index a2b087b371..b3a5e623b6 100644 --- a/src/core/hle/service/set/firmware_debug_settings_server.cpp +++ b/src/core/hle/service/set/firmware_debug_settings_server.cpp @@ -18,7 +18,6 @@ IFirmwareDebugSettingsServer::IFirmwareDebugSettingsServer(Core::System& system_ {21, nullptr, "SetAllowedSslHosts"}, {22, nullptr, "SetHostFsMountPoint"}, {23, nullptr, "SetMemoryUsageRateFlag"}, - {24, nullptr, "CommitSettings"}, // 20.0.0+ }; // clang-format on diff --git a/src/core/hle/service/set/system_settings_server.cpp b/src/core/hle/service/set/system_settings_server.cpp index f327432daa..d246b95d0e 100644 --- a/src/core/hle/service/set/system_settings_server.cpp +++ b/src/core/hle/service/set/system_settings_server.cpp @@ -304,14 +304,6 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_) {222, nullptr, "SetForceMonauralOutputFlag"}, //17.0.0+ {251, nullptr, "GetAccountIdentificationSettings"}, //18.0.0+ {252, nullptr, "SetAccountIdentificationSettings"}, //18.0.0+ - {264, nullptr, "GetVphymDirtyFlags"}, // 20.0.0+ - {282, nullptr, "ConvertToProductModel"}, // 20.0.0+ - {283, nullptr, "ConvertToProductModelName"}, // 20.0.0+ - {289, nullptr, "GetDefaultAccountIdentificationFlagSet"}, // 20.0.0+ - {300, nullptr, "AcquirePushNotificationDirtyFlagEventHandle"}, // 20.0.0+ - {301, nullptr, "GetPushNotificationDirtyFlags"}, // 20.0.0+ - {306, nullptr, "GetPinCodeReregistrationGuideAccounts"}, // 20.0.0+ - {307, nullptr, "SetPinCodeReregistrationGuideAccounts"}, // 20.0.0+ }; // clang-format on diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index c9c3edf2a6..67e37e0823 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp @@ -106,8 +106,6 @@ public: {33, nullptr, "ExportKeyingMaterial"}, {34, nullptr, "SetIoTimeout"}, {35, nullptr, "GetIoTimeout"}, - {36, nullptr, "GetSessionTicket"}, // 20.0.0+ - {37, nullptr, "SetSessionTicket"}, // 20.0.0+ }; // clang-format on diff --git a/src/core/hle/service/ssl/ssl_types.h b/src/core/hle/service/ssl/ssl_types.h index 9a9793f4f3..16623c0fc5 100644 --- a/src/core/hle/service/ssl/ssl_types.h +++ b/src/core/hle/service/ssl/ssl_types.h @@ -11,7 +11,7 @@ enum class CaCertificateId : s32 { All = -1, NintendoCAG3 = 1, NintendoClass2CAG3 = 2, - NintendoRootCAG4 = 3, // [16.0.0+] + NintendoRootCAG4 = 3, AmazonRootCA1 = 1000, StarfieldServicesRootCertificateAuthorityG2 = 1001, AddTrustExternalCARoot = 1002, @@ -29,10 +29,10 @@ enum class CaCertificateId : s32 { EntrustnetCertificationAuthority2048 = 1014, EntrustRootCertificationAuthority = 1015, EntrustRootCertificationAuthorityG2 = 1016, - GeoTrustGlobalCA2 = 1017, // [8.0.0+] TrustedCertStatus is EnabledNotTrusted - GeoTrustGlobalCA = 1018, // [8.0.0+] TrustedCertStatus is EnabledNotTrusted - GeoTrustPrimaryCertificationAuthorityG3 = 1019, // [8.0.0+] TrustedCertStatus is EnabledNotTrusted - GeoTrustPrimaryCertificationAuthority = 1020, // [8.0.0+] TrustedCertStatus is EnabledNotTrusted + GeoTrustGlobalCA2 = 1017, + GeoTrustGlobalCA = 1018, + GeoTrustPrimaryCertificationAuthorityG3 = 1019, + GeoTrustPrimaryCertificationAuthority = 1020, GlobalSignRootCA = 1021, GlobalSignRootCAR2 = 1022, GlobalSignRootCAR3 = 1023, @@ -73,72 +73,6 @@ enum class CaCertificateId : s32 { DigiCertTLSECCP384RootG5 = 1058, // [16.0.0+] DigiCertTLSRSA4096RootG5 = 1059, // [16.0.0+] NintendoTempRootCAG4 = 65536, // [16.0.0+] ([19.0.0+] Removed) - - // Nintendo round-robin certificates [20.0.0+] - NintendoRR01 = 32801, - NintendoRR02 = 32802, - NintendoRR03 = 32803, - NintendoRR04 = 32804, - NintendoRR05 = 32805, - NintendoRR06 = 32806, - NintendoRR07 = 32807, - NintendoRR08 = 32808, - NintendoRR09 = 32809, - NintendoRR10 = 32810, - NintendoRR11 = 32811, - NintendoRR12 = 32812, - NintendoRR13 = 32813, - NintendoRR14 = 32814, - NintendoRR15 = 32815, - NintendoRR16 = 32816, - NintendoRR17 = 32817, - NintendoRR18 = 32818, - NintendoRR19 = 32819, - NintendoRR20 = 32820, - NintendoRR21 = 32821, - NintendoRR22 = 32822, - NintendoRR23 = 32823, - NintendoRR24 = 32824, - NintendoRR25 = 32825, - NintendoRR26 = 32826, - NintendoRR27 = 32827, - NintendoRR28 = 32828, - NintendoRR29 = 32829, - NintendoRR30 = 32830, - NintendoRR31 = 32831, - NintendoRR32 = 32832, - NintendoRR33 = 32833, - NintendoRR34 = 32834, - NintendoRR35 = 32835, - NintendoRR36 = 32836, - NintendoRR37 = 32837, - NintendoRR38 = 32838, - NintendoRR39 = 32839, - NintendoRR40 = 32840, - NintendoRR41 = 32841, - NintendoRR42 = 32842, - NintendoRR43 = 32843, - NintendoRR44 = 32844, - NintendoRR45 = 32845, - NintendoRR46 = 32846, - NintendoRR47 = 32847, - NintendoRR48 = 32848, - NintendoRR49 = 32849, - NintendoRR50 = 32850, - NintendoRR51 = 32851, - NintendoRR52 = 32852, - NintendoRR53 = 32853, - NintendoRR54 = 32854, - NintendoRR55 = 32855, - NintendoRR56 = 32856, - NintendoRR57 = 32857, - NintendoRR58 = 32858, - NintendoRR59 = 32859, - NintendoRR60 = 32860, - NintendoRR61 = 32861, - NintendoRR62 = 32862, - NintendoRR63 = 32863, - NintendoRR64 = 32864, }; enum class TrustedCertStatus : s32 { diff --git a/src/hid_core/resources/touch_screen/touch_screen.cpp b/src/hid_core/resources/touch_screen/touch_screen.cpp index e9b1fdba51..35efb1786a 100644 --- a/src/hid_core/resources/touch_screen/touch_screen.cpp +++ b/src/hid_core/resources/touch_screen/touch_screen.cpp @@ -82,9 +82,9 @@ Result TouchScreen::SetTouchScreenMagnification(f32 point1_x, f32 point1_y, f32 return ResultSuccess; } -Result TouchScreen::SetTouchScreenOutputRanges(u32 width, u32 height, u64 aruid) { +Result TouchScreen::SetTouchScreenResolution(u32 width, u32 height, u64 aruid) { std::scoped_lock lock{mutex}; - return touch_resource->SetTouchScreenOutputRanges(width, height, aruid); + return touch_resource->SetTouchScreenResolution(width, height, aruid); } Result TouchScreen::SetTouchScreenConfiguration( diff --git a/src/hid_core/resources/touch_screen/touch_screen.h b/src/hid_core/resources/touch_screen/touch_screen.h index 8a08280ac5..2fcb6247f1 100644 --- a/src/hid_core/resources/touch_screen/touch_screen.h +++ b/src/hid_core/resources/touch_screen/touch_screen.h @@ -42,7 +42,7 @@ public: Result ProcessTouchScreenAutoTune(); Result SetTouchScreenMagnification(f32 point1_x, f32 point1_y, f32 point2_x, f32 point2_y); - Result SetTouchScreenOutputRanges(u32 width, u32 height, u64 aruid); + Result SetTouchScreenResolution(u32 width, u32 height, u64 aruid); Result SetTouchScreenConfiguration(const Core::HID::TouchScreenConfigurationForNx& mode, u64 aruid); diff --git a/src/hid_core/resources/touch_screen/touch_screen_resource.cpp b/src/hid_core/resources/touch_screen/touch_screen_resource.cpp index 7c949be7fe..79ddaa4dfa 100644 --- a/src/hid_core/resources/touch_screen/touch_screen_resource.cpp +++ b/src/hid_core/resources/touch_screen/touch_screen_resource.cpp @@ -296,7 +296,7 @@ void TouchResource::SetTouchScreenMagnification(f32 point1_x, f32 point1_y, f32 }; } -Result TouchResource::SetTouchScreenOutputRanges(u32 width, u32 height, u64 aruid) { +Result TouchResource::SetTouchScreenResolution(u32 width, u32 height, u64 aruid) { std::scoped_lock lock{*shared_mutex}; for (std::size_t aruid_index = 0; aruid_index < AruidIndexMax; aruid_index++) { diff --git a/src/hid_core/resources/touch_screen/touch_screen_resource.h b/src/hid_core/resources/touch_screen/touch_screen_resource.h index 84fa5eb0b6..095cddd762 100644 --- a/src/hid_core/resources/touch_screen/touch_screen_resource.h +++ b/src/hid_core/resources/touch_screen/touch_screen_resource.h @@ -66,7 +66,7 @@ public: Result ProcessTouchScreenAutoTune(); void SetTouchScreenMagnification(f32 point1_x, f32 point1_y, f32 point2_x, f32 point2_y); - Result SetTouchScreenOutputRanges(u32 width, u32 height, u64 aruid); + Result SetTouchScreenResolution(u32 width, u32 height, u64 aruid); Result SetTouchScreenConfiguration( const Core::HID::TouchScreenConfigurationForNx& touch_configuration, u64 aruid); From dbd745138e3460596f476cd0b8a4ba231b77fa03 Mon Sep 17 00:00:00 2001 From: Pavel Barabanov Date: Mon, 12 May 2025 03:56:25 +0300 Subject: [PATCH 04/26] returned several services --- src/core/hle/service/acc/acc.cpp | 4 ++++ src/core/hle/service/hid/hid_debug_server.cpp | 2 ++ src/core/hle/service/hid/hid_system_server.cpp | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index 1fff04eead..53decd1dad 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -301,6 +301,10 @@ public: {101, nullptr, "IsNetworkServiceAccountReplaced"}, {199, nullptr, "GetUrlForIntroductionOfExtraMembership"}, // 2.0.0 - 5.1.0 {200, nullptr, "ApplyAsyncWithAuthorizedToken"}, + {210, nullptr, "IsProfileAvailable"}, // 17.0.0+ + {220, nullptr, "RegisterUserAsyncWithoutProfile"}, // 17.0.0+ + {221, nullptr, "RegisterUserWithProfileAsync"}, // 17.0.0+ + {230, nullptr, "RegisterUserWithLargeImageProfileAsync"}, // 18.0.0+ }; // clang-format on diff --git a/src/core/hle/service/hid/hid_debug_server.cpp b/src/core/hle/service/hid/hid_debug_server.cpp index 4e26636725..738c6d9ae2 100644 --- a/src/core/hle/service/hid/hid_debug_server.cpp +++ b/src/core/hle/service/hid/hid_debug_server.cpp @@ -86,6 +86,7 @@ IHidDebugServer::IHidDebugServer(Core::System& system_, std::shared_ptr Date: Tue, 13 May 2025 09:15:45 -0400 Subject: [PATCH 05/26] Update CMake files to download dependencies / binaries from self-hosted git repository --- CMakeLists.txt | 4 ++-- CMakeModules/DownloadExternals.cmake | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 72b03ec2e8..9773cfe5f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,7 @@ if (YUZU_USE_BUNDLED_VCPKG) set(VCPKG_DOWNLOADS_PATH ${PROJECT_SOURCE_DIR}/externals/vcpkg/downloads) set(NASM_VERSION "2.16.01") set(NASM_DESTINATION_PATH ${VCPKG_DOWNLOADS_PATH}/nasm-${NASM_VERSION}-win64.zip) - set(NASM_DOWNLOAD_URL "https://github.com/eden-emulator/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip") + set(NASM_DOWNLOAD_URL "https://git.eden-emu.dev/eden-emu/ext-windows-bin/raw/master/nasm/nasm-${NASM_VERSION}-win64.zip") if (NOT EXISTS ${NASM_DESTINATION_PATH}) file(DOWNLOAD ${NASM_DOWNLOAD_URL} ${NASM_DESTINATION_PATH} SHOW_PROGRESS STATUS NASM_STATUS) @@ -525,7 +525,7 @@ if (NOT CLANG_FORMAT) message(STATUS "Clang format not found! Downloading...") set(CLANG_FORMAT "${PROJECT_BINARY_DIR}/externals/clang-format${CLANG_FORMAT_POSTFIX}.exe") file(DOWNLOAD - https://github.com/eden-emulator/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe + https://git.eden-emu.dev/eden-emu/ext-windows-bin/raw/master/clang-format${CLANG_FORMAT_POSTFIX}.exe "${CLANG_FORMAT}" SHOW_PROGRESS STATUS DOWNLOAD_SUCCESS) if (NOT DOWNLOAD_SUCCESS EQUAL 0) diff --git a/CMakeModules/DownloadExternals.cmake b/CMakeModules/DownloadExternals.cmake index 3fe15a16c4..b5c945eec5 100644 --- a/CMakeModules/DownloadExternals.cmake +++ b/CMakeModules/DownloadExternals.cmake @@ -8,17 +8,17 @@ set(CURRENT_MODULE_DIR ${CMAKE_CURRENT_LIST_DIR}) function(download_bundled_external remote_path lib_name prefix_var) -set(package_base_url "https://github.com/eden-emulator/") +set(package_base_url "https://git.eden-emu.dev/eden-emu/") set(package_repo "no_platform") set(package_extension "no_platform") if (WIN32) set(package_repo "ext-windows-bin/raw/master/") set(package_extension ".7z") elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") - set(package_repo "ext-linux-bin/raw/main/") + set(package_repo "ext-linux-bin/raw/master/") set(package_extension ".tar.xz") elseif (ANDROID) - set(package_repo "ext-android-bin/raw/main/") + set(package_repo "ext-android-bin/raw/master/") set(package_extension ".tar.xz") else() message(FATAL_ERROR "No package available for this platform") From e14a42b6ba18c36ceb9ed14bbe6cc1e7dadfd0c7 Mon Sep 17 00:00:00 2001 From: MaranBr Date: Tue, 13 May 2025 09:20:59 -0400 Subject: [PATCH 06/26] Update SDL to 2.32.6 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9773cfe5f5..58188fc659 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -370,7 +370,7 @@ if (ENABLE_SDL2) if (YUZU_USE_BUNDLED_SDL2) # Detect toolchain and platform if ((MSVC_VERSION GREATER_EQUAL 1920) AND ARCHITECTURE_x86_64) - set(SDL2_VER "SDL2-2.28.2") + set(SDL2_VER "SDL2-2.32.6") else() message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable YUZU_USE_BUNDLED_SDL2 and provide your own.") endif() From daab352512bf6ba902807299d65a5f1979ba0d56 Mon Sep 17 00:00:00 2001 From: MaranBr Date: Tue, 13 May 2025 09:22:42 -0400 Subject: [PATCH 07/26] Update FFmpeg to 7.0.3 --- externals/ffmpeg/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/ffmpeg/CMakeLists.txt b/externals/ffmpeg/CMakeLists.txt index 543585d4f2..8804aa6ad3 100644 --- a/externals/ffmpeg/CMakeLists.txt +++ b/externals/ffmpeg/CMakeLists.txt @@ -254,7 +254,7 @@ elseif(ANDROID) set(FFmpeg_INCLUDE_DIR "${FFmpeg_INCLUDE_DIR}" PARENT_SCOPE) elseif(WIN32) # Use yuzu FFmpeg binaries - set(FFmpeg_EXT_NAME "ffmpeg-6.0") + set(FFmpeg_EXT_NAME "ffmpeg-7.0.3") set(FFmpeg_PATH "${CMAKE_BINARY_DIR}/externals/${FFmpeg_EXT_NAME}") download_bundled_external("ffmpeg/" ${FFmpeg_EXT_NAME} "") set(FFmpeg_FOUND YES) From 8254a0e0de36b9c0dac53be4f4c97e51d6e8d23b Mon Sep 17 00:00:00 2001 From: MaranBr Date: Tue, 13 May 2025 14:44:29 -0400 Subject: [PATCH 08/26] Update Qt to 6.8.3 and fixes dark mode being forced automatically even when light theme is set in app settings --- CMakeLists.txt | 2 +- CMakeModules/CopyYuzuQt6Deps.cmake | 26 +++++++++++++++++--------- CMakeModules/DownloadExternals.cmake | 13 ++++++------- src/yuzu/CMakeLists.txt | 6 +++--- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 58188fc659..40a9b9ee18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -399,7 +399,7 @@ add_subdirectory(externals) if (ENABLE_QT) if (NOT USE_SYSTEM_QT) - download_qt(6.7.3) + download_qt(6.8.3) endif() find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent) diff --git a/CMakeModules/CopyYuzuQt6Deps.cmake b/CMakeModules/CopyYuzuQt6Deps.cmake index c6a5fa2db2..39f88cbc19 100644 --- a/CMakeModules/CopyYuzuQt6Deps.cmake +++ b/CMakeModules/CopyYuzuQt6Deps.cmake @@ -16,7 +16,7 @@ function(copy_yuzu_Qt6_deps target_dir) set(PLATFORMS ${DLL_DEST}plugins/platforms/) set(STYLES ${DLL_DEST}plugins/styles/) set(IMAGEFORMATS ${DLL_DEST}plugins/imageformats/) - + set(RESOURCES ${DLL_DEST}resources/) if (MSVC) windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST} Qt6Core$<$:d>.* @@ -31,20 +31,31 @@ function(copy_yuzu_Qt6_deps target_dir) endif() if (YUZU_USE_QT_WEB_ENGINE) windows_copy_files(${target_dir} ${Qt6_DLL_DIR} ${DLL_DEST} + Qt6OpenGL$<$:d>.* + Qt6Positioning$<$:d>.* + Qt6PrintSupport$<$:d>.* + Qt6Qml$<$:d>.* + Qt6QmlMeta$<$:d>.* + Qt6QmlModels$<$:d>.* + Qt6QmlWorkerScript$<$:d>.* + Qt6Quick$<$:d>.* + Qt6QuickWidgets$<$:d>.* + Qt6WebChannel$<$:d>.* Qt6WebEngineCore$<$:d>.* Qt6WebEngineWidgets$<$:d>.* - QtWebEngineProcess$<$:d>.* + QtWebEngineProcess$<$:d>.* ) - windows_copy_files(${target_dir} ${Qt6_RESOURCES_DIR} ${DLL_DEST} + windows_copy_files(${target_dir} ${Qt6_RESOURCES_DIR} ${RESOURCES} icudtl.dat qtwebengine_devtools_resources.pak qtwebengine_resources.pak qtwebengine_resources_100p.pak qtwebengine_resources_200p.pak + v8_context_snapshot.bin ) endif() windows_copy_files(yuzu ${Qt6_PLATFORMS_DIR} ${PLATFORMS} qwindows$<$:d>.*) - windows_copy_files(yuzu ${Qt6_STYLES_DIR} ${STYLES} qwindowsvistastyle$<$:d>.*) + windows_copy_files(yuzu ${Qt6_STYLES_DIR} ${STYLES} qmodernwindowsstyle$<$:d>.*) windows_copy_files(yuzu ${Qt6_IMAGEFORMATS_DIR} ${IMAGEFORMATS} qjpeg$<$:d>.* qgif$<$:d>.* @@ -52,9 +63,6 @@ function(copy_yuzu_Qt6_deps target_dir) else() # Update for non-MSVC platforms if needed endif() - - # Create an empty qt.conf file - add_custom_command(TARGET yuzu POST_BUILD - COMMAND ${CMAKE_COMMAND} -E touch ${DLL_DEST}qt.conf - ) + # Fixes dark mode being forced automatically even when light theme is set in app settings. + file(WRITE "${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/qt.conf" "[Platforms]\nWindowsArguments = darkmode=0") endfunction(copy_yuzu_Qt6_deps) diff --git a/CMakeModules/DownloadExternals.cmake b/CMakeModules/DownloadExternals.cmake index b5c945eec5..f48c844f08 100644 --- a/CMakeModules/DownloadExternals.cmake +++ b/CMakeModules/DownloadExternals.cmake @@ -68,18 +68,18 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out set(arch_path "mingw_64") elseif (MSVC) if ("arm64" IN_LIST ARCHITECTURE) - set(arch_path "msvc2019_arm64") + set(arch_path "msvc2022_arm64") elseif ("x86_64" IN_LIST ARCHITECTURE) - set(arch_path "msvc2019_64") + set(arch_path "msvc2022_64") else() message(FATAL_ERROR "Unsupported bundled Qt architecture. Enable USE_SYSTEM_QT and provide your own.") endif() set(arch "win64_${arch_path}") if (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") - set(host_arch_path "msvc2019_64") + set(host_arch_path "msvc2022_64") elseif (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ARM64") - set(host_arch_path "msvc2019_64") + set(host_arch_path "msvc2022_arm64") endif() set(host_arch "win64_${host_arch_path}") else() @@ -133,13 +133,12 @@ function(download_qt_configuration prefix_out target host type arch arch_path ba set(install_args ${install_args} install-tool --outputdir ${base_path} ${host} desktop ${target}) else() set(prefix "${base_path}/${target}/${arch_path}") - set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} - -m qtmultimedia --archives qttranslations qttools qtsvg qtbase) + set(install_args ${install_args} install-qt --outputdir ${base_path} ${host} ${type} ${target} ${arch} -m qt3d qt5compat qtactiveqt qtcharts qtconnectivity qtdatavis3d qtgraphs qtgrpc qthttpserver qtimageformats qtlanguageserver qtlocation qtlottie qtmultimedia qtnetworkauth qtpdf qtpositioning qtquick3d qtquick3dphysics qtquickeffectmaker qtquicktimeline qtremoteobjects qtscxml qtsensors qtserialbus qtserialport qtshadertools qtspeech qtvirtualkeyboard qtwebchannel qtwebengine qtwebsockets qtwebview) endif() if (NOT EXISTS "${prefix}") message(STATUS "Downloading Qt binaries for ${target}:${host}:${type}:${arch}:${arch_path}") - set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.1.18") + set(AQT_PREBUILD_BASE_URL "https://github.com/miurahr/aqtinstall/releases/download/v3.2.1") if (WIN32) set(aqt_path "${base_path}/aqt.exe") if (NOT EXISTS "${aqt_path}") diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 9425ee73f6..83ca3307fc 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -450,12 +450,12 @@ if(UNIX AND NOT APPLE) install(TARGETS yuzu) endif() -if (WIN32 AND QT_VERSION VERSION_GREATER_EQUAL 6) +if (WIN32 AND USE_SYSTEM_QT AND QT_VERSION VERSION_GREATER_EQUAL 6) set(YUZU_EXE_DIR "$") - add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/yuzu.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0) + add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/eden.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0) endif() -if (YUZU_USE_BUNDLED_QT) +if (NOT USE_SYSTEM_QT) include(CopyYuzuQt6Deps) copy_yuzu_Qt6_deps(yuzu) endif() From 9d7075254d9ce70f75eed5b9709504cf0d3cc0bc Mon Sep 17 00:00:00 2001 From: Bix Date: Wed, 14 May 2025 17:35:38 +0000 Subject: [PATCH 09/26] Added Samsung Gaming hub support (#107) Added Samsung Gaming hub to the APP manifest. Signed-off-by: Bix Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/107 --- src/android/app/src/main/AndroidManifest.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/android/app/src/main/AndroidManifest.xml b/src/android/app/src/main/AndroidManifest.xml index 6ad1d1c1bf..51b1d1bc58 100644 --- a/src/android/app/src/main/AndroidManifest.xml +++ b/src/android/app/src/main/AndroidManifest.xml @@ -31,9 +31,14 @@ SPDX-License-Identifier: GPL-3.0-or-later android:dataExtractionRules="@xml/data_extraction_rules_api_31" android:enableOnBackInvokedCallback="true"> - + + + Date: Sat, 17 May 2025 20:22:25 +0000 Subject: [PATCH 10/26] fixes vulkan issues and android settings (#105) - removes provoking vertex, vertex input, dynamic state if not supported - moves dynamic state to be a 0-3 slider and vertex input its own checkbox - the rich presence was disabled on linux. - there were duplicate settings in "edens veil"? - weird behavior of the vertex input checkbox on per game setting - adds xenoblade 2 to the d24 conversion control function - adds the flush logs by line setting to android. - adds the memory layout setting to android - Adds the option to show building shaders on the android overlay. Signed-off-by: Aleksandr Popovich Co-authored-by: swurl Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/105 Co-authored-by: Aleksandr Popovich Co-committed-by: Aleksandr Popovich --- .ci/linux/build.sh | 1 - .../java/org/yuzu/yuzu_emu/NativeLibrary.kt | 5 + .../features/settings/model/BooleanSetting.kt | 8 +- .../features/settings/model/IntSetting.kt | 1 + .../settings/model/view/SettingsItem.kt | 31 ++- .../settings/ui/SettingsFragmentPresenter.kt | 18 +- .../yuzu_emu/fragments/EmulationFragment.kt | 23 +- .../app/src/main/jni/android_settings.h | 176 ++++++------ src/android/app/src/main/jni/native.cpp | 17 ++ src/android/app/src/main/jni/native.h | 4 +- .../app/src/main/res/values-ar/strings.xml | 4 +- .../app/src/main/res/values-ckb/strings.xml | 4 +- .../app/src/main/res/values-cs/strings.xml | 4 +- .../app/src/main/res/values-de/strings.xml | 4 +- .../app/src/main/res/values-es/strings.xml | 4 +- .../app/src/main/res/values-fa/strings.xml | 4 +- .../app/src/main/res/values-fr/strings.xml | 4 +- .../app/src/main/res/values-he/strings.xml | 4 +- .../app/src/main/res/values-hu/strings.xml | 4 +- .../app/src/main/res/values-id/strings.xml | 4 +- .../app/src/main/res/values-it/strings.xml | 4 +- .../app/src/main/res/values-ja/strings.xml | 4 +- .../app/src/main/res/values-ko/strings.xml | 4 +- .../app/src/main/res/values-nb/strings.xml | 4 +- .../app/src/main/res/values-pl/strings.xml | 4 +- .../src/main/res/values-pt-rBR/strings.xml | 4 +- .../src/main/res/values-pt-rPT/strings.xml | 4 +- .../app/src/main/res/values-ru/strings.xml | 4 +- .../app/src/main/res/values-uk/strings.xml | 4 +- .../app/src/main/res/values-vi/strings.xml | 4 +- .../src/main/res/values-zh-rCN/strings.xml | 4 +- .../src/main/res/values-zh-rTW/strings.xml | 4 +- .../app/src/main/res/values/arrays.xml | 12 + .../app/src/main/res/values/strings.xml | 22 +- src/common/settings.h | 7 +- src/core/hle/kernel/k_memory_layout.h | 2 +- .../renderer_vulkan/vk_graphics_pipeline.cpp | 6 +- .../renderer_vulkan/vk_pipeline_cache.cpp | 28 +- .../renderer_vulkan/vk_rasterizer.cpp | 61 +++-- .../renderer_vulkan/vk_rasterizer.h | 4 + .../vulkan_common/vulkan_device.cpp | 254 ++++++++++-------- src/video_core/vulkan_common/vulkan_device.h | 82 +++--- .../configure_graphics_extensions.cpp | 17 +- src/yuzu/configuration/shared_translation.cpp | 83 +++--- src/yuzu/configuration/shared_widget.cpp | 6 +- src/yuzu/configuration/shared_widget.h | 2 +- 46 files changed, 555 insertions(+), 403 deletions(-) diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh index c020cc7edd..f030e9b748 100755 --- a/.ci/linux/build.sh +++ b/.ci/linux/build.sh @@ -60,7 +60,6 @@ cmake .. -G Ninja \ -DYUZU_USE_QT_MULTIMEDIA=OFF \ -DYUZU_USE_QT_WEB_ENGINE=OFF \ -DENABLE_QT_TRANSLATION=ON \ - -DUSE_DISCORD_PRESENCE=OFF \ -DYUZU_USE_FASTER_LD=OFF \ -DYUZU_ENABLE_LTO=ON \ -DCMAKE_LINKER=/usr/bin/mold \ diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt index 1848ca9ef9..0be943eb86 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt @@ -166,6 +166,11 @@ object NativeLibrary { */ external fun getPerfStats(): DoubleArray + /** + * Returns the number of shaders being built + */ + external fun getShadersBuilding(): Int + /** * Returns the current CPU backend. */ diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt index 2601387b76..3c8ce3504d 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt @@ -20,7 +20,7 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting { RENDERER_FAST_GPU("use_fast_gpu_time"), RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"), RENDERER_DEBUG("debug"), - RENDERER_DYNA_STATE3("dyna_state3"), + RENDERER_VERTEX_INPUT("vertex_input"), RENDERER_PROVOKING_VERTEX("provoking_vertex"), RENDERER_DESCRIPTOR_INDEXING("descriptor_indexing"), PICTURE_IN_PICTURE("picture_in_picture"), @@ -41,12 +41,14 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting { SHOW_APP_RAM_USAGE("show_app_ram_usage"), SHOW_SYSTEM_RAM_USAGE("show_system_ram_usage"), SHOW_BAT_TEMPERATURE("show_bat_temperature"), + SHOW_SHADERS_BUILDING("show_shaders_building"), OVERLAY_BACKGROUND("overlay_background"), - USE_LRU_CACHE("use_lru_cache"),; + DEBUG_FLUSH_BY_LINE("flush_lines"), + USE_LRU_CACHE("use_lru_cache"); + external fun isFrameSkippingEnabled(): Boolean external fun isFrameInterpolationEnabled(): Boolean - override fun getBoolean(needsGlobal: Boolean): Boolean = NativeConfig.getBoolean(key, needsGlobal) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt index 035a33a762..3e1c43ca89 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt @@ -33,6 +33,7 @@ enum class IntSetting(override val key: String) : AbstractIntSetting { LOCK_DRAWER("lock_drawer"), VERTICAL_ALIGNMENT("vertical_alignment"), PERF_OVERLAY_POSITION("perf_overlay_position"), + MEMORY_LAYOUT("memory_layout_mode"), FSR_SHARPENING_SLIDER("fsr_sharpening_slider"); override fun getInt(needsGlobal: Boolean): Int = NativeConfig.getInt(key, needsGlobal) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt index a373bd816c..49e2a19474 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt @@ -136,14 +136,14 @@ abstract class SettingsItem( titleId = R.string.dyna_state, descriptionId = R.string.dyna_state_description, min = 0, - max = 2, + max = 3, ) ) put( SwitchSetting( - BooleanSetting.RENDERER_DYNA_STATE3, - titleId = R.string.dyna_state3, - descriptionId = R.string.dyna_state3_description + BooleanSetting.RENDERER_VERTEX_INPUT, + titleId = R.string.vertex_input, + descriptionId = R.string.vertex_input_description ) ) put( @@ -193,6 +193,13 @@ abstract class SettingsItem( descriptionId = R.string.picture_in_picture_description ) ) + put( + SwitchSetting( + BooleanSetting.DEBUG_FLUSH_BY_LINE, + titleId = R.string.flush_by_line, + descriptionId = R.string.flush_by_line_description + ) + ) val dockedModeSetting = object : AbstractBooleanSetting { override val key = BooleanSetting.USE_DOCKED_MODE.key @@ -238,6 +245,15 @@ abstract class SettingsItem( descriptionId = R.string.use_docked_mode_description ) ) + put( + SingleChoiceSetting( + IntSetting.MEMORY_LAYOUT, + titleId = R.string.memory_layout, + descriptionId = R.string.memory_layout_description, + choicesId = R.array.memoryNames, + valuesId = R.array.memoryValues + ) + ) put( SwitchSetting( BooleanSetting.CORE_SYNC_CORE_SPEED, @@ -397,6 +413,13 @@ abstract class SettingsItem( descriptionId = R.string.show_bat_temperature_description ) ) + put( + SwitchSetting( + BooleanSetting.SHOW_SHADERS_BUILDING, + R.string.show_shaders_building, + descriptionId = R.string.show_shaders_building_description + ) + ) put( SingleChoiceSetting( IntSetting.RENDERER_VSYNC, diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index aa7cae083b..0d426f67f5 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -241,17 +241,6 @@ class SettingsFragmentPresenter( ) ) addEdenVeilSettings(sl) - - add(BooleanSetting.FRAME_INTERPOLATION.key) - add(BooleanSetting.FRAME_SKIPPING.key) - add(BooleanSetting.CORE_SYNC_CORE_SPEED.key) - add(IntSetting.RENDERER_SHADER_BACKEND.key) - add(IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT.key) - add(IntSetting.RENDERER_NVDEC_EMULATION.key) - add(IntSetting.RENDERER_ASTC_DECODE_METHOD.key) - add(IntSetting.RENDERER_ASTC_RECOMPRESSION.key) - add(IntSetting.RENDERER_VRAM_USAGE_MODE.key) - add(BooleanSetting.USE_LRU_CACHE.key) } } @@ -261,6 +250,7 @@ class SettingsFragmentPresenter( add(BooleanSetting.RENDERER_USE_SPEED_LIMIT.key) add(ShortSetting.RENDERER_SPEED_LIMIT.key) add(BooleanSetting.USE_DOCKED_MODE.key) + add(IntSetting.MEMORY_LAYOUT.key) add(IntSetting.REGION_INDEX.key) add(IntSetting.LANGUAGE_INDEX.key) add(BooleanSetting.USE_CUSTOM_RTC.key) @@ -301,6 +291,7 @@ class SettingsFragmentPresenter( add(BooleanSetting.SHOW_APP_RAM_USAGE.key) add(BooleanSetting.SHOW_SYSTEM_RAM_USAGE.key) add(BooleanSetting.SHOW_BAT_TEMPERATURE.key) + add(BooleanSetting.SHOW_SHADERS_BUILDING.key) } } @@ -466,7 +457,7 @@ class SettingsFragmentPresenter( add(ByteSetting.RENDERER_DYNA_STATE.key) - add(BooleanSetting.RENDERER_DYNA_STATE3.key) + add(BooleanSetting.RENDERER_VERTEX_INPUT.key) add(BooleanSetting.RENDERER_PROVOKING_VERTEX.key) add(BooleanSetting.RENDERER_DESCRIPTOR_INDEXING.key) @@ -1143,6 +1134,9 @@ class SettingsFragmentPresenter( add(BooleanSetting.USE_AUTO_STUB.key) add(BooleanSetting.CPU_DEBUG_MODE.key) add(SettingsItem.FASTMEM_COMBINED) + + add(HeaderSetting(R.string.log)) + add(BooleanSetting.DEBUG_FLUSH_BY_LINE.key) } } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index ddf3cb1fe1..8fc473410a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -64,6 +64,7 @@ import org.yuzu.yuzu_emu.features.settings.model.IntSetting import org.yuzu.yuzu_emu.features.settings.model.Settings import org.yuzu.yuzu_emu.features.settings.model.Settings.EmulationOrientation import org.yuzu.yuzu_emu.features.settings.model.Settings.EmulationVerticalAlignment +import org.yuzu.yuzu_emu.features.settings.model.ShortSetting import org.yuzu.yuzu_emu.features.settings.utils.SettingsFile import org.yuzu.yuzu_emu.model.DriverViewModel import org.yuzu.yuzu_emu.model.EmulationViewModel @@ -399,7 +400,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { emulationState.updateSurface() // Setup overlays - updateshowStatsOvelray() + updateShowStatsOverlay() // Re update binding when the specs values get initialized properly binding.inGameMenu.getHeaderView(0).apply { @@ -532,7 +533,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } } @SuppressLint("DefaultLocale") - private fun updateshowStatsOvelray() { + private fun updateShowStatsOverlay() { val showOverlay = BooleanSetting.SHOW_PERFORMANCE_OVERLAY.getBoolean() binding.showStatsOverlayText.apply { setTextColor( @@ -587,10 +588,12 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { if (BooleanSetting.SHOW_SPEED.getBoolean(NativeConfig.isPerGameConfigLoaded())) { if (sb.isNotEmpty()) sb.append(" | ") + // TODO(alekpop): this is broken on android only. it uses the clock timer but it should not. sb.append( String.format( - "Speed: %d%%", - (perfStats[SPEED] * 100.0 + 0.5).toInt() + "Speed: %d%% / %d%%", + (perfStats[SPEED] * 100.0 + 0.5).toInt(), + ShortSetting.RENDERER_SPEED_LIMIT.getShort(NativeConfig.isPerGameConfigLoaded()) ) ) } @@ -619,6 +622,16 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { sb.append(String.format("%.1f°C/%.1f°F", batteryTemp, tempF)) } + val shadersBuilding = NativeLibrary.getShadersBuilding() + + if (BooleanSetting.SHOW_SHADERS_BUILDING.getBoolean(NativeConfig.isPerGameConfigLoaded()) && shadersBuilding != 0) { + if (sb.isNotEmpty()) sb.append(" | ") + + val prefix = getString(R.string.shaders_prefix) + val suffix = getString(R.string.shaders_suffix) + sb.append(String.format("$prefix %d $suffix", shadersBuilding)) + } + if (BooleanSetting.OVERLAY_BACKGROUND.getBoolean(NativeConfig.isPerGameConfigLoaded())) { binding.showStatsOverlayText.setBackgroundResource(R.color.yuzu_transparent_black) } else { @@ -849,7 +862,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { R.id.menu_show_stats_overlay -> { it.isChecked = !it.isChecked BooleanSetting.SHOW_PERFORMANCE_OVERLAY.setBoolean(it.isChecked) - updateshowStatsOvelray() + updateShowStatsOverlay() true } R.id.menu_edit_overlay -> { diff --git a/src/android/app/src/main/jni/android_settings.h b/src/android/app/src/main/jni/android_settings.h index ff569d1981..9a71822c6a 100644 --- a/src/android/app/src/main/jni/android_settings.h +++ b/src/android/app/src/main/jni/android_settings.h @@ -9,90 +9,116 @@ namespace AndroidSettings { -struct GameDir { - std::string path; - bool deep_scan = false; -}; + struct GameDir { + std::string path; + bool deep_scan = false; + }; -struct OverlayControlData { - std::string id; - bool enabled; - std::pair landscape_position; - std::pair portrait_position; - std::pair foldable_position; -}; + struct OverlayControlData { + std::string id; + bool enabled; + std::pair landscape_position; + std::pair portrait_position; + std::pair foldable_position; + }; -struct Values { - Settings::Linkage linkage; + struct Values { + Settings::Linkage linkage; - // Path settings - std::vector game_dirs; + // Path settings + std::vector game_dirs; - // Android - Settings::Setting picture_in_picture{linkage, false, "picture_in_picture", - Settings::Category::Android}; - Settings::Setting screen_layout{linkage, - 5, - "screen_layout", - Settings::Category::Android, - Settings::Specialization::Default, - true, - true}; - Settings::Setting vertical_alignment{linkage, - 0, - "vertical_alignment", - Settings::Category::Android, - Settings::Specialization::Default, - true, - true}; + // Android + Settings::Setting picture_in_picture{linkage, false, "picture_in_picture", + Settings::Category::Android}; + Settings::Setting screen_layout{linkage, + 5, + "screen_layout", + Settings::Category::Android, + Settings::Specialization::Default, + true, + true}; + Settings::Setting vertical_alignment{linkage, + 0, + "vertical_alignment", + Settings::Category::Android, + Settings::Specialization::Default, + true, + true}; - Settings::SwitchableSetting driver_path{linkage, "", "driver_path", - Settings::Category::GpuDriver}; + Settings::SwitchableSetting driver_path{linkage, "", "driver_path", + Settings::Category::GpuDriver}; - // LRU Cache - Settings::SwitchableSetting use_lru_cache{linkage, true, "use_lru_cache", - Settings::Category::System}; + // LRU Cache + Settings::SwitchableSetting use_lru_cache{linkage, true, "use_lru_cache", + Settings::Category::System}; - Settings::Setting theme{linkage, 0, "theme", Settings::Category::Android}; - Settings::Setting theme_mode{linkage, -1, "theme_mode", Settings::Category::Android}; - Settings::Setting black_backgrounds{linkage, false, "black_backgrounds", - Settings::Category::Android}; + Settings::Setting theme{linkage, 0, "theme", Settings::Category::Android}; + Settings::Setting theme_mode{linkage, -1, "theme_mode", Settings::Category::Android}; + Settings::Setting black_backgrounds{linkage, false, "black_backgrounds", + Settings::Category::Android}; - // Input/performance overlay settings - std::vector overlay_control_data; - Settings::Setting overlay_scale{linkage, 50, "control_scale", Settings::Category::Overlay}; - Settings::Setting overlay_opacity{linkage, 100, "control_opacity", - Settings::Category::Overlay}; - - Settings::Setting joystick_rel_center{linkage, true, "joystick_rel_center", - Settings::Category::Overlay}; - Settings::Setting dpad_slide{linkage, true, "dpad_slide", Settings::Category::Overlay}; - Settings::Setting haptic_feedback{linkage, true, "haptic_feedback", - Settings::Category::Overlay}; - Settings::Setting show_performance_overlay{linkage, true, "show_performance_overlay", - Settings::Category::Overlay, Settings::Specialization::Paired, true , true}; - Settings::Setting overlay_background{linkage, false, "overlay_background", - Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; - Settings::Setting perf_overlay_position{linkage, 0, "perf_overlay_position", - Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; - Settings::Setting show_fps{linkage, true, "show_fps", - Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; - Settings::Setting show_frame_time{linkage, false, "show_frame_time", - Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; - Settings::Setting show_speed{linkage, true, "show_speed", - Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; - Settings::Setting show_app_ram_usage{linkage, false, "show_app_ram_usage", - Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; - Settings::Setting show_system_ram_usage{linkage, false, "show_system_ram_usage", - Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; - Settings::Setting show_bat_temperature{linkage, false, "show_bat_temperature", - Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; - Settings::Setting show_input_overlay{linkage, true, "show_input_overlay", + // Input/performance overlay settings + std::vector overlay_control_data; + Settings::Setting overlay_scale{linkage, 50, "control_scale", + Settings::Category::Overlay}; + Settings::Setting overlay_opacity{linkage, 100, "control_opacity", Settings::Category::Overlay}; - Settings::Setting touchscreen{linkage, true, "touchscreen", Settings::Category::Overlay}; - Settings::Setting lock_drawer{linkage, false, "lock_drawer", Settings::Category::Overlay}; -}; -extern Values values; + Settings::Setting joystick_rel_center{linkage, true, "joystick_rel_center", + Settings::Category::Overlay}; + Settings::Setting dpad_slide{linkage, true, "dpad_slide", + Settings::Category::Overlay}; + Settings::Setting haptic_feedback{linkage, true, "haptic_feedback", + Settings::Category::Overlay}; + Settings::Setting show_performance_overlay{linkage, true, "show_performance_overlay", + Settings::Category::Overlay, + Settings::Specialization::Paired, true, + true}; + Settings::Setting overlay_background{linkage, false, "overlay_background", + Settings::Category::Overlay, + Settings::Specialization::Default, true, true, + &show_performance_overlay}; + Settings::Setting perf_overlay_position{linkage, 0, "perf_overlay_position", + Settings::Category::Overlay, + Settings::Specialization::Default, true, true, + &show_performance_overlay}; + Settings::Setting show_fps{linkage, true, "show_fps", + Settings::Category::Overlay, + Settings::Specialization::Default, true, true, + &show_performance_overlay}; + Settings::Setting show_frame_time{linkage, false, "show_frame_time", + Settings::Category::Overlay, + Settings::Specialization::Default, true, true, + &show_performance_overlay}; + Settings::Setting show_speed{linkage, true, "show_speed", + Settings::Category::Overlay, + Settings::Specialization::Default, true, true, + &show_performance_overlay}; + Settings::Setting show_app_ram_usage{linkage, false, "show_app_ram_usage", + Settings::Category::Overlay, + Settings::Specialization::Default, true, true, + &show_performance_overlay}; + Settings::Setting show_system_ram_usage{linkage, false, "show_system_ram_usage", + Settings::Category::Overlay, + Settings::Specialization::Default, true, true, + &show_performance_overlay}; + Settings::Setting show_bat_temperature{linkage, false, "show_bat_temperature", + Settings::Category::Overlay, + Settings::Specialization::Default, true, true, + &show_performance_overlay}; + Settings::Setting show_shaders_building{linkage, true, "show_shaders_building", + Settings::Category::Overlay, + Settings::Specialization::Default, true, true, + &show_performance_overlay}; + Settings::Setting show_input_overlay{linkage, true, "show_input_overlay", + Settings::Category::Overlay}; + Settings::Setting touchscreen{linkage, true, "touchscreen", + Settings::Category::Overlay}; + Settings::Setting lock_drawer{linkage, false, "lock_drawer", + Settings::Category::Overlay}; + }; + + extern Values values; } // namespace AndroidSettings diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 6dac1ef84e..962fae126c 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -67,6 +67,7 @@ #include "video_core/renderer_vulkan/renderer_vulkan.h" #include "video_core/vulkan_common/vulkan_instance.h" #include "video_core/vulkan_common/vulkan_surface.h" +#include "video_core/shader_notify.h" #define jconst [[maybe_unused]] const auto #define jauto [[maybe_unused]] auto @@ -158,6 +159,12 @@ const Core::PerfStatsResults& EmulationSession::PerfStats() { return m_perf_stats; } +int EmulationSession::ShadersBuilding() { + auto& shader_notify = m_system.GPU().ShaderNotify(); + m_shaders_building = shader_notify.ShadersBuilding(); + return m_shaders_building; +} + void EmulationSession::SurfaceChanged() { if (!IsRunning()) { return; @@ -610,6 +617,16 @@ jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats(JNIEnv* env, jcl return j_stats; } +jint Java_org_yuzu_yuzu_1emu_NativeLibrary_getShadersBuilding(JNIEnv* env, jclass clazz) { + jint j_shaders = 0; + + if (EmulationSession::GetInstance().IsRunning()) { + j_shaders = EmulationSession::GetInstance().ShadersBuilding(); + } + + return j_shaders; +} + jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCpuBackend(JNIEnv* env, jclass clazz) { if (Settings::IsNceEnabled()) { return Common::Android::ToJString(env, "NCE"); diff --git a/src/android/app/src/main/jni/native.h b/src/android/app/src/main/jni/native.h index 6a4551ada2..4cc838ee5a 100644 --- a/src/android/app/src/main/jni/native.h +++ b/src/android/app/src/main/jni/native.h @@ -44,6 +44,7 @@ public: void ShutdownEmulation(); const Core::PerfStatsResults& PerfStats(); + int ShadersBuilding(); void ConfigureFilesystemProvider(const std::string& filepath); void InitializeSystem(bool reload); void SetAppletId(int applet_id); @@ -72,6 +73,7 @@ private: InputCommon::InputSubsystem m_input_subsystem; Common::DetachedTasks m_detached_tasks; Core::PerfStatsResults m_perf_stats{}; + int m_shaders_building{0}; std::shared_ptr m_vfs; Core::SystemResultStatus m_load_result{Core::SystemResultStatus::ErrorNotInitialized}; std::atomic m_is_running = false; @@ -89,4 +91,4 @@ private: // Program index for next boot std::atomic m_next_program_index = -1; -}; +}; \ No newline at end of file diff --git a/src/android/app/src/main/res/values-ar/strings.xml b/src/android/app/src/main/res/values-ar/strings.xml index 53c0be9039..6ffcc1ff9e 100644 --- a/src/android/app/src/main/res/values-ar/strings.xml +++ b/src/android/app/src/main/res/values-ar/strings.xml @@ -49,8 +49,8 @@ تمكين أو تعطيل ذاكرة التخزين المؤقت الأقل استخدامًا (LRU)، مما يزيد الأداء عن طريق توفير استخدام وحدة المعالجة المركزية. بعض الألعاب بها مشاكل معها، خاصة TotK 1.2.1، لذا قم بتعطيلها إذا لم يتم تشغيل اللعبة أو تعطلت بشكل عشوائي. الحالة الديناميكية الممتدة يُمكّن ميزات فولكان لتحسين الأداء، التقديم، وتوفير الموارد أثناء إنشاء خطوط المعالجة مع الحفاظ على استهلاك أقل لوحدة المعالجة المركزية/وحدة معالجة الرسومات. قد تزيد هذه الامتدادات من درجة حرارة الجهاز، وقد لا تتفاعل وحدات معالجة الرسومات القديمة من سلسلة A6XX بشكل صحيح. اضبط على 0 لاستخدام تنسيقات Yuzu المحاكاة. - EDS3 + VertexInputDynamicState - يحسن الأداء على الأجهزة الأحدث. مدعوم فقط على وحدات معالجة الرسومات التي تدعم فولكان 1.3+. + VertexInputDynamicState + يحسن الأداء على الأجهزة الأحدث. مدعوم فقط على وحدات معالجة الرسومات التي تدعم فولكان 1.3+. مزامنة سرعة النواة مزامنة سرعة النواة مع النسبة القصوى للسرعة لتحسين الأداء دون تغيير السرعة الفعلية للعبة. استخدام الستاب التلقائي diff --git a/src/android/app/src/main/res/values-ckb/strings.xml b/src/android/app/src/main/res/values-ckb/strings.xml index a96132bfbb..00b282081d 100644 --- a/src/android/app/src/main/res/values-ckb/strings.xml +++ b/src/android/app/src/main/res/values-ckb/strings.xml @@ -50,8 +50,8 @@ چالاک یان ناچالاککردنی کاشەی LRU (کەمترین بەکارهێنراوی دوایی)، کارایی زیاد دەکات بە هەڵگرتنی بەکارهێنانی CPU. هەندێک یاری کێشەییان هەیە لەگەڵیدا، بەتایبەتی TotK 1.2.1، بۆیە ئەگەر یاریەکە نەکەوتەوە یان بە هەڕەمەکی داخرا، ناچالاکی بکە. الحالة الديناميكية الممتدة يُمكّن ميزات فولكان لتحسين الأداء، التقديم، وتوفير الموارد أثناء إنشاء خطوط المعالجة مع الحفاظ على استهلاك أقل لوحدة المعالجة المركزية/وحدة معالجة الرسومات. قد تزيد هذه الامتدادات من درجة حرارة الجهاز، وقد لا تتفاعل وحدات معالجة الرسومات القديمة من سلسلة A6XX بشكل صحيح. اضبط على 0 لاستخدام تنسيقات Yuzu المحاكاة. - EDS3 + VertexInputDynamicState - يحسن الأداء على الأجهزة الأحدث. مدعوم فقط على وحدات معالجة الرسومات التي تدعم فولكان 1.3+. + VertexInputDynamicState + يحسن الأداء على الأجهزة الأحدث. مدعوم فقط على وحدات معالجة الرسومات التي تدعم فولكان 1.3+. مزامنة سرعة النواة خێرایی تیکەکانی ناوک ڕێکبخە لەگەڵ ڕێژەی خێرایی بەرزترین بۆ باشترکردنی کارایی بەبێ گۆڕینی خێرایی ڕاستەقینەی یارییەکە. استخدام الستاب التلقائي diff --git a/src/android/app/src/main/res/values-cs/strings.xml b/src/android/app/src/main/res/values-cs/strings.xml index 76ef57a906..95fcc9f75c 100644 --- a/src/android/app/src/main/res/values-cs/strings.xml +++ b/src/android/app/src/main/res/values-cs/strings.xml @@ -49,8 +49,8 @@ Povolte nebo zakažte mezipaměť LRU (Least Recently Used), což zvýší výkon snížením zatížení CPU. Některé hry s ní mají problémy, zejména TotK 1.2.1, proto ji deaktivujte, pokud hra nespustí nebo náhodně padá. Rozšířený dynamický stav Umožňuje funkce Vulkan pro lepší výkon, vykreslování a úsporu zdrojů při vytváření grafických pipeline při zachování nižšího využití CPU/GPU. Tato rozšíření mohou zvýšit teplotu zařízení a starší GPU řady A6XX nemusí reagovat správně. Nastavte na 0 pro použití emulovaných formátů Yuzu. - EDS3 + VertexInputDynamicState - Zlepšuje výkon na novějších zařízeních. Podporováno pouze na GPU s Vulkan 1.3+. + VertexInputDynamicState + Zlepšuje výkon na novějších zařízeních. Podporováno pouze na GPU s Vulkan 1.3+. Synchronizovat rychlost jádra Synchronizuje rychlost jádra s maximálním procentem rychlosti, aby se zlepšil výkon bez změny skutečné rychlosti hry. Použít automatický stub diff --git a/src/android/app/src/main/res/values-de/strings.xml b/src/android/app/src/main/res/values-de/strings.xml index 805db9adcc..d444c5ca88 100644 --- a/src/android/app/src/main/res/values-de/strings.xml +++ b/src/android/app/src/main/res/values-de/strings.xml @@ -50,8 +50,8 @@ Aktivieren oder deaktivieren Sie den LRU-Cache (Least Recently Used), um die Leistung durch Reduzierung der CPU-Auslastung zu verbessern. Einige Spiele haben Probleme damit, insbesondere TotK 1.2.1, deaktivieren Sie ihn also, wenn das Spiel nicht startet oder zufällig abstürzt. Erweiterter dynamischer Status Aktiviert Vulkan-Funktionen zur Verbesserung der Leistung, des Renderings und zur Ressourceneinsparung bei der Pipeline-Erstellung, während die CPU/GPU-Auslastung niedrig bleibt. Diese Erweiterungen können die Gerätetemperatur erhöhen, und ältere GPUs der A6XX-Serie reagieren möglicherweise nicht korrekt. Auf 0 setzen, um emulierte Yuzu-Formate zu verwenden. - EDS3 + VertexInputDynamicState - Verbessert die Leistung auf neueren Geräten. Wird nur von GPUs mit Vulkan 1.3+ unterstützt. + VertexInputDynamicState + Verbessert die Leistung auf neueren Geräten. Wird nur von GPUs mit Vulkan 1.3+ unterstützt. Kern-Geschwindigkeit synchronisieren Synchronisiert die Taktrate des Kerns mit der maximalen Geschwindigkeit, um die Leistung zu verbessern, ohne die tatsächliche Spielgeschwindigkeit zu verändern. Auto-Stub verwenden diff --git a/src/android/app/src/main/res/values-es/strings.xml b/src/android/app/src/main/res/values-es/strings.xml index 5137b04d18..fb819a2401 100644 --- a/src/android/app/src/main/res/values-es/strings.xml +++ b/src/android/app/src/main/res/values-es/strings.xml @@ -50,8 +50,8 @@ Activa o desactiva la caché LRU (menos usados recientemente), aumentando el rendimiento al ahorrar uso de CPU. Algunos juegos tienen problemas con ella, especialmente TotK 1.2.1, así que desactívala si el juego no arranca o se cierra aleatoriamente. Estado dinámico extendido Habilita funciones Vulkan para mejorar rendimiento, renderizado y ahorrar recursos en creación de pipelines manteniendo bajo uso de CPU/GPU. Estas extensiones pueden aumentar la temperatura del dispositivo y GPUs antiguas de serie A6XX podrían no responder correctamente. Establecer en 0 para usar formatos emulados de Yuzu. - EDS3 + VertexInputDynamicState - Mejora el rendimiento en dispositivos nuevos. Solo compatible con GPUs Vulkan 1.3+. + VertexInputDynamicState + Mejora el rendimiento en dispositivos nuevos. Solo compatible con GPUs Vulkan 1.3+. Sincronizar velocidad del núcleo Sincroniza la velocidad del núcleo con el porcentaje máximo de velocidad para mejorar el rendimiento sin alterar la velocidad real del juego. Usar Auto Stub diff --git a/src/android/app/src/main/res/values-fa/strings.xml b/src/android/app/src/main/res/values-fa/strings.xml index 9513e16bc0..c39f102d77 100644 --- a/src/android/app/src/main/res/values-fa/strings.xml +++ b/src/android/app/src/main/res/values-fa/strings.xml @@ -50,8 +50,8 @@ فعال یا غیرفعال کردن کش LRU (کمترین اخیراً استفاده شده)، که با کاهش استفاده از CPU عملکرد را افزایش می‌دهد. برخی بازی‌ها با آن مشکل دارند، به ویژه TotK 1.2.1، بنابراین اگر بازی اجرا نشد یا به صورت تصادفی کرش کرد، آن را غیرفعال کنید. حالت پویای گسترده قابلیت‌های ولکان را برای بهبود عملکرد، رندرینگ و صرفه‌جویی در منابع هنگام ایجاد خط لوله فعال می‌کند در حالی که مصرف CPU/GPU پایین حفظ می‌شود. این افزونه‌ها ممکن است دمای دستگاه را افزایش دهند و کارت‌های گرافیک سری قدیمی A6XX ممکن است واکنش مناسبی نشان ندهند. برای استفاده از فرمت‌های شبیه‌سازی شده یوزو روی 0 تنظیم کنید - EDS3 + حالت پویای ورودی رأس - عملکرد را در دستگاه‌های جدیدتر بهبود می‌بخشد. فقط در کارت‌های گرافیک با پشتیبانی از ولکان 1.3+ قابل استفاده است + حالت پویای ورودی رأس + عملکرد را در دستگاه‌های جدیدتر بهبود می‌بخشد. فقط در کارت‌های گرافیک با پشتیبانی از ولکان 1.3+ قابل استفاده است همگام‌سازی سرعت هسته همگام‌سازی سرعت هسته با حداکثر درصد سرعت برای بهبود عملکرد بدون تغییر سرعت واقعی بازی. استفاده از استاب خودکار diff --git a/src/android/app/src/main/res/values-fr/strings.xml b/src/android/app/src/main/res/values-fr/strings.xml index 7eeaebc7b7..07b9b92e8d 100644 --- a/src/android/app/src/main/res/values-fr/strings.xml +++ b/src/android/app/src/main/res/values-fr/strings.xml @@ -50,8 +50,8 @@ Activez ou désactivez le cache LRU (Least Recently Used), ce qui améliore les performances en réduisant l\'utilisation du CPU. Certains jeux ont des problèmes avec, notamment TotK 1.2.1, désactivez-le donc si le jeu ne démarre pas ou plante aléatoirement. État dynamique étendu Active les fonctionnalités Vulkan pour améliorer les performances, le rendu et économiser les ressources lors de la création de pipelines tout en maintenant une faible utilisation CPU/GPU. Ces extensions peuvent augmenter la température de l`appareil, et les GPU plus anciens de la série A6XX peuvent ne pas réagir correctement. Réglez sur 0 pour utiliser les formats émulés de Yuzu. - EDS3 + VertexInputDynamicState - Améliore les performances sur les appareils récents. Pris en charge uniquement par les GPU Vulkan 1.3+. + VertexInputDynamicState + Améliore les performances sur les appareils récents. Pris en charge uniquement par les GPU Vulkan 1.3+. Synchroniser la vitesse du cœur Synchronise la vitesse du cœur avec le pourcentage de vitesse maximal pour améliorer les performances sans modifier la vitesse réelle du jeu. Utiliser le stub automatique diff --git a/src/android/app/src/main/res/values-he/strings.xml b/src/android/app/src/main/res/values-he/strings.xml index 7437db4f9f..3cd91dea59 100644 --- a/src/android/app/src/main/res/values-he/strings.xml +++ b/src/android/app/src/main/res/values-he/strings.xml @@ -50,8 +50,8 @@ הפעל או השבת את מטמון LRU (Least Recently Used), המשפר ביצועים על ידי חיסכון בשימוש במעבד. חלק מהמשחקים נתקלים בבעיות עם זה, במיוחד TotK 1.2.1, אז השבת אם המשחק לא נטען או קורס אקראית. מצב דינמי מורחב מאפשר תכונות Vulkan לשיפור ביצועים, רינדור וחיסכון במשאבים תוך שמירה על שימוש נמוך ב-CPU/GPU. הרחבות אלו עשויות להעלות את טמפ` המכשיר, וכרטיסי מסך מסדרת A6XX הישנים יותר עשויים לא להגיב כראוי. הגדר ל-0 כדי להשתמש בפורמטים המדומים של Yuzu. - EDS3 + VertexInputDynamicState - משפר ביצועים במכשירים חדשים יותר. נתמך רק בכרטיסי מסך עם Vulkan 1.3+. + VertexInputDynamicState + משפר ביצועים במכשירים חדשים יותר. נתמך רק בכרטיסי מסך עם Vulkan 1.3+. סנכרון מהירות ליבה סנכרן את מהירות הליבה לאחוז המהירות המרבי כדי לשפר ביצועים מבלי לשנות את מהירות המשחק בפועל. שימוש ב-Auto Stub diff --git a/src/android/app/src/main/res/values-hu/strings.xml b/src/android/app/src/main/res/values-hu/strings.xml index 9fb6f6321d..902d6ed647 100644 --- a/src/android/app/src/main/res/values-hu/strings.xml +++ b/src/android/app/src/main/res/values-hu/strings.xml @@ -50,8 +50,8 @@ Engedélyezze vagy tiltsa le az LRU gyorsítótárat (Least Recently Used), amely a CPU használatának csökkentésével növeli a teljesítményt. Néhány játékkal problémák adódhatnak, különösen a TotK 1.2.1 esetében, ezért tiltsa le, ha a játék nem indul el vagy véletlenszerűen összeomlik. Kiterjesztett Dinamikus Állapot Engedélyezi a Vulkan funkciókat a teljesítmény, a renderelés javításához és erőforrások megtakarításához a pipeline létrehozásánál, miközben alacsony CPU/GPU használatot tart fenn. Ezek a kiterjesztések növelhetik az eszköz hőmérsékletét, és a régebbi A6XX sorozatú GPU-k nem feltétlenül reagálnak megfelelően. Állítsa 0-ra a Yuzu által emulált formátumok használatához. - EDS3 + VertexInputDynamicState - Javítja a teljesítményt újabb eszközökön. Csak Vulkan 1.3+ GPU-kon támogatott. + VertexInputDynamicState + Javítja a teljesítményt újabb eszközökön. Csak Vulkan 1.3+ GPU-kon támogatott. Magsebesség szinkronizálása A mag sebességének szinkronizálása a maximális sebesség százalékával a teljesítmény javítása érdekében a játék tényleges sebességének megváltoztatása nélkül. Automatikus Stub használata diff --git a/src/android/app/src/main/res/values-id/strings.xml b/src/android/app/src/main/res/values-id/strings.xml index 4c8a969e5d..7741089115 100644 --- a/src/android/app/src/main/res/values-id/strings.xml +++ b/src/android/app/src/main/res/values-id/strings.xml @@ -50,8 +50,8 @@ Aktifkan atau nonaktifkan cache LRU (Least Recently Used), meningkatkan performa dengan menghemat penggunaan CPU. Beberapa game memiliki masalah dengannya, terutama TotK 1.2.1, jadi nonaktifkan jika game tidak mau boot atau sering crash. Status Dinamis Ekstensi Mengaktifkan fitur Vulkan untuk meningkatkan performa, rendering, dan menghemat sumber daya saat pembuatan pipeline sambil mempertahankan penggunaan CPU/GPU yang rendah. Ekstensi ini dapat meningkatkan suhu perangkat, dan GPU seri A6XX lama mungkin tidak merespons dengan benar. Setel ke 0 untuk menggunakan format emulasi Yuzu. - EDS3 + VertexInputDynamicState - Meningkatkan performa di perangkat baru. Hanya didukung di GPU Vulkan 1.3+. + VertexInputDynamicState + Meningkatkan performa di perangkat baru. Hanya didukung di GPU Vulkan 1.3+. Sinkronisasi Kecepatan Inti Sinkronkan kecepatan inti dengan persentase kecepatan maksimum untuk meningkatkan performa tanpa mengubah kecepatan sebenarnya dari permainan. Gunakan Auto Stub diff --git a/src/android/app/src/main/res/values-it/strings.xml b/src/android/app/src/main/res/values-it/strings.xml index 69a55c7a06..654b27a812 100644 --- a/src/android/app/src/main/res/values-it/strings.xml +++ b/src/android/app/src/main/res/values-it/strings.xml @@ -50,8 +50,8 @@ Abilita o disabilita la cache LRU (Least Recently Used), aumentando le prestazioni risparmiando l\'utilizzo della CPU. Alcuni giochi hanno problemi con essa, in particolare TotK 1.2.1, quindi disabilitala se il gioco non si avvia o si blocca casualmente. Stato dinamico esteso Abilita funzionalità Vulkan per migliorare prestazioni, rendering e risparmiare risorse durante la creazione della pipeline mantenendo un basso utilizzo di CPU/GPU. Queste estensioni possono aumentare la temperatura del dispositivo e le GPU più vecchie della serie A6XX potrebbero non rispondere correttamente. Imposta su 0 per usare i formati emulati da Yuzu. - EDS3 + VertexInputDynamicState - Migliora le prestazioni sui dispositivi più recenti. Supportato solo su GPU Vulkan 1.3+. + VertexInputDynamicState + Migliora le prestazioni sui dispositivi più recenti. Supportato solo su GPU Vulkan 1.3+. Sincronizza velocità core Sincronizza la velocità del core con la percentuale massima di velocità per migliorare le prestazioni senza alterare la velocità effettiva del gioco. Usa Auto Stub diff --git a/src/android/app/src/main/res/values-ja/strings.xml b/src/android/app/src/main/res/values-ja/strings.xml index 8314382285..e2d2985a66 100644 --- a/src/android/app/src/main/res/values-ja/strings.xml +++ b/src/android/app/src/main/res/values-ja/strings.xml @@ -50,8 +50,8 @@ LRUキャッシュ(最近最も使われていない)を有効または無効にし、CPU使用率を節約してパフォーマンスを向上させます。一部のゲーム(特にTotK 1.2.1)で問題が発生する可能性があるため、ゲームが起動しないかランダムにクラッシュする場合は無効にしてください。 拡張ダイナミックステート Vulkan機能を有効にしてパフォーマンスとレンダリングを向上させ、パイプライン作成時のリソースを節約しながらCPU/GPU使用率を低く保ちます。これらの拡張機能はデバイスの温度を上昇させる可能性があり、古いA6XXシリーズのGPUでは正しく反応しない場合があります。Yuzuのエミュレート形式を使用するには0に設定します。 - EDS3 + 頂点入力動的状態 - 新しいデバイスでパフォーマンスを向上させます。Vulkan 1.3+ GPUでのみサポートされています。 + 頂点入力動的状態 + 新しいデバイスでパフォーマンスを向上させます。Vulkan 1.3+ GPUでのみサポートされています。 コア速度の同期 コアの速度を最大速度パーセンテージに同期させ、ゲームの実際の速度を変えずにパフォーマンスを向上させます。 自動スタブを使用 diff --git a/src/android/app/src/main/res/values-ko/strings.xml b/src/android/app/src/main/res/values-ko/strings.xml index ede1e59d92..5dbb6d883e 100644 --- a/src/android/app/src/main/res/values-ko/strings.xml +++ b/src/android/app/src/main/res/values-ko/strings.xml @@ -50,8 +50,8 @@ LRU 캐시(최근 사용되지 않은 항목)를 활성화 또는 비활성화하여 CPU 사용량을 절약하고 성능을 향상시킵니다. 일부 게임(특히 TotK 1.2.1)에서 문제가 발생할 수 있으므로 게임이 부팅되지 않거나 무작위로 충돌하는 경우 비활성화하세요. 확장 동적 상태 Vulkan 기능을 활성화하여 파이프라인 생성 시 성능, 렌더링을 개선하고 리소스를 절약하면서 CPU/GPU 사용량을 낮게 유지합니다. 이러한 확장 기능은 장치 온도를 높일 수 있으며, 이전 A6XX 라인의 GPU는 제대로 반응하지 않을 수 있습니다. Yuzu 에뮬레이션 형식을 사용하려면 0으로 설정하세요. - EDS3 + 정점 입력 동적 상태 - 최신 기기에서 성능을 향상시킵니다. Vulkan 1.3+ GPU에서만 지원됩니다. + 정점 입력 동적 상태 + 최신 기기에서 성능을 향상시킵니다. Vulkan 1.3+ GPU에서만 지원됩니다. 코어 속도 동기화 코어 틱 속도를 최대 속도 백분율과 동기화하여 게임의 실제 속도를 변경하지 않고 성능을 향상시킵니다. 자동 스텁 사용 diff --git a/src/android/app/src/main/res/values-nb/strings.xml b/src/android/app/src/main/res/values-nb/strings.xml index 22792fb302..1a5b5ccefc 100644 --- a/src/android/app/src/main/res/values-nb/strings.xml +++ b/src/android/app/src/main/res/values-nb/strings.xml @@ -50,8 +50,8 @@ Aktiver eller deaktiver LRU-mellomlager (Least Recently Used), som forbedrer ytelsen ved å spare CPU-bruk. Noen spill har problemer med dette, spesielt TotK 1.2.1, så deaktiver hvis spillet ikke starter eller krasjer tilfeldig. Utvidet dynamisk tilstand Aktiverer Vulkan-funksjoner for å forbedre ytelse, rendering og spare ressurser ved pipeline-opprettelse samtidig som CPU/GPU-bruken holdes lav. Disse utvidelsene kan øke enhetstemperaturen, og eldre A6XX-serien GPU-er kan reagere unormalt. Sett til 0 for å bruke Yuzus emulerte formater. - EDS3 + VertexInputDynamicState - Forbedrer ytelsen på nyere enheter. Støttes kun på Vulkan 1.3+ GPU-er. + VertexInputDynamicState + Forbedrer ytelsen på nyere enheter. Støttes kun på Vulkan 1.3+ GPU-er. Synkroniser kjernespeed Synkroniser kjernens hastighet med maksimal hastighetsprosent for å forbedre ytelsen uten å endre spillets faktiske hastighet. Bruk Auto Stub diff --git a/src/android/app/src/main/res/values-pl/strings.xml b/src/android/app/src/main/res/values-pl/strings.xml index 55702b21ce..04a71eb8f1 100644 --- a/src/android/app/src/main/res/values-pl/strings.xml +++ b/src/android/app/src/main/res/values-pl/strings.xml @@ -50,8 +50,8 @@ Włącz lub wyłącz pamięć podręczną LRU (najrzadziej używane), zwiększając wydajność poprzez oszczędzanie użycia procesora. Niektóre gry mają z nią problemy, szczególnie TotK 1.2.1, więc wyłącz, jeśli gra się nie uruchamia lub losowo się zawiesza. Rozszerzony stan dynamiczny Włącza funkcje Vulkan w celu poprawy wydajności, renderowania i oszczędzania zasobów podczas tworzenia potoku, utrzymując niskie użycie CPU/GPU. Te rozszerzenia mogą zwiększać temperaturę urządzenia, a starsze GPU z serii A6XX mogą nie reagować prawidłowo. Ustaw na 0, aby używać formatów emulowanych przez Yuzu. - EDS3 + VertexInputDynamicState - Poprawia wydajność na nowszych urządzeniach. Obsługiwane tylko przez GPU Vulkan 1.3+. + VertexInputDynamicState + Poprawia wydajność na nowszych urządzeniach. Obsługiwane tylko przez GPU Vulkan 1.3+. Synchronizuj prędkość rdzenia Synchronizuje prędkość rdzenia z maksymalnym procentem prędkości, aby poprawić wydajność bez zmiany rzeczywistej prędkości gry. Użyj Auto Stub diff --git a/src/android/app/src/main/res/values-pt-rBR/strings.xml b/src/android/app/src/main/res/values-pt-rBR/strings.xml index 8ea90ceb61..d5eb1f6e7d 100644 --- a/src/android/app/src/main/res/values-pt-rBR/strings.xml +++ b/src/android/app/src/main/res/values-pt-rBR/strings.xml @@ -50,8 +50,8 @@ Ative ou desative o cache LRU (Least Recently Used), aumentando o desempenho ao economizar uso da CPU. Alguns jogos têm problemas com ele, especialmente TotK 1.2.1, então desative se o jogo não iniciar ou travar aleatoriamente. Estado Dinâmico Estendido Ativa recursos Vulkan para melhorar desempenho, renderização e economizar recursos na criação de pipelines mantendo baixo uso de CPU/GPU. Essas extensões podem aumentar a temperatura do dispositivo e GPUs mais antigas da linha A6XX podem não responder corretamente. Defina como 0 para usar formatos emulados do Yuzu. - EDS3 + VertexInputDynamicState - Melhora desempenho em dispositivos mais novos. Suportado apenas em GPUs Vulkan 1.3+. + VertexInputDynamicState + Melhora desempenho em dispositivos mais novos. Suportado apenas em GPUs Vulkan 1.3+. Sincronizar velocidade do núcleo Sincroniza a velocidade do núcleo com a porcentagem máxima de velocidade para melhorar o desempenho sem alterar a velocidade real do jogo. Usar Auto Stub diff --git a/src/android/app/src/main/res/values-pt-rPT/strings.xml b/src/android/app/src/main/res/values-pt-rPT/strings.xml index 2006f4201a..0f4cb60e18 100644 --- a/src/android/app/src/main/res/values-pt-rPT/strings.xml +++ b/src/android/app/src/main/res/values-pt-rPT/strings.xml @@ -50,8 +50,8 @@ Ative ou desative a cache LRU (Least Recently Used), aumentando o desempenho ao poupar utilização da CPU. Alguns jogos têm problemas com ela, especialmente TotK 1.2.1, por isso desative se o jogo não arrancar ou falhar aleatoriamente. Estado Dinâmico Estendido Ativa funcionalidades Vulkan para melhorar desempenho, renderização e poupar recursos na criação de pipelines mantendo baixo uso de CPU/GPU. Estas extensões podem aumentar a temperatura do dispositivo e GPUs mais antigas da linha A6XX podem não responder corretamente. Defina como 0 para usar formatos emulados do Yuzu. - EDS3 + VertexInputDynamicState - Melhora o desempenho em dispositivos mais recentes. Suportado apenas em GPUs Vulkan 1.3+. + VertexInputDynamicState + Melhora o desempenho em dispositivos mais recentes. Suportado apenas em GPUs Vulkan 1.3+. Sincronizar velocidade do núcleo Sincroniza a velocidade do núcleo com a percentagem máxima de velocidade para melhorar o desempenho sem alterar a velocidade real do jogo. Usar Auto Stub diff --git a/src/android/app/src/main/res/values-ru/strings.xml b/src/android/app/src/main/res/values-ru/strings.xml index b16dce419c..243494ba5d 100644 --- a/src/android/app/src/main/res/values-ru/strings.xml +++ b/src/android/app/src/main/res/values-ru/strings.xml @@ -50,8 +50,8 @@ Включите или отключите кэш LRU (наименее недавно использованный), что повышает производительность за счет экономии использования ЦП. Некоторые игры имеют проблемы с ним, особенно TotK 1.2.1, поэтому отключите, если игра не запускается или случайно вылетает. Расширенное динамическое состояние Включает функции Vulkan для улучшения производительности, рендеринга и экономии ресурсов при создании конвейеров, сохраняя низкое использование CPU/GPU. Эти расширения могут повысить температуру устройства, а старые GPU серии A6XX могут работать некорректно. Установите 0 для использования эмулируемых форматов Yuzu. - EDS3 + Динамическое состояние ввода вершин - Улучшает производительность на новых устройствах. Поддерживается только GPU с Vulkan 1.3+. + Динамическое состояние ввода вершин + Улучшает производительность на новых устройствах. Поддерживается только GPU с Vulkan 1.3+. Синхронизация скорости ядра Синхронизирует скорость ядра с максимальным процентом скорости для улучшения производительности без изменения фактической скорости игры. Использовать Auto Stub diff --git a/src/android/app/src/main/res/values-uk/strings.xml b/src/android/app/src/main/res/values-uk/strings.xml index 369f116308..6fd938bcc4 100644 --- a/src/android/app/src/main/res/values-uk/strings.xml +++ b/src/android/app/src/main/res/values-uk/strings.xml @@ -50,8 +50,8 @@ Увімкніть або вимкніть кеш LRU (найменш нещодавно використаний), що підвищує продуктивність за рахунок економії використання CPU. Деякі ігри мають проблеми з ним, особливо TotK 1.2.1, тому вимкніть, якщо гра не запускається або випадково вилітає. Розширений динамічний стан Активує функції Vulkan для покращення продуктивності, рендерингу та економії ресурсів під час створення конвеєрів, зберігаючи низьке використання CPU/GPU. Ці розширення можуть підвищити температуру пристрою, а старі GPU серії A6XX можуть реагувати некоректно. Встановіть 0 для використання емульованих форматів Yuzu. - EDS3 + Динамічний стан вводу вершин - Покращує продуктивність на нових пристроях. Підтримується лише GPU з Vulkan 1.3+. + Динамічний стан вводу вершин + Покращує продуктивність на нових пристроях. Підтримується лише GPU з Vulkan 1.3+. Синхронізувати швидкість ядра Синхронізує швидкість ядра з максимальним відсотком швидкості для покращення продуктивності без зміни реальної швидкості гри. Використовувати Auto Stub diff --git a/src/android/app/src/main/res/values-vi/strings.xml b/src/android/app/src/main/res/values-vi/strings.xml index 475b379b64..083af5f53f 100644 --- a/src/android/app/src/main/res/values-vi/strings.xml +++ b/src/android/app/src/main/res/values-vi/strings.xml @@ -50,8 +50,8 @@ Bật hoặc tắt bộ nhớ đệm LRU (ít được sử dụng gần đây nhất), tăng hiệu suất bằng cách tiết kiệm sử dụng CPU. Một số trò chơi có vấn đề với nó, đặc biệt là TotK 1.2.1, vì vậy hãy tắt nếu trò chơi không khởi động hoặc bị treo ngẫu nhiên. Trạng thái động mở rộng Kích hoạt các tính năng Vulkan để cải thiện hiệu suất, kết xuất và tiết kiệm tài nguyên khi tạo pipeline trong khi vẫn duy trì mức sử dụng CPU/GPU thấp. Các tiện ích mở rộng này có thể làm tăng nhiệt độ thiết bị và GPU dòng A6XX cũ hơn có thể không phản ứng đúng cách. Đặt thành 0 để sử dụng định dạng mô phỏng của Yuzu. - EDS3 + Trạng thái động đầu vào đỉnh - Cải thiện hiệu suất trên các thiết bị mới hơn. Chỉ được hỗ trợ trên GPU Vulkan 1.3+. + Trạng thái động đầu vào đỉnh + Cải thiện hiệu suất trên các thiết bị mới hơn. Chỉ được hỗ trợ trên GPU Vulkan 1.3+. Đồng bộ tốc độ lõi Đồng bộ tốc độ lõi với tỷ lệ phần trăm tốc độ tối đa để cải thiện hiệu suất mà không làm thay đổi tốc độ thực tế của trò chơi. Sử dụng Auto Stub diff --git a/src/android/app/src/main/res/values-zh-rCN/strings.xml b/src/android/app/src/main/res/values-zh-rCN/strings.xml index a57b0def0c..007f6b9a56 100644 --- a/src/android/app/src/main/res/values-zh-rCN/strings.xml +++ b/src/android/app/src/main/res/values-zh-rCN/strings.xml @@ -50,8 +50,8 @@ 启用或禁用LRU(最近最少使用)缓存,通过节省CPU使用来提高性能。某些游戏(尤其是TotK 1.2.1)可能存在问题,如果游戏无法启动或随机崩溃,请禁用它。 扩展动态状态 启用Vulkan功能以在保持低CPU/GPU使用率的同时提高性能、渲染效果并节省管道创建资源。这些扩展可能会提高设备温度,较旧的A6XX系列GPU可能无法正确响应。设置为0可使用Yuzu模拟格式。 - EDS3 + 顶点输入动态状态 - 提高新设备上的性能。仅支持Vulkan 1.3+ GPU。 + 顶点输入动态状态 + 提高新设备上的性能。仅支持Vulkan 1.3+ GPU。 同步核心速度 将核心速度与最大速度百分比同步,在不改变游戏实际速度的情况下提高性能。 使用自动存根 diff --git a/src/android/app/src/main/res/values-zh-rTW/strings.xml b/src/android/app/src/main/res/values-zh-rTW/strings.xml index 80a3a89c56..d7d311e810 100644 --- a/src/android/app/src/main/res/values-zh-rTW/strings.xml +++ b/src/android/app/src/main/res/values-zh-rTW/strings.xml @@ -50,8 +50,8 @@ 啟用或停用LRU(最近最少使用)快取,通過節省CPU使用來提高效能。某些遊戲(尤其是TotK 1.2.1)可能存在問題,如果遊戲無法啟動或隨機崩潰,請停用它。 擴展動態狀態 啟用Vulkan功能以在保持低CPU/GPU使用率的同時提高效能、渲染效果並節省管線建立資源。這些擴充可能會提高裝置溫度,較舊的A6XX系列GPU可能無法正確響應。設為0可使用Yuzu模擬格式。 - EDS3 + 頂點輸入動態狀態 - 提高新裝置上的效能。僅支援Vulkan 1.3+ GPU。 + 頂點輸入動態狀態 + 提高新裝置上的效能。僅支援Vulkan 1.3+ GPU。 同步核心速度 將核心速度與最大速度百分比同步,在不改變遊戲實際速度的情況下提高效能。 使用自動存根 diff --git a/src/android/app/src/main/res/values/arrays.xml b/src/android/app/src/main/res/values/arrays.xml index cb108dc548..eeac14d6f4 100644 --- a/src/android/app/src/main/res/values/arrays.xml +++ b/src/android/app/src/main/res/values/arrays.xml @@ -21,6 +21,18 @@ 1 + + @string/memory_4gb + @string/memory_6gb + @string/memory_8gb + + + + 0 + 1 + 2 + + @string/language_brazilian_portuguese @string/language_british_english diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index cb9930d0a3..45cfb1c32d 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -12,8 +12,10 @@ (Enhanced) (Skipping) + Building + Shader(s) System: - ShoW Performance Stats Overlay + Show Performance Stats Overlay Customization Visibility Overlay @@ -31,6 +33,8 @@ Display the amount of RAM used by the system Show Battery Temperature Display current Battery temperature in Celsius and Fahrenheit + Show Shaders Building + Display current number of shaders being built Overlay Position Choose where the performance stats overlay is displayed on the screen Top Left @@ -48,9 +52,9 @@ Enhanced Frame Pacing Ensures smooth and consistent frame delivery by synchronizing the timing between frames, reducing stuttering and uneven animation. Ideal for games that experience frame timing instability or micro-stutters during gameplay. Extended Dynamic State - Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Legacy emulated formats. - EDS3 + VertexInputDynamicState - Improves performance on newer devices. Only supported on Vulkan 1.3+ GPUs. + Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Legacy emulated formats. Setting 3 will only work on new devices. + VertexInputDynamicState + Improves performance on newer devices. Only supported on Vulkan 1.3+ GPUs. Synchronize Core Speed Synchronize the core tick speed to the maximum speed percentage to improve performance without altering the game\'s actual speed. Use Auto Stub @@ -361,12 +365,16 @@ Specifies the percentage to limit emulation speed. 100% is the normal speed. Values higher or lower will increase or decrease the speed limit. CPU backend CPU accuracy + Flush debug logs by line + Flushes debugging logs on each line written, making debugging easier in cases of crashing or freezing. %1$s%2$s Device name Docked Mode Increases resolution, decreasing performance. Handheld Mode is used when disabled, lowering resolution and increasing performance. + Memory Layout + Change the emulated memory layout. This setting will not increase performance, but may help with games utilizing high resolutions via mods. Do not use on phones with 8GB of RAM or less. Emulated region Emulated language Select RTC date @@ -411,6 +419,7 @@ Graphics debugging Sets the graphics API to a slow debugging mode. Fastmem + Logging Output engine @@ -680,6 +689,11 @@ Korea Taiwan + + 4GB (Recommended) + 6GB (Unsafe) + 8GB (Unsafe) + 日本語 English diff --git a/src/common/settings.h b/src/common/settings.h index 6b4532c961..c7d34e6f2f 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -452,12 +452,15 @@ struct Values { 2, #endif 0, - 2, + 3, "dyna_state", Category::RendererExtensions, Specialization::Scalar}; - SwitchableSetting dyna_state3{linkage, true, "dyna_state3", Category::RendererExtensions}; + SwitchableSetting vertex_input{linkage, + false, + "vertex_input", + Category::RendererExtensions}; SwitchableSetting provoking_vertex{linkage, true, "provoking_vertex", Category::RendererExtensions}; SwitchableSetting descriptor_indexing{linkage, true, "descriptor_indexing", Category::RendererExtensions}; diff --git a/src/core/hle/kernel/k_memory_layout.h b/src/core/hle/kernel/k_memory_layout.h index d7adb31699..7ca5a5b41e 100644 --- a/src/core/hle/kernel/k_memory_layout.h +++ b/src/core/hle/kernel/k_memory_layout.h @@ -25,7 +25,7 @@ constexpr std::size_t GetMaximumOverheadSize(std::size_t size) { } constexpr std::size_t MainMemorySize = 4_GiB; -constexpr std::size_t MainMemorySizeMax = 8_GiB; +constexpr std::size_t MainMemorySizeMax = 12_GiB; constexpr std::size_t ReservedEarlyDramSize = 384_KiB; constexpr std::size_t DramPhysicalAddress = 0x80000000; diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index 4b4331d2f4..c2ed3a5719 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -803,6 +803,9 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, VK_DYNAMIC_STATE_STENCIL_REFERENCE, VK_DYNAMIC_STATE_LINE_WIDTH, VK_DYNAMIC_STATE_LINE_STIPPLE, }; + if (key.state.dynamic_vertex_input) { + dynamic_states.push_back(VK_DYNAMIC_STATE_VERTEX_INPUT_EXT); + } if (key.state.extended_dynamic_state) { static constexpr std::array extended{ VK_DYNAMIC_STATE_CULL_MODE_EXT, @@ -815,9 +818,6 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT, VK_DYNAMIC_STATE_STENCIL_OP_EXT, }; - if (key.state.dynamic_vertex_input) { - dynamic_states.push_back(VK_DYNAMIC_STATE_VERTEX_INPUT_EXT); - } dynamic_states.insert(dynamic_states.end(), extended.begin(), extended.end()); if (key.state.extended_dynamic_state_2) { static constexpr std::array extended2{ diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 27efc02e69..82d68e59f4 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -128,7 +128,8 @@ Shader::AttributeType CastAttributeType(const FixedPipelineState::VertexAttribut return Shader::AttributeType::Float; } -Shader::AttributeType AttributeType(const FixedPipelineState& state, size_t index) { +Shader::AttributeType AttributeType(const FixedPipelineState& state, size_t index) +{ switch (state.DynamicAttributeType(index)) { case 0: return Shader::AttributeType::Disabled; @@ -179,7 +180,8 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span program info.generic_input_types[index] = AttributeType(key.state, index); } } else { - std::ranges::transform(key.state.attributes, info.generic_input_types.begin(), + std::ranges::transform(key.state.attributes, + info.generic_input_types.begin(), &CastAttributeType); } break; @@ -403,17 +405,23 @@ PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_, } const u8 dynamic_state = Settings::values.dyna_state.GetValue(); - const bool dynamic_state3 = dynamic_state == 2 && Settings::values.dyna_state3.GetValue(); + + const bool vertex_input = Settings::values.vertex_input.GetValue(); LOG_INFO(Render_Vulkan, "DynamicState value is set to {}", (u32) dynamic_state); - LOG_INFO(Render_Vulkan, "DynamicState3 value is set to {}", dynamic_state3); + dynamic_features = DynamicFeatures{ - .has_extended_dynamic_state = device.IsExtExtendedDynamicStateSupported() && dynamic_state > 0, - .has_extended_dynamic_state_2 = device.IsExtExtendedDynamicState2Supported() && dynamic_state > 1, - .has_extended_dynamic_state_2_extra = device.IsExtExtendedDynamicState2ExtrasSupported() && dynamic_state > 1, - .has_extended_dynamic_state_3_blend = device.IsExtExtendedDynamicState3BlendingSupported() && dynamic_state3, - .has_extended_dynamic_state_3_enables = device.IsExtExtendedDynamicState3EnablesSupported() && dynamic_state3, - .has_dynamic_vertex_input = device.IsExtVertexInputDynamicStateSupported(),// && dynamic_state3, + .has_extended_dynamic_state = device.IsExtExtendedDynamicStateSupported() + && dynamic_state > 0, + .has_extended_dynamic_state_2 = device.IsExtExtendedDynamicState2Supported() + && dynamic_state > 1, + .has_extended_dynamic_state_2_extra = device.IsExtExtendedDynamicState2ExtrasSupported() + && dynamic_state > 1, + .has_extended_dynamic_state_3_blend = device.IsExtExtendedDynamicState3BlendingSupported() + && dynamic_state > 2, + .has_extended_dynamic_state_3_enables = device.IsExtExtendedDynamicState3EnablesSupported() + && dynamic_state > 2, + .has_dynamic_vertex_input = device.IsExtVertexInputDynamicStateSupported() && vertex_input, }; LOG_INFO(Render_Vulkan, "DynamicState1: {}", dynamic_features.has_extended_dynamic_state); diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index d0cff37f61..62c057bfb4 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -952,28 +952,28 @@ void RasterizerVulkan::UpdateDynamicStates() { UpdateDepthBiasEnable(regs); } if (device.IsExtExtendedDynamicState3EnablesSupported()) { - using namespace Tegra::Engines; - - if (device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_OPEN_SOURCE - || device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_PROPRIETARY) { - struct In { - const Maxwell3D::Regs::VertexAttribute::Type d; - In(Maxwell3D::Regs::VertexAttribute::Type n) : d(n) {} - bool operator()(Maxwell3D::Regs::VertexAttribute n) const { - return n.type == d; - } - }; - - auto has_float = std::any_of( - regs.vertex_attrib_format.begin(), regs.vertex_attrib_format.end(), - In(Maxwell3D::Regs::VertexAttribute::Type::Float)); - - if (regs.logic_op.enable) - regs.logic_op.enable = static_cast(!has_float); - - UpdateLogicOpEnable(regs); - } else - UpdateLogicOpEnable(regs); + using namespace Tegra::Engines; + + if (device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_OPEN_SOURCE + || device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_PROPRIETARY) { + struct In { + const Maxwell3D::Regs::VertexAttribute::Type d; + In(Maxwell3D::Regs::VertexAttribute::Type n) : d(n) {} + bool operator()(Maxwell3D::Regs::VertexAttribute n) const { + return n.type == d; + } + }; + + auto has_float = std::any_of( + regs.vertex_attrib_format.begin(), regs.vertex_attrib_format.end(), + In(Maxwell3D::Regs::VertexAttribute::Type::Float)); + + if (regs.logic_op.enable) + regs.logic_op.enable = static_cast(!has_float); + + UpdateLogicOpEnable(regs); + } else + UpdateLogicOpEnable(regs); UpdateDepthClampEnable(regs); } } @@ -1103,12 +1103,21 @@ void RasterizerVulkan::UpdateDepthBias(Tegra::Engines::Maxwell3D::Regs& regs) { regs.zeta.format == Tegra::DepthFormat::X8Z24_UNORM || regs.zeta.format == Tegra::DepthFormat::S8Z24_UNORM || regs.zeta.format == Tegra::DepthFormat::V8Z24_UNORM; - if (is_d24 && !device.SupportsD24DepthBuffer() && program_id == 0x1006A800016E000ULL) { - // Only activate this in Super Smash Brothers Ultimate + + size_t length = sizeof(NEEDS_D24) / sizeof(u64); + bool needs_convert = false; + for (size_t i = 0; i < length; ++i) { + if (NEEDS_D24[i] == program_id) { + needs_convert = true; + break; + } + } + + if (is_d24 && !device.SupportsD24DepthBuffer() && needs_convert) { // the base formulas can be obtained from here: // https://docs.microsoft.com/en-us/windows/win32/direct3d11/d3d10-graphics-programming-guide-output-merger-stage-depth-bias - const double rescale_factor = - static_cast(1ULL << (32 - 24)) / (static_cast(0x1.ep+127)); + const double rescale_factor = static_cast(1ULL << (32 - 24)) + / (static_cast(0x1.ep+127)); units = static_cast(static_cast(units) * rescale_factor); } scheduler.Record([constant = units, clamp = regs.depth_bias_clamp, diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.h b/src/video_core/renderer_vulkan/vk_rasterizer.h index 0617b37f05..33bc6cd8e4 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.h +++ b/src/video_core/renderer_vulkan/vk_rasterizer.h @@ -144,6 +144,10 @@ private: static constexpr size_t MAX_IMAGE_VIEWS = MAX_TEXTURES + MAX_IMAGES; static constexpr VkDeviceSize DEFAULT_BUFFER_SIZE = 4 * sizeof(float); + static constexpr u64 NEEDS_D24[] = { + 0x1006A800016E000ULL, // SSBU + 0x0100E95004038000ULL, // XC2 + }; template void PrepareDraw(bool is_indexed, Func&&); diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index f0b3ed4e6b..9607487a50 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -459,6 +459,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR first_next = &diagnostics_nv; } + // TODO(alekpop): impl is incomplete, needs the settings to be assigned. VkPhysicalDeviceDescriptorIndexingFeaturesEXT descriptor_indexing{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT, .pNext = use_diagnostics_nv ? static_cast(&diagnostics_nv) : static_cast(&features2), @@ -491,17 +492,20 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR CollectPhysicalMemoryInfo(); CollectToolingInfo(); + // TODO(alekpop): many things here are still applying and need to be changed to match the real behaviors. + if (is_qualcomm || is_turnip) { LOG_WARNING(Render_Vulkan, "Qualcomm and Turnip drivers have broken VK_EXT_custom_border_color"); - //RemoveExtensionFeature(extensions.custom_border_color, features.custom_border_color, - //VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); + RemoveExtensionFeature(extensions.custom_border_color, + features.custom_border_color, + VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); } if (is_qualcomm) { LOG_WARNING(Render_Vulkan, "Qualcomm drivers have a slow VK_KHR_push_descriptor implementation"); - //RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); #if defined(ANDROID) && defined(ARCHITECTURE_arm64) // Patch the driver to enable BCn textures. @@ -535,7 +539,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR } else if (arch <= NvidiaArchitecture::Arch_Volta) { if (nv_major_version < 527) { LOG_WARNING(Render_Vulkan, "Volta and older have broken VK_KHR_push_descriptor"); - //RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); } } if (nv_major_version >= 510) { @@ -543,15 +547,16 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR cant_blit_msaa = true; } } + if (extensions.extended_dynamic_state && is_radv) { // Mask driver version variant const u32 version = (properties.properties.driverVersion << 3) >> 3; if (version < VK_MAKE_API_VERSION(0, 21, 2, 0)) { LOG_WARNING(Render_Vulkan, "RADV versions older than 21.2 have broken VK_EXT_extended_dynamic_state"); - //RemoveExtensionFeature(extensions.extended_dynamic_state, - //features.extended_dynamic_state, - //VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); + RemoveExtensionFeature(extensions.extended_dynamic_state, + features.extended_dynamic_state, + VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); } } if (extensions.extended_dynamic_state2 && is_radv) { @@ -560,9 +565,9 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR LOG_WARNING( Render_Vulkan, "RADV versions older than 22.3.1 have broken VK_EXT_extended_dynamic_state2"); - // RemoveExtensionFeature(extensions.extended_dynamic_state2, - // features.extended_dynamic_state2, - // VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); + RemoveExtensionFeature(extensions.extended_dynamic_state2, + features.extended_dynamic_state2, + VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); } } if (extensions.extended_dynamic_state2 && is_qualcomm) { @@ -572,53 +577,54 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR // Qualcomm Adreno 7xx drivers do not properly support extended_dynamic_state2. LOG_WARNING(Render_Vulkan, "Qualcomm Adreno 7xx drivers have broken VK_EXT_extended_dynamic_state2"); - //RemoveExtensionFeature(extensions.extended_dynamic_state2, - //features.extended_dynamic_state2, - //VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); + RemoveExtensionFeature(extensions.extended_dynamic_state2, + features.extended_dynamic_state2, + VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); } } if (extensions.extended_dynamic_state3 && is_radv) { LOG_WARNING(Render_Vulkan, "RADV has broken extendedDynamicState3ColorBlendEquation"); - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = true; - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = true; - dynamic_state3_blending = true; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; + dynamic_state3_blending = false; const u32 version = (properties.properties.driverVersion << 3) >> 3; if (version < VK_MAKE_API_VERSION(0, 23, 1, 0)) { LOG_WARNING(Render_Vulkan, "RADV versions older than 23.1.0 have broken depth clamp dynamic state"); - features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable = true; - dynamic_state3_enables = true; + features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable = false; + dynamic_state3_enables = false; } } if (extensions.extended_dynamic_state3 && (is_amd_driver || driver_id == VK_DRIVER_ID_SAMSUNG_PROPRIETARY)) { // AMD and Samsung drivers have broken extendedDynamicState3ColorBlendEquation LOG_WARNING(Render_Vulkan, "AMD and Samsung drivers have broken extendedDynamicState3ColorBlendEquation"); - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = true; - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = true; - dynamic_state3_blending = true; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; + dynamic_state3_blending = false; } if (extensions.vertex_input_dynamic_state && is_radv) { - // TODO(ameerj): Blacklist only offending driver versions - // TODO(ameerj): Confirm if RDNA1 is affected + // TODO(alekpop): Blacklist only offending driver versions + // NOTE(alekpop): It still affects the latest RADV. + // TODO(alekpop): Confirm if RDNA1 is affected const bool is_rdna2 = supported_extensions.contains(VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME); if (is_rdna2) { LOG_WARNING(Render_Vulkan, "RADV has broken VK_EXT_vertex_input_dynamic_state on RDNA2 hardware"); - // RemoveExtensionFeature(extensions.vertex_input_dynamic_state, - // features.vertex_input_dynamic_state, - // VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + RemoveExtensionFeature(extensions.vertex_input_dynamic_state, + features.vertex_input_dynamic_state, + VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); } } if (extensions.vertex_input_dynamic_state && is_qualcomm) { // Qualcomm drivers do not properly support vertex_input_dynamic_state. LOG_WARNING(Render_Vulkan, "Qualcomm drivers have broken VK_EXT_vertex_input_dynamic_state"); - //RemoveExtensionFeature(extensions.vertex_input_dynamic_state, - // features.vertex_input_dynamic_state, - // VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + RemoveExtensionFeature(extensions.vertex_input_dynamic_state, + features.vertex_input_dynamic_state, + VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); } sets_per_pool = 64; @@ -652,9 +658,9 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR const u32 version = (properties.properties.driverVersion << 3) >> 3; if (version < VK_MAKE_API_VERSION(27, 20, 100, 0)) { LOG_WARNING(Render_Vulkan, "Intel has broken VK_EXT_vertex_input_dynamic_state"); - //RemoveExtensionFeature(extensions.vertex_input_dynamic_state, - //features.vertex_input_dynamic_state, - //VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + RemoveExtensionFeature(extensions.vertex_input_dynamic_state, + features.vertex_input_dynamic_state, + VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); } } if (features.shader_float16_int8.shaderFloat16 && is_intel_windows) { @@ -681,14 +687,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR // mesa/mesa/-/commit/ff91c5ca42bc80aa411cb3fd8f550aa6fdd16bdc LOG_WARNING(Render_Vulkan, "ANV drivers 22.3.0 to 23.1.0 have broken VK_KHR_push_descriptor"); - //RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); } } else if (extensions.push_descriptor && is_nvidia) { const auto arch = GetNvidiaArch(); if (arch <= NvidiaArchitecture::Arch_Pascal) { LOG_WARNING(Render_Vulkan, "Pascal and older architectures have broken VK_KHR_push_descriptor"); - //RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); } } @@ -722,33 +728,8 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR dynamic_state3_enables = true; } - if (Settings::values.dyna_state.GetValue() == 0) { - must_emulate_scaled_formats = true; - LOG_INFO(Render_Vulkan, "Dynamic state is disabled (dyna_state = 0), forcing scaled format emulation ON"); - - // Disable dynamic state 1-3 and all extensions - RemoveExtensionFeature(extensions.custom_border_color, features.custom_border_color, - VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); - - RemoveExtensionFeature(extensions.extended_dynamic_state, features.extended_dynamic_state, - VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); - - RemoveExtensionFeature(extensions.extended_dynamic_state2, features.extended_dynamic_state2, - VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); - - RemoveExtensionFeature(extensions.vertex_input_dynamic_state, features.vertex_input_dynamic_state, - VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); - - RemoveExtensionFeature(extensions.extended_dynamic_state3, features.extended_dynamic_state3, - VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); - dynamic_state3_blending = false; - dynamic_state3_enables = false; - - LOG_INFO(Render_Vulkan, "All dynamic state extensions and features have been disabled"); - } else { - must_emulate_scaled_formats = false; - LOG_INFO(Render_Vulkan, "Dynamic state is enabled (dyna_state = 1-3), disabling scaled format emulation"); - } + must_emulate_scaled_formats = !Settings::values.dyna_state.GetValue(); + LOG_INFO(Render_Vulkan, "Scaled format emulation: {}", must_emulate_scaled_formats); logical = vk::Device::Create(physical, queue_cis, ExtensionListForVulkan(loaded_extensions), first_next, dld); @@ -1206,85 +1187,120 @@ void Device::RemoveUnsuitableExtensions() { RemoveExtensionFeatureIfUnsuitable(extensions.depth_clip_control, features.depth_clip_control, VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME); - /* */ // VK_EXT_extended_dynamic_state - extensions.extended_dynamic_state = features.extended_dynamic_state.extendedDynamicState; - RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state, - features.extended_dynamic_state, - VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); + int dynamic_state = Settings::values.dyna_state.GetValue(); + + // VK_EXT_extended_dynamic_state + if (dynamic_state < 1) { + extensions.extended_dynamic_state = features.extended_dynamic_state.extendedDynamicState; + RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state, + features.extended_dynamic_state, + VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); + } else { + RemoveExtensionFeature(extensions.extended_dynamic_state, + features.extended_dynamic_state, + VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); + } // VK_EXT_extended_dynamic_state2 - extensions.extended_dynamic_state2 = features.extended_dynamic_state2.extendedDynamicState2; - RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state2, - features.extended_dynamic_state2, - VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); + if (dynamic_state < 2) { + extensions.extended_dynamic_state2 = features.extended_dynamic_state2.extendedDynamicState2; + RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state2, + features.extended_dynamic_state2, + VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); + } else { + RemoveExtensionFeature(extensions.extended_dynamic_state2, + features.extended_dynamic_state2, + VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); + } // VK_EXT_extended_dynamic_state3 - dynamic_state3_blending = - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable && - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation && - features.extended_dynamic_state3.extendedDynamicState3ColorWriteMask; - dynamic_state3_enables = - features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable && - features.extended_dynamic_state3.extendedDynamicState3LogicOpEnable; - - extensions.extended_dynamic_state3 = dynamic_state3_blending || dynamic_state3_enables; - dynamic_state3_blending = dynamic_state3_blending && extensions.extended_dynamic_state3; - dynamic_state3_enables = dynamic_state3_enables && extensions.extended_dynamic_state3; - RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state3, - features.extended_dynamic_state3, - VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); + if (dynamic_state < 3) { + dynamic_state3_blending + = features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable + && features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation + && features.extended_dynamic_state3.extendedDynamicState3ColorWriteMask; + dynamic_state3_enables + = features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable + && features.extended_dynamic_state3.extendedDynamicState3LogicOpEnable; + extensions.extended_dynamic_state3 = dynamic_state3_blending || dynamic_state3_enables; + dynamic_state3_blending = dynamic_state3_blending && extensions.extended_dynamic_state3; + dynamic_state3_enables = dynamic_state3_enables && extensions.extended_dynamic_state3; + RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state3, + features.extended_dynamic_state3, + VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); + } else { + RemoveExtensionFeature(extensions.extended_dynamic_state3, + features.extended_dynamic_state3, + VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); + } // VK_EXT_provoking_vertex - extensions.provoking_vertex = - features.provoking_vertex.provokingVertexLast && - features.provoking_vertex.transformFeedbackPreservesProvokingVertex; - // RemoveExtensionFeatureIfUnsuitable(extensions.provoking_vertex, features.provoking_vertex, - // VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME); + if (Settings::values.provoking_vertex.GetValue()) { + extensions.provoking_vertex = features.provoking_vertex.provokingVertexLast + && features.provoking_vertex + .transformFeedbackPreservesProvokingVertex; + RemoveExtensionFeatureIfUnsuitable(extensions.provoking_vertex, + features.provoking_vertex, + VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME); + } else { + RemoveExtensionFeature(extensions.provoking_vertex, + features.provoking_vertex, + VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME); + } // VK_KHR_shader_atomic_int64 - extensions.shader_atomic_int64 = features.shader_atomic_int64.shaderBufferInt64Atomics && - features.shader_atomic_int64.shaderSharedInt64Atomics; - RemoveExtensionFeatureIfUnsuitable(extensions.shader_atomic_int64, features.shader_atomic_int64, + extensions.shader_atomic_int64 = features.shader_atomic_int64.shaderBufferInt64Atomics + && features.shader_atomic_int64.shaderSharedInt64Atomics; + RemoveExtensionFeatureIfUnsuitable(extensions.shader_atomic_int64, + features.shader_atomic_int64, VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME); // VK_EXT_shader_demote_to_helper_invocation - extensions.shader_demote_to_helper_invocation = - features.shader_demote_to_helper_invocation.shaderDemoteToHelperInvocation; + extensions.shader_demote_to_helper_invocation = features.shader_demote_to_helper_invocation + .shaderDemoteToHelperInvocation; RemoveExtensionFeatureIfUnsuitable(extensions.shader_demote_to_helper_invocation, features.shader_demote_to_helper_invocation, VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME); // VK_EXT_subgroup_size_control - extensions.subgroup_size_control = - features.subgroup_size_control.subgroupSizeControl && - properties.subgroup_size_control.minSubgroupSize <= GuestWarpSize && - properties.subgroup_size_control.maxSubgroupSize >= GuestWarpSize; + extensions.subgroup_size_control = features.subgroup_size_control.subgroupSizeControl + && properties.subgroup_size_control.minSubgroupSize + <= GuestWarpSize + && properties.subgroup_size_control.maxSubgroupSize + >= GuestWarpSize; RemoveExtensionFeatureIfUnsuitable(extensions.subgroup_size_control, features.subgroup_size_control, VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME); // VK_EXT_transform_feedback - extensions.transform_feedback = - features.transform_feedback.transformFeedback && - features.transform_feedback.geometryStreams && - properties.transform_feedback.maxTransformFeedbackStreams >= 4 && - properties.transform_feedback.maxTransformFeedbackBuffers > 0 && - properties.transform_feedback.transformFeedbackQueries && - properties.transform_feedback.transformFeedbackDraw; - RemoveExtensionFeatureIfUnsuitable(extensions.transform_feedback, features.transform_feedback, + extensions.transform_feedback = features.transform_feedback.transformFeedback + && features.transform_feedback.geometryStreams + && properties.transform_feedback.maxTransformFeedbackStreams + >= 4 + && properties.transform_feedback.maxTransformFeedbackBuffers > 0 + && properties.transform_feedback.transformFeedbackQueries + && properties.transform_feedback.transformFeedbackDraw; + RemoveExtensionFeatureIfUnsuitable(extensions.transform_feedback, + features.transform_feedback, VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME); // VK_EXT_vertex_input_dynamic_state - extensions.vertex_input_dynamic_state = - features.vertex_input_dynamic_state.vertexInputDynamicState; - //RemoveExtensionFeatureIfUnsuitable(extensions.vertex_input_dynamic_state, - //features.vertex_input_dynamic_state, - //VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + if (Settings::values.vertex_input.GetValue()) { + extensions.vertex_input_dynamic_state = features.vertex_input_dynamic_state + .vertexInputDynamicState; + RemoveExtensionFeatureIfUnsuitable(extensions.vertex_input_dynamic_state, + features.vertex_input_dynamic_state, + VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + } else { + RemoveExtensionFeature(extensions.vertex_input_dynamic_state, + features.vertex_input_dynamic_state, + VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + } // VK_KHR_pipeline_executable_properties if (Settings::values.renderer_shader_feedback.GetValue()) { - extensions.pipeline_executable_properties = - features.pipeline_executable_properties.pipelineExecutableInfo; + extensions.pipeline_executable_properties = features.pipeline_executable_properties + .pipelineExecutableInfo; RemoveExtensionFeatureIfUnsuitable(extensions.pipeline_executable_properties, features.pipeline_executable_properties, VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME); @@ -1295,12 +1311,12 @@ void Device::RemoveUnsuitableExtensions() { } // VK_KHR_workgroup_memory_explicit_layout - extensions.workgroup_memory_explicit_layout = - features.features.shaderInt16 && - features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout && - features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout8BitAccess && - features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout16BitAccess && - features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayoutScalarBlockLayout; + extensions.workgroup_memory_explicit_layout + = features.features.shaderInt16 + && features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout + && features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout8BitAccess + && features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout16BitAccess + && features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayoutScalarBlockLayout; RemoveExtensionFeatureIfUnsuitable(extensions.workgroup_memory_explicit_layout, features.workgroup_memory_explicit_layout, VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME); diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index ddc9451a7e..01d0eb52f7 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -39,27 +39,35 @@ VK_DEFINE_HANDLE(VmaAllocator) FEATURE(EXT, SubgroupSizeControl, SUBGROUP_SIZE_CONTROL, subgroup_size_control) // Define all features which may be used by the implementation and require an extension here. -#define FOR_EACH_VK_FEATURE_EXT(FEATURE) \ - FEATURE(EXT, CustomBorderColor, CUSTOM_BORDER_COLOR, custom_border_color) \ - FEATURE(EXT, DepthBiasControl, DEPTH_BIAS_CONTROL, depth_bias_control) \ - FEATURE(EXT, DepthClipControl, DEPTH_CLIP_CONTROL, depth_clip_control) \ - FEATURE(EXT, ExtendedDynamicState, EXTENDED_DYNAMIC_STATE, extended_dynamic_state) \ - FEATURE(EXT, ExtendedDynamicState2, EXTENDED_DYNAMIC_STATE_2, extended_dynamic_state2) \ - FEATURE(EXT, ExtendedDynamicState3, EXTENDED_DYNAMIC_STATE_3, extended_dynamic_state3) \ - FEATURE(EXT, 4444Formats, 4444_FORMATS, format_a4b4g4r4) \ - FEATURE(EXT, IndexTypeUint8, INDEX_TYPE_UINT8, index_type_uint8) \ - FEATURE(EXT, LineRasterization, LINE_RASTERIZATION, line_rasterization) \ - FEATURE(EXT, PrimitiveTopologyListRestart, PRIMITIVE_TOPOLOGY_LIST_RESTART, \ - primitive_topology_list_restart) \ - FEATURE(EXT, ProvokingVertex, PROVOKING_VERTEX, provoking_vertex) \ - FEATURE(EXT, Robustness2, ROBUSTNESS_2, robustness2) \ - FEATURE(EXT, TransformFeedback, TRANSFORM_FEEDBACK, transform_feedback) \ - FEATURE(EXT, VertexInputDynamicState, VERTEX_INPUT_DYNAMIC_STATE, vertex_input_dynamic_state) \ - FEATURE(KHR, PipelineExecutableProperties, PIPELINE_EXECUTABLE_PROPERTIES, \ - pipeline_executable_properties) \ - FEATURE(KHR, WorkgroupMemoryExplicitLayout, WORKGROUP_MEMORY_EXPLICIT_LAYOUT, \ +#define FOR_EACH_VK_FEATURE_EXT(FEATURE) \ + FEATURE(EXT, CustomBorderColor, CUSTOM_BORDER_COLOR, custom_border_color) \ + FEATURE(EXT, DepthBiasControl, DEPTH_BIAS_CONTROL, depth_bias_control) \ + FEATURE(EXT, DepthClipControl, DEPTH_CLIP_CONTROL, depth_clip_control) \ + FEATURE(EXT, ExtendedDynamicState, EXTENDED_DYNAMIC_STATE, extended_dynamic_state) \ + FEATURE(EXT, ExtendedDynamicState2, EXTENDED_DYNAMIC_STATE_2, extended_dynamic_state2) \ + FEATURE(EXT, ExtendedDynamicState3, EXTENDED_DYNAMIC_STATE_3, extended_dynamic_state3) \ + FEATURE(EXT, 4444Formats, 4444_FORMATS, format_a4b4g4r4) \ + FEATURE(EXT, IndexTypeUint8, INDEX_TYPE_UINT8, index_type_uint8) \ + FEATURE(EXT, LineRasterization, LINE_RASTERIZATION, line_rasterization) \ + FEATURE(EXT, \ + PrimitiveTopologyListRestart, \ + PRIMITIVE_TOPOLOGY_LIST_RESTART, \ + primitive_topology_list_restart) \ + FEATURE(EXT, ProvokingVertex, PROVOKING_VERTEX, provoking_vertex) \ + FEATURE(EXT, Robustness2, ROBUSTNESS_2, robustness2) \ + FEATURE(EXT, TransformFeedback, TRANSFORM_FEEDBACK, transform_feedback) \ + FEATURE(EXT, VertexInputDynamicState, VERTEX_INPUT_DYNAMIC_STATE, vertex_input_dynamic_state) \ + FEATURE(KHR, \ + PipelineExecutableProperties, \ + PIPELINE_EXECUTABLE_PROPERTIES, \ + pipeline_executable_properties) \ + FEATURE(KHR, \ + WorkgroupMemoryExplicitLayout, \ + WORKGROUP_MEMORY_EXPLICIT_LAYOUT, \ workgroup_memory_explicit_layout) +// TODO(alekpop): descriptor index is incomplete and needs fix. + // Define miscellaneous extensions which may be used by the implementation here. #define FOR_EACH_VK_EXTENSION(EXTENSION) \ EXTENSION(EXT, CONDITIONAL_RENDERING, conditional_rendering) \ @@ -149,24 +157,24 @@ VK_DEFINE_HANDLE(VmaAllocator) FEATURE_NAME(variable_pointer, variablePointersStorageBuffer) // Define features where the absence of the feature may result in a degraded experience. -#define FOR_EACH_VK_RECOMMENDED_FEATURE(FEATURE_NAME) \ - FEATURE_NAME(custom_border_color, customBorderColors) \ - FEATURE_NAME(depth_bias_control, depthBiasControl) \ - FEATURE_NAME(depth_bias_control, leastRepresentableValueForceUnormRepresentation) \ - FEATURE_NAME(depth_bias_control, depthBiasExact) \ - FEATURE_NAME(extended_dynamic_state, extendedDynamicState) \ - FEATURE_NAME(format_a4b4g4r4, formatA4B4G4R4) \ - FEATURE_NAME(index_type_uint8, indexTypeUint8) \ - FEATURE_NAME(primitive_topology_list_restart, primitiveTopologyListRestart) \ - FEATURE_NAME(provoking_vertex, provokingVertexLast) \ - FEATURE_NAME(robustness2, nullDescriptor) \ - FEATURE_NAME(robustness2, robustBufferAccess2) \ - FEATURE_NAME(robustness2, robustImageAccess2) \ - FEATURE_NAME(shader_float16_int8, shaderFloat16) \ - FEATURE_NAME(shader_float16_int8, shaderInt8) \ - FEATURE_NAME(timeline_semaphore, timelineSemaphore) \ - FEATURE_NAME(transform_feedback, transformFeedback) \ - FEATURE_NAME(uniform_buffer_standard_layout, uniformBufferStandardLayout) \ +#define FOR_EACH_VK_RECOMMENDED_FEATURE(FEATURE_NAME) \ + FEATURE_NAME(custom_border_color, customBorderColors) \ + FEATURE_NAME(depth_bias_control, depthBiasControl) \ + FEATURE_NAME(depth_bias_control, leastRepresentableValueForceUnormRepresentation) \ + FEATURE_NAME(depth_bias_control, depthBiasExact) \ + FEATURE_NAME(extended_dynamic_state, extendedDynamicState) \ + FEATURE_NAME(format_a4b4g4r4, formatA4B4G4R4) \ + FEATURE_NAME(index_type_uint8, indexTypeUint8) \ + FEATURE_NAME(primitive_topology_list_restart, primitiveTopologyListRestart) \ + FEATURE_NAME(provoking_vertex, provokingVertexLast) \ + FEATURE_NAME(robustness2, nullDescriptor) \ + FEATURE_NAME(robustness2, robustBufferAccess2) \ + FEATURE_NAME(robustness2, robustImageAccess2) \ + FEATURE_NAME(shader_float16_int8, shaderFloat16) \ + FEATURE_NAME(shader_float16_int8, shaderInt8) \ + FEATURE_NAME(timeline_semaphore, timelineSemaphore) \ + FEATURE_NAME(transform_feedback, transformFeedback) \ + FEATURE_NAME(uniform_buffer_standard_layout, uniformBufferStandardLayout) \ FEATURE_NAME(vertex_input_dynamic_state, vertexInputDynamicState) namespace Vulkan { diff --git a/src/yuzu/configuration/configure_graphics_extensions.cpp b/src/yuzu/configuration/configure_graphics_extensions.cpp index 51c7a6cdea..6ac7948288 100644 --- a/src/yuzu/configuration/configure_graphics_extensions.cpp +++ b/src/yuzu/configuration/configure_graphics_extensions.cpp @@ -30,12 +30,11 @@ ConfigureGraphicsExtensions::~ConfigureGraphicsExtensions() = default; void ConfigureGraphicsExtensions::SetConfiguration() {} -void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& builder) { +void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& builder) +{ auto& layout = *ui->populate_target->layout(); std::map hold{}; // A map will sort the data for us - QSlider *dyna_state = nullptr; - QCheckBox *dyna_state3 = nullptr; for (auto setting : Settings::values.linkage.by_category[Settings::Category::RendererExtensions]) { ConfigurationShared::Widget* widget = builder.BuildWidget(setting, apply_funcs); @@ -53,22 +52,14 @@ void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& buil if (setting->Id() == Settings::values.dyna_state.Id()) { widget->slider->setTickInterval(1); widget->slider->setTickPosition(QSlider::TicksAbove); - dyna_state = widget->slider; - } else if (setting->Id() == Settings::values.dyna_state3.Id()) { - dyna_state3 = widget->checkbox; + } else if (setting->Id() == Settings::values.vertex_input.Id()) { + // widget->checkbox->setDisabled(true); } } for (const auto& [id, widget] : hold) { layout.addWidget(widget); } - - connect(dyna_state, &QSlider::sliderMoved, this, [dyna_state3](int value) { - dyna_state3->setEnabled(value == 2); - if (value < 2) { - dyna_state3->setChecked(false); - } - }); } void ConfigureGraphicsExtensions::ApplyConfiguration() { diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 02bb9a322f..ead67a46d0 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -27,31 +27,30 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // A setting can be ignored by giving it a blank name // Applets - INSERT(Settings, cabinet_applet_mode, tr("Amiibo editor"), QStringLiteral()); - INSERT(Settings, controller_applet_mode, tr("Controller configuration"), QStringLiteral()); - INSERT(Settings, data_erase_applet_mode, tr("Data erase"), QStringLiteral()); - INSERT(Settings, error_applet_mode, tr("Error"), QStringLiteral()); - INSERT(Settings, net_connect_applet_mode, tr("Net connect"), QStringLiteral()); - INSERT(Settings, player_select_applet_mode, tr("Player select"), QStringLiteral()); - INSERT(Settings, swkbd_applet_mode, tr("Software keyboard"), QStringLiteral()); - INSERT(Settings, mii_edit_applet_mode, tr("Mii Edit"), QStringLiteral()); - INSERT(Settings, web_applet_mode, tr("Online web"), QStringLiteral()); - INSERT(Settings, shop_applet_mode, tr("Shop"), QStringLiteral()); - INSERT(Settings, photo_viewer_applet_mode, tr("Photo viewer"), QStringLiteral()); - INSERT(Settings, offline_web_applet_mode, tr("Offline web"), QStringLiteral()); - INSERT(Settings, login_share_applet_mode, tr("Login share"), QStringLiteral()); - INSERT(Settings, wifi_web_auth_applet_mode, tr("Wifi web auth"), QStringLiteral()); - INSERT(Settings, my_page_applet_mode, tr("My page"), QStringLiteral()); + INSERT(Settings, cabinet_applet_mode, tr("Amiibo editor"), QString()); + INSERT(Settings, controller_applet_mode, tr("Controller configuration"), QString()); + INSERT(Settings, data_erase_applet_mode, tr("Data erase"), QString()); + INSERT(Settings, error_applet_mode, tr("Error"), QString()); + INSERT(Settings, net_connect_applet_mode, tr("Net connect"), QString()); + INSERT(Settings, player_select_applet_mode, tr("Player select"), QString()); + INSERT(Settings, swkbd_applet_mode, tr("Software keyboard"), QString()); + INSERT(Settings, mii_edit_applet_mode, tr("Mii Edit"), QString()); + INSERT(Settings, web_applet_mode, tr("Online web"), QString()); + INSERT(Settings, shop_applet_mode, tr("Shop"), QString()); + INSERT(Settings, photo_viewer_applet_mode, tr("Photo viewer"), QString()); + INSERT(Settings, offline_web_applet_mode, tr("Offline web"), QString()); + INSERT(Settings, login_share_applet_mode, tr("Login share"), QString()); + INSERT(Settings, wifi_web_auth_applet_mode, tr("Wifi web auth"), QString()); + INSERT(Settings, my_page_applet_mode, tr("My page"), QString()); // Audio - INSERT(Settings, sink_id, tr("Output Engine:"), QStringLiteral()); - INSERT(Settings, audio_output_device_id, tr("Output Device:"), QStringLiteral()); - INSERT(Settings, audio_input_device_id, tr("Input Device:"), QStringLiteral()); - INSERT(Settings, audio_muted, tr("Mute audio"), QStringLiteral()); - INSERT(Settings, volume, tr("Volume:"), QStringLiteral()); - INSERT(Settings, dump_audio_commands, QStringLiteral(), QStringLiteral()); - INSERT(UISettings, mute_when_in_background, tr("Mute audio when in background"), - QStringLiteral()); + INSERT(Settings, sink_id, tr("Output Engine:"), QString()); + INSERT(Settings, audio_output_device_id, tr("Output Device:"), QString()); + INSERT(Settings, audio_input_device_id, tr("Input Device:"), QString()); + INSERT(Settings, audio_muted, tr("Mute audio"), QString()); + INSERT(Settings, volume, tr("Volume:"), QString()); + INSERT(Settings, dump_audio_commands, QString(), QString()); + INSERT(UISettings, mute_when_in_background, tr("Mute audio when in background"), QString()); // Core INSERT( @@ -65,7 +64,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { "to let big texture mods fit in emulated RAM.\nEnabling it will increase memory " "use. It is not recommended to enable unless a specific game with a texture mod needs " "it.")); - INSERT(Settings, use_speed_limit, QStringLiteral(), QStringLiteral()); + INSERT(Settings, use_speed_limit, QString(), QString()); INSERT(Settings, speed_limit, tr("Limit Speed Percent"), tr("Controls the game's maximum rendering speed, but it’s up to each game if it runs " "faster or not.\n200% for a 30 FPS game is 60 FPS, and for a " @@ -80,7 +79,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, cpu_accuracy, tr("Accuracy:"), tr("This setting controls the accuracy of the emulated CPU.\nDon't change this unless " "you know what you are doing.")); - INSERT(Settings, cpu_backend, tr("Backend:"), QStringLiteral()); + INSERT(Settings, cpu_backend, tr("Backend:"), QString()); // Cpu Debug @@ -127,7 +126,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { tr("Forces the game to render at a different resolution.\nHigher resolutions require " "much more VRAM and bandwidth.\n" "Options lower than 1X can cause rendering issues.")); - INSERT(Settings, scaling_filter, tr("Window Adapting Filter:"), QStringLiteral()); + INSERT(Settings, scaling_filter, tr("Window Adapting Filter:"), QString()); INSERT(Settings, fsr_sharpening_slider, tr("FSR Sharpness:"), tr("Determines how sharpened the image will look while using FSR’s dynamic contrast.")); INSERT(Settings, anti_aliasing, tr("Anti-Aliasing Method:"), @@ -184,9 +183,9 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { "a slow down.\nMailbox can have lower latency than FIFO and does not tear but may drop " "frames.\nImmediate (no synchronization) just presents whatever is available and can " "exhibit tearing.")); - INSERT(Settings, bg_red, QStringLiteral(), QStringLiteral()); - INSERT(Settings, bg_green, QStringLiteral(), QStringLiteral()); - INSERT(Settings, bg_blue, QStringLiteral(), QStringLiteral()); + INSERT(Settings, bg_red, QString(), QString()); + INSERT(Settings, bg_green, QString(), QString()); + INSERT(Settings, bg_blue, QString(), QString()); // Renderer (Advanced Graphics) INSERT(Settings, async_presentation, tr("Enable asynchronous presentation (Vulkan only)"), @@ -235,17 +234,23 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { tr("Enables the VkExtendedDynamicState* extensions.\nHigher dynamic states will generally improve " "performance, but may cause issues on certain games or devices.")); - INSERT(Settings, dyna_state3, tr("EDS3 + Vertex Input"), - tr("Enables the VkExtendedDynamicState3 and VkVertexInputDynamicState extensions.\n" - "Only Vulkan 1.3+ devices support these extensions, and will generally see improved performance.")); + INSERT(Settings, + vertex_input, + tr("VertexInputDynamicState"), + tr("Enables the VkVertexInputDynamicState extension.\n" + "Only Vulkan 1.3+ devices support this extension, and will generally see improved " + "performance.")); INSERT(Settings, provoking_vertex, tr("Provoking Vertex"), tr("Improves lighting and vertex handling in certain games.\n" "Only Vulkan 1.0+ devices support this extension.")); - INSERT(Settings, descriptor_indexing, tr("Descriptor Indexing"), + INSERT(Settings, + descriptor_indexing, + tr("Descriptor Indexing"), tr("Improves texture & buffer handling and the Maxwell translation layer.\n" - "Some Vulkan 1.1+ and all 1.2+ devices support this extension.")); + "Some Vulkan 1.1+ and all 1.2+ devices support this extension.\n" + "This extension is incomplete. Use with caution.")); // Renderer (Debug) @@ -253,12 +258,12 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, rng_seed, tr("RNG Seed"), tr("Controls the seed of the random number generator.\nMainly used for speedrunning " "purposes.")); - INSERT(Settings, rng_seed_enabled, QStringLiteral(), QStringLiteral()); + INSERT(Settings, rng_seed_enabled, QString(), QString()); INSERT(Settings, device_name, tr("Device Name"), tr("The name of the emulated Switch.")); INSERT(Settings, custom_rtc, tr("Custom RTC Date:"), tr("This option allows to change the emulated clock of the Switch.\n" "Can be used to manipulate time in games.")); - INSERT(Settings, custom_rtc_enabled, QStringLiteral(), QStringLiteral()); + INSERT(Settings, custom_rtc_enabled, QString(), QString()); INSERT(Settings, custom_rtc_offset, QStringLiteral(" "), QStringLiteral("The number of seconds from the current unix time")); INSERT(Settings, language_index, tr("Language:"), @@ -266,12 +271,12 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, region_index, tr("Region:"), tr("The region of the emulated Switch.")); INSERT(Settings, time_zone_index, tr("Time Zone:"), tr("The time zone of the emulated Switch.")); - INSERT(Settings, sound_index, tr("Sound Output Mode:"), QStringLiteral()); + INSERT(Settings, sound_index, tr("Sound Output Mode:"), QString()); INSERT(Settings, use_docked_mode, tr("Console Mode:"), tr("Selects if the console is emulated in Docked or Handheld mode.\nGames will change " "their resolution, details and supported controllers and depending on this setting.\n" "Setting to Handheld can help improve performance for low end systems.")); - INSERT(Settings, current_user, QStringLiteral(), QStringLiteral()); + INSERT(Settings, current_user, QString(), QString()); // Controls @@ -303,7 +308,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { "attempts to open the controller applet, it is immediately closed.")); // Linux - INSERT(Settings, enable_gamemode, tr("Enable Gamemode"), QStringLiteral()); + INSERT(Settings, enable_gamemode, tr("Enable Gamemode"), QString()); // Ui Debugging diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index 688f2ec9b6..c27a4644e9 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp @@ -71,7 +71,7 @@ QPushButton* Widget::CreateRestoreGlobalButton(bool using_global, QWidget* paren QStyle* style = parent->style(); QIcon* icon = new QIcon(style->standardIcon(QStyle::SP_LineEditClearButton)); - QPushButton* restore_button = new QPushButton(*icon, QStringLiteral(), parent); + QPushButton* restore_button = new QPushButton(*icon, QString(), parent); restore_button->setObjectName(QStringLiteral("RestoreButton%1").arg(restore_button_count)); restore_button->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); @@ -731,10 +731,10 @@ Widget::Widget(Settings::BasicSetting* setting_, const TranslationMap& translati return std::pair{translations.at(id).first, translations.at(id).second}; } LOG_WARNING(Frontend, "Translation table lacks entry for \"{}\"", setting_label); - return std::pair{QString::fromStdString(setting_label), QStringLiteral()}; + return std::pair{QString::fromStdString(setting_label), QString()}; }(); - if (label == QStringLiteral()) { + if (label == QString()) { LOG_DEBUG(Frontend, "Translation table has empty entry for \"{}\", skipping...", setting.GetLabel()); return; diff --git a/src/yuzu/configuration/shared_widget.h b/src/yuzu/configuration/shared_widget.h index 226284cf36..5c67d83542 100644 --- a/src/yuzu/configuration/shared_widget.h +++ b/src/yuzu/configuration/shared_widget.h @@ -46,7 +46,7 @@ enum class RequestType { constexpr float default_multiplier{1.f}; constexpr float default_float_multiplier{100.f}; -static const QString default_suffix = QStringLiteral(); +static const QString default_suffix = QString(); class Widget : public QWidget { Q_OBJECT From ce5d5d2aff50f9ce8159d609824eb2391bed9ef2 Mon Sep 17 00:00:00 2001 From: MrPurple666 Date: Sun, 18 May 2025 17:45:32 +0000 Subject: [PATCH 11/26] THIS NEEDS TO BE CHECKED BEFORE MERGE: RAII fix, initial MSAA, some fixes for memory misallocation (#116) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • MSAA Fixes: Fixes upload/download for MSAA textures using temporary non-MSAA images. Ensures compatibility with color formats and adds fallbacks for depth/stencil. • Memory fix misallocation: Adds checks for null/zero-length operations in memory management and improves cleanup to avoid crashes (Related to crash issues due to misallocation, RP5 and 865) • Vulkan Initialization (RAII): this almost rewrites the way vulkan initializes to avoid crashes, using a correct order now (thanks @crueter for the initial fix) •Please check before merging: - Test MSAA workflows (especially color/depth transitions and low memory cases). - Verify memory operations (e.g., unmapping zero-length regions). - Check Vulkan object lifetimes and platform-specific behavior. - Check others plataforms beyond android Why is everything in one PR? Otherwise, this is all a big fix, by checking the points above we can create a branch for each one and check them by themselves. I'm not standing still while I'm away, I'm just out of time for now. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/116 Co-authored-by: MrPurple666 Co-committed-by: MrPurple666 --- src/common/free_region_manager.h | 15 + src/common/host_memory.cpp | 31 +- .../renderer_vulkan/renderer_vulkan.cpp | 48 +-- .../renderer_vulkan/renderer_vulkan.h | 27 +- .../renderer_vulkan/vk_texture_cache.cpp | 310 +++++++++++++----- .../renderer_vulkan/vk_texture_cache.h | 3 +- 6 files changed, 314 insertions(+), 120 deletions(-) diff --git a/src/common/free_region_manager.h b/src/common/free_region_manager.h index 2e590d6094..2ff629b359 100644 --- a/src/common/free_region_manager.h +++ b/src/common/free_region_manager.h @@ -12,12 +12,22 @@ class FreeRegionManager { public: explicit FreeRegionManager() = default; ~FreeRegionManager() = default; + + // Clear all free regions + void Clear() { + std::scoped_lock lk(m_mutex); + m_free_regions.clear(); + } void SetAddressSpace(void* start, size_t size) { this->FreeBlock(start, size); } std::pair FreeBlock(void* block_ptr, size_t size) { + if (block_ptr == nullptr || size == 0) { + return {nullptr, 0}; + } + std::scoped_lock lk(m_mutex); // Check to see if we are adjacent to any regions. @@ -41,6 +51,11 @@ public: } void AllocateBlock(void* block_ptr, size_t size) { + // Skip if pointer is null or size is zero + if (block_ptr == nullptr || size == 0) { + return; + } + std::scoped_lock lk(m_mutex); auto address = reinterpret_cast(block_ptr); diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index e0b5a6a67c..d06522ec2c 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp @@ -491,6 +491,12 @@ public: // Intersect the range with our address space. AdjustMap(&virtual_offset, &length); + // Skip if length is zero after adjustment + if (length == 0) { + LOG_DEBUG(HW_Memory, "Skipping zero-length mapping at virtual_offset={}", virtual_offset); + return; + } + // We are removing a placeholder. free_manager.AllocateBlock(virtual_base + virtual_offset, length); @@ -520,13 +526,21 @@ public: // Intersect the range with our address space. AdjustMap(&virtual_offset, &length); + // Skip if length is zero after adjustment + if (length == 0) { + return; + } + // Merge with any adjacent placeholder mappings. auto [merged_pointer, merged_size] = free_manager.FreeBlock(virtual_base + virtual_offset, length); - void* ret = mmap(merged_pointer, merged_size, PROT_NONE, - MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); - ASSERT_MSG(ret != MAP_FAILED, "mmap failed: {}", strerror(errno)); + // Only attempt to mmap if we have a valid pointer and size + if (merged_pointer != nullptr && merged_size > 0) { + void* ret = mmap(merged_pointer, merged_size, PROT_NONE, + MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); + ASSERT_MSG(ret != MAP_FAILED, "mmap failed: {}", strerror(errno)); + } } void Protect(size_t virtual_offset, size_t length, bool read, bool write, bool execute) { @@ -576,19 +590,26 @@ public: private: /// Release all resources in the object void Release() { + // Make sure we release resources in the correct order + // First clear the free region manager to avoid any dangling references + free_manager.Clear(); + if (virtual_map_base != MAP_FAILED) { int ret = munmap(virtual_map_base, virtual_size); ASSERT_MSG(ret == 0, "munmap failed: {}", strerror(errno)); + virtual_map_base = reinterpret_cast(MAP_FAILED); } if (backing_base != MAP_FAILED) { int ret = munmap(backing_base, backing_size); ASSERT_MSG(ret == 0, "munmap failed: {}", strerror(errno)); + backing_base = reinterpret_cast(MAP_FAILED); } if (fd != -1) { int ret = close(fd); ASSERT_MSG(ret == 0, "close failed: {}", strerror(errno)); + fd = -1; } } @@ -686,8 +707,10 @@ void HostMemory::Map(size_t virtual_offset, size_t host_offset, size_t length, ASSERT(virtual_offset + length <= virtual_size); ASSERT(host_offset + length <= backing_size); if (length == 0 || !virtual_base || !impl) { + LOG_ERROR(HW_Memory, "Invalid mapping operation: virtual_base or impl is null"); return; } + LOG_INFO(HW_Memory, "Mapping memory: virtual_offset={}, host_offset={}, length={}", virtual_offset, host_offset, length); impl->Map(virtual_offset + virtual_base_offset, host_offset, length, perms); } @@ -696,8 +719,10 @@ void HostMemory::Unmap(size_t virtual_offset, size_t length, bool separate_heap) ASSERT(length % PageAlignment == 0); ASSERT(virtual_offset + length <= virtual_size); if (length == 0 || !virtual_base || !impl) { + LOG_ERROR(HW_Memory, "Invalid unmapping operation: virtual_base or impl is null"); return; } + LOG_INFO(HW_Memory, "Unmapping memory: virtual_offset={}, length={}", virtual_offset, length); impl->Unmap(virtual_offset + virtual_base_offset, length); } diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 30f5ff7a75..f5b73d63ef 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -110,27 +110,16 @@ try , device_memory(device_memory_) , gpu(gpu_) , library(OpenLibrary(context.get())) - , - // Create raw Vulkan instance first - instance(CreateInstance(*library, - dld, - VK_API_VERSION_1_1, - render_window.GetWindowInfo().type, - Settings::values.renderer_debug.GetValue())) - , - // Now create RAII wrappers for the resources in the correct order - managed_instance(MakeManagedInstance(instance, dld)) - , - // Create debug messenger if debug is enabled - debug_messenger(Settings::values.renderer_debug ? CreateDebugUtilsCallback(instance) - : vk::DebugUtilsMessenger{}) - , managed_debug_messenger(Settings::values.renderer_debug - ? MakeManagedDebugUtilsMessenger(debug_messenger, instance, dld) - : ManagedDebugUtilsMessenger{}) - , - // Create surface - surface(CreateSurface(instance, render_window.GetWindowInfo())) - , managed_surface(MakeManagedSurface(surface, instance, dld)) + , dld() + // Initialize resources in the same order as they are declared in the header + , instance(CreateInstance(*library, + dld, + VK_API_VERSION_1_1, + render_window.GetWindowInfo().type, + Settings::values.renderer_debug.GetValue())) + , debug_messenger(Settings::values.renderer_debug ? CreateDebugUtilsCallback(instance) + : vk::DebugUtilsMessenger{}) + , surface(CreateSurface(instance, render_window.GetWindowInfo())) , device(CreateDevice(instance, dld, *surface)) , memory_allocator(device) , state_tracker() @@ -172,22 +161,19 @@ try scheduler, PresentFiltersForAppletCapture) , rasterizer(render_window, gpu, device_memory, device, memory_allocator, state_tracker, scheduler) - , applet_frame() { + , turbo_mode() + , applet_frame() + , managed_instance(MakeManagedInstance(instance, dld)) + , managed_debug_messenger(Settings::values.renderer_debug + ? MakeManagedDebugUtilsMessenger(debug_messenger, instance, dld) + : ManagedDebugUtilsMessenger{}) + , managed_surface(MakeManagedSurface(surface, instance, dld)) { if (Settings::values.renderer_force_max_clock.GetValue() && device.ShouldBoostClocks()) { turbo_mode.emplace(instance, dld); scheduler.RegisterOnSubmit([this] { turbo_mode->QueueSubmitted(); }); } -#ifndef ANDROID - // Release ownership from the old instance and surface - instance.release(); - surface.release(); - if (Settings::values.renderer_debug) { - debug_messenger.release(); - } -#endif - Report(); } catch (const vk::Exception& exception) { LOG_ERROR(Render_Vulkan, "Vulkan initialization failed with error: {}", exception.what()); diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.h b/src/video_core/renderer_vulkan/renderer_vulkan.h index c1e6d5db7f..ec4215253f 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.h +++ b/src/video_core/renderer_vulkan/renderer_vulkan.h @@ -76,32 +76,37 @@ private: std::shared_ptr library; vk::InstanceDispatch dld; - // Keep original handles for compatibility with existing code + // Order of member variables determines destruction order (reverse of declaration) + // Critical Vulkan resources should be declared in proper dependency order + + // Base Vulkan instance, debugging, and surface vk::Instance instance; - // RAII wrapper for instance - ManagedInstance managed_instance; - vk::DebugUtilsMessenger debug_messenger; - // RAII wrapper for debug messenger - ManagedDebugUtilsMessenger managed_debug_messenger; - vk::SurfaceKHR surface; - // RAII wrapper for surface - ManagedSurface managed_surface; - + + // Device and core resources Device device; MemoryAllocator memory_allocator; StateTracker state_tracker; Scheduler scheduler; Swapchain swapchain; PresentManager present_manager; + + // Rendering components BlitScreen blit_swapchain; BlitScreen blit_capture; BlitScreen blit_applet; RasterizerVulkan rasterizer; - std::optional turbo_mode; + // Optional components + std::optional turbo_mode; Frame applet_frame; + + // RAII wrappers - must be destroyed before their raw handles + // so they are declared after to be destroyed first + ManagedInstance managed_instance; + ManagedDebugUtilsMessenger managed_debug_messenger; + ManagedSurface managed_surface; }; } // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 0b98d71b97..ebd8b65760 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -1523,22 +1523,76 @@ Image::Image(const VideoCommon::NullImageParams& params) : VideoCommon::ImageBas Image::~Image() = default; void Image::UploadMemory(VkBuffer buffer, VkDeviceSize offset, - std::span copies) { + std::span copies) { // TODO: Move this to another API const bool is_rescaled = True(flags & ImageFlagBits::Rescaled); if (is_rescaled) { ScaleDown(true); } - scheduler->RequestOutsideRenderPassOperationContext(); - auto vk_copies = TransformBufferImageCopies(copies, offset, aspect_mask); - const VkBuffer src_buffer = buffer; - const VkImage vk_image = *original_image; - const VkImageAspectFlags vk_aspect_mask = aspect_mask; - const bool is_initialized = std::exchange(initialized, true); - scheduler->Record([src_buffer, vk_image, vk_aspect_mask, is_initialized, - vk_copies](vk::CommandBuffer cmdbuf) { - CopyBufferToImage(cmdbuf, src_buffer, vk_image, vk_aspect_mask, is_initialized, vk_copies); - }); + + // Handle MSAA upload if necessary + if (info.num_samples > 1 && runtime->CanUploadMSAA()) { + // Only use MSAA copy pass for color formats + // Depth/stencil formats need special handling + if (aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT) { + // Create a temporary non-MSAA image to upload the data first + ImageInfo temp_info = info; + temp_info.num_samples = 1; + + // Create image with same usage flags as the target image to avoid validation errors + VkImageCreateInfo image_ci = MakeImageCreateInfo(runtime->device, temp_info); + image_ci.usage = original_image.UsageFlags(); + vk::Image temp_image = runtime->memory_allocator.CreateImage(image_ci); + + // Upload to the temporary non-MSAA image + scheduler->RequestOutsideRenderPassOperationContext(); + auto vk_copies = TransformBufferImageCopies(copies, offset, aspect_mask); + const VkBuffer src_buffer = buffer; + const VkImage temp_vk_image = *temp_image; + const VkImageAspectFlags vk_aspect_mask = aspect_mask; + scheduler->Record([src_buffer, temp_vk_image, vk_aspect_mask, vk_copies](vk::CommandBuffer cmdbuf) { + CopyBufferToImage(cmdbuf, src_buffer, temp_vk_image, vk_aspect_mask, false, vk_copies); + }); + + // Now use MSAACopyPass to convert from non-MSAA to MSAA + std::vector image_copies; + for (const auto& copy : copies) { + VideoCommon::ImageCopy image_copy; + image_copy.src_offset = {0, 0, 0}; // Use zero offset for source + image_copy.dst_offset = copy.image_offset; + image_copy.src_subresource = copy.image_subresource; + image_copy.dst_subresource = copy.image_subresource; + image_copy.extent = copy.image_extent; + image_copies.push_back(image_copy); + } + + // Create a wrapper Image for the temporary image + Image temp_wrapper(*runtime, temp_info, 0, 0); + temp_wrapper.original_image = std::move(temp_image); + temp_wrapper.current_image = &Image::original_image; + temp_wrapper.aspect_mask = aspect_mask; + temp_wrapper.initialized = true; + + // Use MSAACopyPass to convert from non-MSAA to MSAA + runtime->msaa_copy_pass->CopyImage(*this, temp_wrapper, image_copies, false); + std::exchange(initialized, true); + return; + } + // For depth/stencil formats, fall back to regular upload + } else { + // Regular non-MSAA upload + scheduler->RequestOutsideRenderPassOperationContext(); + auto vk_copies = TransformBufferImageCopies(copies, offset, aspect_mask); + const VkBuffer src_buffer = buffer; + const VkImage vk_image = *original_image; + const VkImageAspectFlags vk_aspect_mask = aspect_mask; + const bool is_initialized = std::exchange(initialized, true); + scheduler->Record([src_buffer, vk_image, vk_aspect_mask, is_initialized, + vk_copies](vk::CommandBuffer cmdbuf) { + CopyBufferToImage(cmdbuf, src_buffer, vk_image, vk_aspect_mask, is_initialized, vk_copies); + }); + } + if (is_rescaled) { ScaleUp(); } @@ -1560,75 +1614,185 @@ void Image::DownloadMemory(VkBuffer buffer, size_t offset, } void Image::DownloadMemory(std::span buffers_span, std::span offsets_span, - std::span copies) { + std::span copies) { const bool is_rescaled = True(flags & ImageFlagBits::Rescaled); if (is_rescaled) { ScaleDown(); } - boost::container::small_vector buffers_vector{}; - boost::container::small_vector, 8> - vk_copies; - for (size_t index = 0; index < buffers_span.size(); index++) { - buffers_vector.emplace_back(buffers_span[index]); - vk_copies.emplace_back( - TransformBufferImageCopies(copies, offsets_span[index], aspect_mask)); - } - scheduler->RequestOutsideRenderPassOperationContext(); - scheduler->Record([buffers = std::move(buffers_vector), image = *original_image, - aspect_mask_ = aspect_mask, vk_copies](vk::CommandBuffer cmdbuf) { - const VkImageMemoryBarrier read_barrier{ - .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, - .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, - .oldLayout = VK_IMAGE_LAYOUT_GENERAL, - .newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .image = image, - .subresourceRange{ - .aspectMask = aspect_mask_, - .baseMipLevel = 0, - .levelCount = VK_REMAINING_MIP_LEVELS, - .baseArrayLayer = 0, - .layerCount = VK_REMAINING_ARRAY_LAYERS, - }, - }; - cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, - 0, read_barrier); - for (size_t index = 0; index < buffers.size(); index++) { - cmdbuf.CopyImageToBuffer(image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, buffers[index], - vk_copies[index]); + // Handle MSAA download if necessary + if (info.num_samples > 1 && runtime->msaa_copy_pass) { + // Only use MSAA copy pass for color formats + // Depth/stencil formats need special handling + if (aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT) { + // Create a temporary non-MSAA image to download the data + ImageInfo temp_info = info; + temp_info.num_samples = 1; + + // Create image with same usage flags as the target image to avoid validation errors + VkImageCreateInfo image_ci = MakeImageCreateInfo(runtime->device, temp_info); + image_ci.usage = original_image.UsageFlags(); + vk::Image temp_image = runtime->memory_allocator.CreateImage(image_ci); + + // Create a wrapper Image for the temporary image + Image temp_wrapper(*runtime, temp_info, 0, 0); + temp_wrapper.original_image = std::move(temp_image); + temp_wrapper.current_image = &Image::original_image; + temp_wrapper.aspect_mask = aspect_mask; + temp_wrapper.initialized = true; + + // Convert from MSAA to non-MSAA using MSAACopyPass + std::vector image_copies; + for (const auto& copy : copies) { + VideoCommon::ImageCopy image_copy; + image_copy.src_offset = copy.image_offset; + image_copy.dst_offset = copy.image_offset; + image_copy.src_subresource = copy.image_subresource; + image_copy.dst_subresource = copy.image_subresource; + image_copy.extent = copy.image_extent; + image_copies.push_back(image_copy); + } + + // Use MSAACopyPass to convert from MSAA to non-MSAA + runtime->msaa_copy_pass->CopyImage(temp_wrapper, *this, image_copies, true); + + // Now download from the non-MSAA image + boost::container::small_vector buffers_vector{}; + boost::container::small_vector, 8> + vk_copies; + for (size_t index = 0; index < buffers_span.size(); index++) { + buffers_vector.emplace_back(buffers_span[index]); + vk_copies.emplace_back( + TransformBufferImageCopies(copies, offsets_span[index], aspect_mask)); + } + + scheduler->RequestOutsideRenderPassOperationContext(); + scheduler->Record([buffers = std::move(buffers_vector), image = *temp_wrapper.original_image, + aspect_mask_ = aspect_mask, vk_copies](vk::CommandBuffer cmdbuf) { + const VkImageMemoryBarrier read_barrier{ + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, + .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, + .oldLayout = VK_IMAGE_LAYOUT_GENERAL, + .newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, + .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .image = image, + .subresourceRange{ + .aspectMask = aspect_mask_, + .baseMipLevel = 0, + .levelCount = VK_REMAINING_MIP_LEVELS, + .baseArrayLayer = 0, + .layerCount = VK_REMAINING_ARRAY_LAYERS, + }, + }; + cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, + 0, read_barrier); + + for (size_t index = 0; index < buffers.size(); index++) { + cmdbuf.CopyImageToBuffer(image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, buffers[index], + vk_copies[index]); + } + + const VkMemoryBarrier memory_write_barrier{ + .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, + .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, + }; + const VkImageMemoryBarrier image_write_barrier{ + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = 0, + .dstAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, + .oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, + .newLayout = VK_IMAGE_LAYOUT_GENERAL, + .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .image = image, + .subresourceRange{ + .aspectMask = aspect_mask_, + .baseMipLevel = 0, + .levelCount = VK_REMAINING_MIP_LEVELS, + .baseArrayLayer = 0, + .layerCount = VK_REMAINING_ARRAY_LAYERS, + }, + }; + cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + 0, memory_write_barrier, nullptr, image_write_barrier); + }); + return; } + // For depth/stencil formats, fall back to regular download + } else { + // Regular non-MSAA download + boost::container::small_vector buffers_vector{}; + boost::container::small_vector, 8> + vk_copies; + for (size_t index = 0; index < buffers_span.size(); index++) { + buffers_vector.emplace_back(buffers_span[index]); + vk_copies.emplace_back( + TransformBufferImageCopies(copies, offsets_span[index], aspect_mask)); + } + scheduler->RequestOutsideRenderPassOperationContext(); + scheduler->Record([buffers = std::move(buffers_vector), image = *original_image, + aspect_mask_ = aspect_mask, vk_copies](vk::CommandBuffer cmdbuf) { + const VkImageMemoryBarrier read_barrier{ + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, + .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, + .oldLayout = VK_IMAGE_LAYOUT_GENERAL, + .newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, + .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .image = image, + .subresourceRange{ + .aspectMask = aspect_mask_, + .baseMipLevel = 0, + .levelCount = VK_REMAINING_MIP_LEVELS, + .baseArrayLayer = 0, + .layerCount = VK_REMAINING_ARRAY_LAYERS, + }, + }; + cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, + 0, read_barrier); + + for (size_t index = 0; index < buffers.size(); index++) { + cmdbuf.CopyImageToBuffer(image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, buffers[index], + vk_copies[index]); + } + + const VkMemoryBarrier memory_write_barrier{ + .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, + .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, + }; + const VkImageMemoryBarrier image_write_barrier{ + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = 0, + .dstAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, + .oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, + .newLayout = VK_IMAGE_LAYOUT_GENERAL, + .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .image = image, + .subresourceRange{ + .aspectMask = aspect_mask_, + .baseMipLevel = 0, + .levelCount = VK_REMAINING_MIP_LEVELS, + .baseArrayLayer = 0, + .layerCount = VK_REMAINING_ARRAY_LAYERS, + }, + }; + cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + 0, memory_write_barrier, nullptr, image_write_barrier); + }); + } - const VkMemoryBarrier memory_write_barrier{ - .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, - .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, - }; - const VkImageMemoryBarrier image_write_barrier{ - .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = 0, - .dstAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, - .oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - .newLayout = VK_IMAGE_LAYOUT_GENERAL, - .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .image = image, - .subresourceRange{ - .aspectMask = aspect_mask_, - .baseMipLevel = 0, - .levelCount = VK_REMAINING_MIP_LEVELS, - .baseArrayLayer = 0, - .layerCount = VK_REMAINING_ARRAY_LAYERS, - }, - }; - cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - 0, memory_write_barrier, nullptr, image_write_barrier); - }); if (is_rescaled) { ScaleUp(true); } diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index 18d20b2db5..cd11cc8fc7 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -82,8 +82,7 @@ public: } bool CanUploadMSAA() const noexcept { - // TODO: Implement buffer to MSAA uploads - return false; + return msaa_copy_pass.operator bool(); } void AccelerateImageUpload(Image&, const StagingBufferRef&, From cda9f32b165ba0c4035a14a4602f3a39cb247565 Mon Sep 17 00:00:00 2001 From: Aleksandr Popovich Date: Sun, 18 May 2025 17:47:54 +0000 Subject: [PATCH 12/26] added qlaunch shortcut and command line option. (#112) Signed-off-by: Aleksandr Popovich Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/112 Co-authored-by: Aleksandr Popovich Co-committed-by: Aleksandr Popovich --- src/yuzu/main.cpp | 181 +++++++++++++++++++++++++++++++++++++++++++--- src/yuzu/main.h | 4 + src/yuzu/main.ui | 27 +++++++ 3 files changed, 200 insertions(+), 12 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 497c519f74..450d340580 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -481,6 +481,8 @@ GMainWindow::GMainWindow(bool has_broken_vulkan) } QString game_path; + bool should_launch_qlaunch = false; + bool should_launch_setup = false; bool has_gamepath = false; bool is_fullscreen = false; @@ -549,6 +551,11 @@ GMainWindow::GMainWindow(bool has_broken_vulkan) game_path = args[++i]; has_gamepath = true; } + + if (args[i] == QStringLiteral("-qlaunch")) + should_launch_qlaunch = true; + if (args[i] == QStringLiteral("-setup")) + should_launch_setup = true; } // Override fullscreen setting if gamepath or argument is provided @@ -556,8 +563,16 @@ GMainWindow::GMainWindow(bool has_broken_vulkan) ui->action_Fullscreen->setChecked(is_fullscreen); } - if (!game_path.isEmpty()) { - BootGame(game_path, ApplicationAppletParameters()); + if (should_launch_setup) { + OnInitialSetup(); + } else { + if (!game_path.isEmpty()) { + BootGame(game_path, ApplicationAppletParameters()); + } else { + if (should_launch_qlaunch) { + OnHomeMenu(); + } + } } } @@ -1582,6 +1597,9 @@ void GMainWindow::ConnectMenuEvents() { connect_menu(ui->action_Load_Mii_Edit, &GMainWindow::OnMiiEdit); connect_menu(ui->action_Open_Controller_Menu, &GMainWindow::OnOpenControllerMenu); connect_menu(ui->action_Load_Home_Menu, &GMainWindow::OnHomeMenu); + connect_menu(ui->action_Open_Setup, &GMainWindow::OnInitialSetup); + connect_menu(ui->action_Desktop, &GMainWindow::OnCreateHomeMenuDesktopShortcut); + connect_menu(ui->action_Application_Menu, &GMainWindow::OnCreateHomeMenuApplicationMenuShortcut); connect_menu(ui->action_Capture_Screenshot, &GMainWindow::OnCaptureScreenshot); // TAS @@ -1826,18 +1844,18 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa switch (role) { - case QMessageBox::RejectRole: - return false; + case QMessageBox::RejectRole: + return false; - case QMessageBox::AcceptRole: - default: - if (dontShowAgain->isChecked()) { - currentIgnored << QString::number(params.program_id); + case QMessageBox::AcceptRole: + default: + if (dontShowAgain->isChecked()) { + currentIgnored << QString::number(params.program_id); - settings.setValue("ignoredBadUpdates", currentIgnored); - settings.sync(); - } - break; + settings.setValue("ignoredBadUpdates", currentIgnored); + settings.sync(); + } + break; } } } @@ -4546,6 +4564,145 @@ void GMainWindow::OnHomeMenu() { BootGame(filename, LibraryAppletParameters(QLaunchId, Service::AM::AppletId::QLaunch)); } +void GMainWindow::OnInitialSetup() +{ + constexpr u64 Starter = static_cast(Service::AM::AppletProgramId::Starter); + auto bis_system = system->GetFileSystemController().GetSystemNANDContents(); + if (!bis_system) { + QMessageBox::warning(this, tr("No firmware available"), + tr("Please install the firmware to use Starter.")); + return; + } + + auto qlaunch_nca = bis_system->GetEntry(Starter, FileSys::ContentRecordType::Program); + if (!qlaunch_nca) { + QMessageBox::warning(this, tr("Starter Applet"), + tr("Starter is not available. Please reinstall firmware.")); + return; + } + + system->GetFrontendAppletHolder().SetCurrentAppletId(Service::AM::AppletId::Starter); + + const auto filename = QString::fromStdString((qlaunch_nca->GetFullPath())); + UISettings::values.roms_path = QFileInfo(filename).path().toStdString(); + BootGame(filename, LibraryAppletParameters(Starter, Service::AM::AppletId::Starter)); +} + +void GMainWindow::OnCreateHomeMenuDesktopShortcut() +{ + OnCreateHomeMenuShortcut(GameListShortcutTarget::Desktop); +} + +void GMainWindow::OnCreateHomeMenuApplicationMenuShortcut() +{ + OnCreateHomeMenuShortcut(GameListShortcutTarget::Applications); +} + +void GMainWindow::OnCreateHomeMenuShortcut(GameListShortcutTarget target) +{ + // Get path to yuzu executable + const QStringList args = QApplication::arguments(); + std::filesystem::path yuzu_command = args[0].toStdString(); + // If relative path, make it an absolute path + if (yuzu_command.c_str()[0] == '.') { + yuzu_command = Common::FS::GetCurrentDir() / yuzu_command; + } + // Shortcut path + std::filesystem::path shortcut_path{}; + if (target == GameListShortcutTarget::Desktop) { + shortcut_path = + QStandardPaths::writableLocation(QStandardPaths::DesktopLocation).toStdString(); + } else if (target == GameListShortcutTarget::Applications) { + shortcut_path = + QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation).toStdString(); + } + + if (!std::filesystem::exists(shortcut_path)) { + GMainWindow::CreateShortcutMessagesGUI( + this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, + QString::fromStdString(shortcut_path.generic_string())); + LOG_ERROR(Frontend, "Invalid shortcut target {}", shortcut_path.generic_string()); + return; + } + + constexpr u64 QLaunchId = static_cast(Service::AM::AppletProgramId::QLaunch); + auto bis_system = system->GetFileSystemController().GetSystemNANDContents(); + if (!bis_system) { + QMessageBox::warning(this, tr("No firmware available"), + tr("Please install the firmware to use the home menu.")); + return; + } + + auto qlaunch_nca = bis_system->GetEntry(QLaunchId, FileSys::ContentRecordType::Program); + if (!qlaunch_nca) { + QMessageBox::warning(this, tr("Home Menu Applet"), + tr("Home Menu is not available. Please reinstall firmware.")); + return; + } + + const std::string game_title = "QLaunch"; + const QString qt_game_title = tr("QLaunch"); + + auto qlaunch_applet_nca = bis_system->GetEntry(QLaunchId, FileSys::ContentRecordType::Program); + const auto game_path = QString::fromStdString((qlaunch_applet_nca->GetFullPath())); + + const FileSys::PatchManager pm{static_cast(Service::AM::AppletProgramId::QLaunch), system->GetFileSystemController(), + system->GetContentProvider()}; + const auto control = pm.GetControlMetadata(); + const auto loader = + Loader::GetLoader(*system, vfs->OpenFile(game_path.toStdString(), FileSys::OpenMode::Read)); + + // Get icon from game file + std::vector icon_image_file{}; + if (control.second != nullptr) { + icon_image_file = control.second->ReadAllBytes(); + } else if (loader->ReadIcon(icon_image_file) != Loader::ResultStatus::Success) { + LOG_WARNING(Frontend, "Could not read icon from {:s}", game_path.toStdString()); + } + QImage icon_data = + QImage::fromData(icon_image_file.data(), static_cast(icon_image_file.size())); + std::filesystem::path out_icon_path; + if (GMainWindow::MakeShortcutIcoPath(QLaunchId, game_title, out_icon_path)) { + if (!SaveIconToFile(out_icon_path, icon_data)) { + LOG_ERROR(Frontend, "Could not write icon to file"); + } + } + +#if defined(__linux__) + // Special case for AppImages + // Warn once if we are making a shortcut to a volatile AppImage + const std::string appimage_ending = + std::string(Common::g_scm_rev).substr(0, 9).append(".AppImage"); + if (yuzu_command.string().ends_with(appimage_ending) && + !UISettings::values.shortcut_already_warned) { + if (GMainWindow::CreateShortcutMessagesGUI( + this, GMainWindow::CREATE_SHORTCUT_MSGBOX_APPVOLATILE_WARNING, qt_game_title)) { + return; + } + UISettings::values.shortcut_already_warned = true; + } +#endif // __linux__ + + // Create shortcut + std::string arguments = "-qlaunch"; + if (GMainWindow::CreateShortcutMessagesGUI( + this, GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, qt_game_title)) { + arguments = "-f " + arguments; + } + const std::string comment = fmt::format("Start {:s} with the eden Emulator", game_title); + const std::string categories = "Game;Emulator;Qt;"; + const std::string keywords = "Switch;Nintendo;"; + + if (GMainWindow::CreateShortcutLink(shortcut_path, comment, out_icon_path, yuzu_command, + arguments, categories, keywords, game_title)) { + GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_SUCCESS, + qt_game_title); + return; + } + GMainWindow::CreateShortcutMessagesGUI(this, GMainWindow::CREATE_SHORTCUT_MSGBOX_ERROR, + qt_game_title); +} + void GMainWindow::OnCaptureScreenshot() { if (emu_thread == nullptr || !emu_thread->IsRunning()) { return; diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 5afec3d199..099bee52fb 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -401,6 +401,10 @@ private slots: void OnMiiEdit(); void OnOpenControllerMenu(); void OnHomeMenu(); + void OnInitialSetup(); + void OnCreateHomeMenuDesktopShortcut(); + void OnCreateHomeMenuApplicationMenuShortcut(); + void OnCreateHomeMenuShortcut(GameListShortcutTarget target); void OnCaptureScreenshot(); void OnCheckFirmwareDecryption(); void OnLanguageChanged(const QString& locale); diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index fbecd9eee3..6b19d1f8f5 100644 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui @@ -165,6 +165,13 @@ + + + &Create Home Menu Shortcut + + + + @@ -174,6 +181,8 @@ + + @@ -490,6 +499,24 @@ &Discord + + + Open &Setup + + + QAction::MenuRole::TextHeuristicRole + + + + + &Desktop + + + + + &Application Menu + + From a776f5bc3b04490fc1c6cfff15e2862e092beea5 Mon Sep 17 00:00:00 2001 From: swurl Date: Sun, 18 May 2025 17:49:11 +0000 Subject: [PATCH 13/26] update dynarmic (#110) Signed-off-by: swurl Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/110 Co-authored-by: swurl Co-committed-by: swurl --- externals/dynarmic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/externals/dynarmic b/externals/dynarmic index ae9962226e..ec9349f20e 160000 --- a/externals/dynarmic +++ b/externals/dynarmic @@ -1 +1 @@ -Subproject commit ae9962226e65e2b6d5f85141de4d31fa958f669a +Subproject commit ec9349f20ea7d3cc34af9a678e76aedda4410f5a From ea7b9519c7a5b3f27f16a1be9550ca69aa2d308b Mon Sep 17 00:00:00 2001 From: Esther1024 Date: Mon, 19 May 2025 19:11:06 +0000 Subject: [PATCH 14/26] fix uninit values in applet and mouse (#114) read before written; initialize so valgrind stops complaining Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/114 Co-authored-by: Esther1024 Co-committed-by: Esther1024 --- src/hid_core/resources/applet_resource.h | 2 +- src/input_common/drivers/mouse.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hid_core/resources/applet_resource.h b/src/hid_core/resources/applet_resource.h index 4a5416fb29..69ea46b957 100644 --- a/src/hid_core/resources/applet_resource.h +++ b/src/hid_core/resources/applet_resource.h @@ -119,7 +119,7 @@ private: std::array data{}; std::array shared_memory_holder{}; s32 ref_counter{}; - u64 active_vibration_aruid; + u64 active_vibration_aruid = 0; Core::System& system; }; diff --git a/src/input_common/drivers/mouse.h b/src/input_common/drivers/mouse.h index 2b93a40b9c..124b6f3bd5 100644 --- a/src/input_common/drivers/mouse.h +++ b/src/input_common/drivers/mouse.h @@ -108,7 +108,7 @@ private: Common::Vec2 last_mouse_change; Common::Vec3 last_motion_change; Common::Vec2 wheel_position; - bool button_pressed; + bool button_pressed = false; std::jthread update_thread; }; From 89c06a73836b6e76b5283dec96aa3fef7e48452e Mon Sep 17 00:00:00 2001 From: swurl Date: Mon, 19 May 2025 15:18:47 -0400 Subject: [PATCH 15/26] fix vk extension removal Signed-off-by: swurl --- .ci/linux/package.sh | 1 - src/video_core/vulkan_common/vulkan_device.cpp | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.ci/linux/package.sh b/.ci/linux/package.sh index 4d58b8f328..5c556cd0e4 100755 --- a/.ci/linux/package.sh +++ b/.ci/linux/package.sh @@ -21,7 +21,6 @@ fi EDEN_TAG=$(git describe --tags --abbrev=0) echo "Making stable \"$EDEN_TAG\" build" -git checkout "$EDEN_TAG" VERSION="$(echo "$EDEN_TAG")" # NOW MAKE APPIMAGE diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 9607487a50..87cfe06086 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -1190,7 +1190,7 @@ void Device::RemoveUnsuitableExtensions() { int dynamic_state = Settings::values.dyna_state.GetValue(); // VK_EXT_extended_dynamic_state - if (dynamic_state < 1) { + if (dynamic_state > 0) { extensions.extended_dynamic_state = features.extended_dynamic_state.extendedDynamicState; RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state, features.extended_dynamic_state, @@ -1202,7 +1202,7 @@ void Device::RemoveUnsuitableExtensions() { } // VK_EXT_extended_dynamic_state2 - if (dynamic_state < 2) { + if (dynamic_state > 1) { extensions.extended_dynamic_state2 = features.extended_dynamic_state2.extendedDynamicState2; RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state2, features.extended_dynamic_state2, @@ -1214,7 +1214,7 @@ void Device::RemoveUnsuitableExtensions() { } // VK_EXT_extended_dynamic_state3 - if (dynamic_state < 3) { + if (dynamic_state > 2) { dynamic_state3_blending = features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable && features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation From 3cad73dad6cde4896ed662bbe67605f2bdc6e296 Mon Sep 17 00:00:00 2001 From: swurl Date: Mon, 19 May 2025 15:22:08 -0400 Subject: [PATCH 16/26] Revert "THIS NEEDS TO BE CHECKED BEFORE MERGE: RAII fix, initial MSAA, some fixes for memory misallocation (#116)" This reverts commit ce5d5d2aff50f9ce8159d609824eb2391bed9ef2. --- src/common/free_region_manager.h | 15 - src/common/host_memory.cpp | 31 +- .../renderer_vulkan/renderer_vulkan.cpp | 48 ++- .../renderer_vulkan/renderer_vulkan.h | 27 +- .../renderer_vulkan/vk_texture_cache.cpp | 312 +++++------------- .../renderer_vulkan/vk_texture_cache.h | 3 +- 6 files changed, 121 insertions(+), 315 deletions(-) diff --git a/src/common/free_region_manager.h b/src/common/free_region_manager.h index 2ff629b359..2e590d6094 100644 --- a/src/common/free_region_manager.h +++ b/src/common/free_region_manager.h @@ -12,22 +12,12 @@ class FreeRegionManager { public: explicit FreeRegionManager() = default; ~FreeRegionManager() = default; - - // Clear all free regions - void Clear() { - std::scoped_lock lk(m_mutex); - m_free_regions.clear(); - } void SetAddressSpace(void* start, size_t size) { this->FreeBlock(start, size); } std::pair FreeBlock(void* block_ptr, size_t size) { - if (block_ptr == nullptr || size == 0) { - return {nullptr, 0}; - } - std::scoped_lock lk(m_mutex); // Check to see if we are adjacent to any regions. @@ -51,11 +41,6 @@ public: } void AllocateBlock(void* block_ptr, size_t size) { - // Skip if pointer is null or size is zero - if (block_ptr == nullptr || size == 0) { - return; - } - std::scoped_lock lk(m_mutex); auto address = reinterpret_cast(block_ptr); diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index d06522ec2c..e0b5a6a67c 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp @@ -491,12 +491,6 @@ public: // Intersect the range with our address space. AdjustMap(&virtual_offset, &length); - // Skip if length is zero after adjustment - if (length == 0) { - LOG_DEBUG(HW_Memory, "Skipping zero-length mapping at virtual_offset={}", virtual_offset); - return; - } - // We are removing a placeholder. free_manager.AllocateBlock(virtual_base + virtual_offset, length); @@ -526,21 +520,13 @@ public: // Intersect the range with our address space. AdjustMap(&virtual_offset, &length); - // Skip if length is zero after adjustment - if (length == 0) { - return; - } - // Merge with any adjacent placeholder mappings. auto [merged_pointer, merged_size] = free_manager.FreeBlock(virtual_base + virtual_offset, length); - // Only attempt to mmap if we have a valid pointer and size - if (merged_pointer != nullptr && merged_size > 0) { - void* ret = mmap(merged_pointer, merged_size, PROT_NONE, - MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); - ASSERT_MSG(ret != MAP_FAILED, "mmap failed: {}", strerror(errno)); - } + void* ret = mmap(merged_pointer, merged_size, PROT_NONE, + MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED, -1, 0); + ASSERT_MSG(ret != MAP_FAILED, "mmap failed: {}", strerror(errno)); } void Protect(size_t virtual_offset, size_t length, bool read, bool write, bool execute) { @@ -590,26 +576,19 @@ public: private: /// Release all resources in the object void Release() { - // Make sure we release resources in the correct order - // First clear the free region manager to avoid any dangling references - free_manager.Clear(); - if (virtual_map_base != MAP_FAILED) { int ret = munmap(virtual_map_base, virtual_size); ASSERT_MSG(ret == 0, "munmap failed: {}", strerror(errno)); - virtual_map_base = reinterpret_cast(MAP_FAILED); } if (backing_base != MAP_FAILED) { int ret = munmap(backing_base, backing_size); ASSERT_MSG(ret == 0, "munmap failed: {}", strerror(errno)); - backing_base = reinterpret_cast(MAP_FAILED); } if (fd != -1) { int ret = close(fd); ASSERT_MSG(ret == 0, "close failed: {}", strerror(errno)); - fd = -1; } } @@ -707,10 +686,8 @@ void HostMemory::Map(size_t virtual_offset, size_t host_offset, size_t length, ASSERT(virtual_offset + length <= virtual_size); ASSERT(host_offset + length <= backing_size); if (length == 0 || !virtual_base || !impl) { - LOG_ERROR(HW_Memory, "Invalid mapping operation: virtual_base or impl is null"); return; } - LOG_INFO(HW_Memory, "Mapping memory: virtual_offset={}, host_offset={}, length={}", virtual_offset, host_offset, length); impl->Map(virtual_offset + virtual_base_offset, host_offset, length, perms); } @@ -719,10 +696,8 @@ void HostMemory::Unmap(size_t virtual_offset, size_t length, bool separate_heap) ASSERT(length % PageAlignment == 0); ASSERT(virtual_offset + length <= virtual_size); if (length == 0 || !virtual_base || !impl) { - LOG_ERROR(HW_Memory, "Invalid unmapping operation: virtual_base or impl is null"); return; } - LOG_INFO(HW_Memory, "Unmapping memory: virtual_offset={}, length={}", virtual_offset, length); impl->Unmap(virtual_offset + virtual_base_offset, length); } diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index f5b73d63ef..30f5ff7a75 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -110,16 +110,27 @@ try , device_memory(device_memory_) , gpu(gpu_) , library(OpenLibrary(context.get())) - , dld() - // Initialize resources in the same order as they are declared in the header - , instance(CreateInstance(*library, - dld, - VK_API_VERSION_1_1, - render_window.GetWindowInfo().type, - Settings::values.renderer_debug.GetValue())) - , debug_messenger(Settings::values.renderer_debug ? CreateDebugUtilsCallback(instance) - : vk::DebugUtilsMessenger{}) - , surface(CreateSurface(instance, render_window.GetWindowInfo())) + , + // Create raw Vulkan instance first + instance(CreateInstance(*library, + dld, + VK_API_VERSION_1_1, + render_window.GetWindowInfo().type, + Settings::values.renderer_debug.GetValue())) + , + // Now create RAII wrappers for the resources in the correct order + managed_instance(MakeManagedInstance(instance, dld)) + , + // Create debug messenger if debug is enabled + debug_messenger(Settings::values.renderer_debug ? CreateDebugUtilsCallback(instance) + : vk::DebugUtilsMessenger{}) + , managed_debug_messenger(Settings::values.renderer_debug + ? MakeManagedDebugUtilsMessenger(debug_messenger, instance, dld) + : ManagedDebugUtilsMessenger{}) + , + // Create surface + surface(CreateSurface(instance, render_window.GetWindowInfo())) + , managed_surface(MakeManagedSurface(surface, instance, dld)) , device(CreateDevice(instance, dld, *surface)) , memory_allocator(device) , state_tracker() @@ -161,19 +172,22 @@ try scheduler, PresentFiltersForAppletCapture) , rasterizer(render_window, gpu, device_memory, device, memory_allocator, state_tracker, scheduler) - , turbo_mode() - , applet_frame() - , managed_instance(MakeManagedInstance(instance, dld)) - , managed_debug_messenger(Settings::values.renderer_debug - ? MakeManagedDebugUtilsMessenger(debug_messenger, instance, dld) - : ManagedDebugUtilsMessenger{}) - , managed_surface(MakeManagedSurface(surface, instance, dld)) { + , applet_frame() { if (Settings::values.renderer_force_max_clock.GetValue() && device.ShouldBoostClocks()) { turbo_mode.emplace(instance, dld); scheduler.RegisterOnSubmit([this] { turbo_mode->QueueSubmitted(); }); } +#ifndef ANDROID + // Release ownership from the old instance and surface + instance.release(); + surface.release(); + if (Settings::values.renderer_debug) { + debug_messenger.release(); + } +#endif + Report(); } catch (const vk::Exception& exception) { LOG_ERROR(Render_Vulkan, "Vulkan initialization failed with error: {}", exception.what()); diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.h b/src/video_core/renderer_vulkan/renderer_vulkan.h index ec4215253f..c1e6d5db7f 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.h +++ b/src/video_core/renderer_vulkan/renderer_vulkan.h @@ -76,37 +76,32 @@ private: std::shared_ptr library; vk::InstanceDispatch dld; - // Order of member variables determines destruction order (reverse of declaration) - // Critical Vulkan resources should be declared in proper dependency order - - // Base Vulkan instance, debugging, and surface + // Keep original handles for compatibility with existing code vk::Instance instance; + // RAII wrapper for instance + ManagedInstance managed_instance; + vk::DebugUtilsMessenger debug_messenger; + // RAII wrapper for debug messenger + ManagedDebugUtilsMessenger managed_debug_messenger; + vk::SurfaceKHR surface; - - // Device and core resources + // RAII wrapper for surface + ManagedSurface managed_surface; + Device device; MemoryAllocator memory_allocator; StateTracker state_tracker; Scheduler scheduler; Swapchain swapchain; PresentManager present_manager; - - // Rendering components BlitScreen blit_swapchain; BlitScreen blit_capture; BlitScreen blit_applet; RasterizerVulkan rasterizer; - - // Optional components std::optional turbo_mode; + Frame applet_frame; - - // RAII wrappers - must be destroyed before their raw handles - // so they are declared after to be destroyed first - ManagedInstance managed_instance; - ManagedDebugUtilsMessenger managed_debug_messenger; - ManagedSurface managed_surface; }; } // namespace Vulkan diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index ebd8b65760..0b98d71b97 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -1523,76 +1523,22 @@ Image::Image(const VideoCommon::NullImageParams& params) : VideoCommon::ImageBas Image::~Image() = default; void Image::UploadMemory(VkBuffer buffer, VkDeviceSize offset, - std::span copies) { + std::span copies) { // TODO: Move this to another API const bool is_rescaled = True(flags & ImageFlagBits::Rescaled); if (is_rescaled) { ScaleDown(true); } - - // Handle MSAA upload if necessary - if (info.num_samples > 1 && runtime->CanUploadMSAA()) { - // Only use MSAA copy pass for color formats - // Depth/stencil formats need special handling - if (aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT) { - // Create a temporary non-MSAA image to upload the data first - ImageInfo temp_info = info; - temp_info.num_samples = 1; - - // Create image with same usage flags as the target image to avoid validation errors - VkImageCreateInfo image_ci = MakeImageCreateInfo(runtime->device, temp_info); - image_ci.usage = original_image.UsageFlags(); - vk::Image temp_image = runtime->memory_allocator.CreateImage(image_ci); - - // Upload to the temporary non-MSAA image - scheduler->RequestOutsideRenderPassOperationContext(); - auto vk_copies = TransformBufferImageCopies(copies, offset, aspect_mask); - const VkBuffer src_buffer = buffer; - const VkImage temp_vk_image = *temp_image; - const VkImageAspectFlags vk_aspect_mask = aspect_mask; - scheduler->Record([src_buffer, temp_vk_image, vk_aspect_mask, vk_copies](vk::CommandBuffer cmdbuf) { - CopyBufferToImage(cmdbuf, src_buffer, temp_vk_image, vk_aspect_mask, false, vk_copies); - }); - - // Now use MSAACopyPass to convert from non-MSAA to MSAA - std::vector image_copies; - for (const auto& copy : copies) { - VideoCommon::ImageCopy image_copy; - image_copy.src_offset = {0, 0, 0}; // Use zero offset for source - image_copy.dst_offset = copy.image_offset; - image_copy.src_subresource = copy.image_subresource; - image_copy.dst_subresource = copy.image_subresource; - image_copy.extent = copy.image_extent; - image_copies.push_back(image_copy); - } - - // Create a wrapper Image for the temporary image - Image temp_wrapper(*runtime, temp_info, 0, 0); - temp_wrapper.original_image = std::move(temp_image); - temp_wrapper.current_image = &Image::original_image; - temp_wrapper.aspect_mask = aspect_mask; - temp_wrapper.initialized = true; - - // Use MSAACopyPass to convert from non-MSAA to MSAA - runtime->msaa_copy_pass->CopyImage(*this, temp_wrapper, image_copies, false); - std::exchange(initialized, true); - return; - } - // For depth/stencil formats, fall back to regular upload - } else { - // Regular non-MSAA upload - scheduler->RequestOutsideRenderPassOperationContext(); - auto vk_copies = TransformBufferImageCopies(copies, offset, aspect_mask); - const VkBuffer src_buffer = buffer; - const VkImage vk_image = *original_image; - const VkImageAspectFlags vk_aspect_mask = aspect_mask; - const bool is_initialized = std::exchange(initialized, true); - scheduler->Record([src_buffer, vk_image, vk_aspect_mask, is_initialized, - vk_copies](vk::CommandBuffer cmdbuf) { - CopyBufferToImage(cmdbuf, src_buffer, vk_image, vk_aspect_mask, is_initialized, vk_copies); - }); - } - + scheduler->RequestOutsideRenderPassOperationContext(); + auto vk_copies = TransformBufferImageCopies(copies, offset, aspect_mask); + const VkBuffer src_buffer = buffer; + const VkImage vk_image = *original_image; + const VkImageAspectFlags vk_aspect_mask = aspect_mask; + const bool is_initialized = std::exchange(initialized, true); + scheduler->Record([src_buffer, vk_image, vk_aspect_mask, is_initialized, + vk_copies](vk::CommandBuffer cmdbuf) { + CopyBufferToImage(cmdbuf, src_buffer, vk_image, vk_aspect_mask, is_initialized, vk_copies); + }); if (is_rescaled) { ScaleUp(); } @@ -1614,185 +1560,75 @@ void Image::DownloadMemory(VkBuffer buffer, size_t offset, } void Image::DownloadMemory(std::span buffers_span, std::span offsets_span, - std::span copies) { + std::span copies) { const bool is_rescaled = True(flags & ImageFlagBits::Rescaled); if (is_rescaled) { ScaleDown(); } - - // Handle MSAA download if necessary - if (info.num_samples > 1 && runtime->msaa_copy_pass) { - // Only use MSAA copy pass for color formats - // Depth/stencil formats need special handling - if (aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT) { - // Create a temporary non-MSAA image to download the data - ImageInfo temp_info = info; - temp_info.num_samples = 1; - - // Create image with same usage flags as the target image to avoid validation errors - VkImageCreateInfo image_ci = MakeImageCreateInfo(runtime->device, temp_info); - image_ci.usage = original_image.UsageFlags(); - vk::Image temp_image = runtime->memory_allocator.CreateImage(image_ci); - - // Create a wrapper Image for the temporary image - Image temp_wrapper(*runtime, temp_info, 0, 0); - temp_wrapper.original_image = std::move(temp_image); - temp_wrapper.current_image = &Image::original_image; - temp_wrapper.aspect_mask = aspect_mask; - temp_wrapper.initialized = true; - - // Convert from MSAA to non-MSAA using MSAACopyPass - std::vector image_copies; - for (const auto& copy : copies) { - VideoCommon::ImageCopy image_copy; - image_copy.src_offset = copy.image_offset; - image_copy.dst_offset = copy.image_offset; - image_copy.src_subresource = copy.image_subresource; - image_copy.dst_subresource = copy.image_subresource; - image_copy.extent = copy.image_extent; - image_copies.push_back(image_copy); - } - - // Use MSAACopyPass to convert from MSAA to non-MSAA - runtime->msaa_copy_pass->CopyImage(temp_wrapper, *this, image_copies, true); - - // Now download from the non-MSAA image - boost::container::small_vector buffers_vector{}; - boost::container::small_vector, 8> - vk_copies; - for (size_t index = 0; index < buffers_span.size(); index++) { - buffers_vector.emplace_back(buffers_span[index]); - vk_copies.emplace_back( - TransformBufferImageCopies(copies, offsets_span[index], aspect_mask)); - } - - scheduler->RequestOutsideRenderPassOperationContext(); - scheduler->Record([buffers = std::move(buffers_vector), image = *temp_wrapper.original_image, - aspect_mask_ = aspect_mask, vk_copies](vk::CommandBuffer cmdbuf) { - const VkImageMemoryBarrier read_barrier{ - .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, - .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, - .oldLayout = VK_IMAGE_LAYOUT_GENERAL, - .newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .image = image, - .subresourceRange{ - .aspectMask = aspect_mask_, - .baseMipLevel = 0, - .levelCount = VK_REMAINING_MIP_LEVELS, - .baseArrayLayer = 0, - .layerCount = VK_REMAINING_ARRAY_LAYERS, - }, - }; - cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, - 0, read_barrier); - - for (size_t index = 0; index < buffers.size(); index++) { - cmdbuf.CopyImageToBuffer(image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, buffers[index], - vk_copies[index]); - } - - const VkMemoryBarrier memory_write_barrier{ - .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, - .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, - }; - const VkImageMemoryBarrier image_write_barrier{ - .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = 0, - .dstAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, - .oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - .newLayout = VK_IMAGE_LAYOUT_GENERAL, - .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .image = image, - .subresourceRange{ - .aspectMask = aspect_mask_, - .baseMipLevel = 0, - .levelCount = VK_REMAINING_MIP_LEVELS, - .baseArrayLayer = 0, - .layerCount = VK_REMAINING_ARRAY_LAYERS, - }, - }; - cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - 0, memory_write_barrier, nullptr, image_write_barrier); - }); - return; - } - // For depth/stencil formats, fall back to regular download - } else { - // Regular non-MSAA download - boost::container::small_vector buffers_vector{}; - boost::container::small_vector, 8> - vk_copies; - for (size_t index = 0; index < buffers_span.size(); index++) { - buffers_vector.emplace_back(buffers_span[index]); - vk_copies.emplace_back( - TransformBufferImageCopies(copies, offsets_span[index], aspect_mask)); - } - scheduler->RequestOutsideRenderPassOperationContext(); - scheduler->Record([buffers = std::move(buffers_vector), image = *original_image, - aspect_mask_ = aspect_mask, vk_copies](vk::CommandBuffer cmdbuf) { - const VkImageMemoryBarrier read_barrier{ - .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, - .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, - .oldLayout = VK_IMAGE_LAYOUT_GENERAL, - .newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .image = image, - .subresourceRange{ - .aspectMask = aspect_mask_, - .baseMipLevel = 0, - .levelCount = VK_REMAINING_MIP_LEVELS, - .baseArrayLayer = 0, - .layerCount = VK_REMAINING_ARRAY_LAYERS, - }, - }; - cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, - 0, read_barrier); - - for (size_t index = 0; index < buffers.size(); index++) { - cmdbuf.CopyImageToBuffer(image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, buffers[index], - vk_copies[index]); - } - - const VkMemoryBarrier memory_write_barrier{ - .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, - .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, - }; - const VkImageMemoryBarrier image_write_barrier{ - .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, - .pNext = nullptr, - .srcAccessMask = 0, - .dstAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, - .oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, - .newLayout = VK_IMAGE_LAYOUT_GENERAL, - .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, - .image = image, - .subresourceRange{ - .aspectMask = aspect_mask_, - .baseMipLevel = 0, - .levelCount = VK_REMAINING_MIP_LEVELS, - .baseArrayLayer = 0, - .layerCount = VK_REMAINING_ARRAY_LAYERS, - }, - }; - cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, - 0, memory_write_barrier, nullptr, image_write_barrier); - }); + boost::container::small_vector buffers_vector{}; + boost::container::small_vector, 8> + vk_copies; + for (size_t index = 0; index < buffers_span.size(); index++) { + buffers_vector.emplace_back(buffers_span[index]); + vk_copies.emplace_back( + TransformBufferImageCopies(copies, offsets_span[index], aspect_mask)); } + scheduler->RequestOutsideRenderPassOperationContext(); + scheduler->Record([buffers = std::move(buffers_vector), image = *original_image, + aspect_mask_ = aspect_mask, vk_copies](vk::CommandBuffer cmdbuf) { + const VkImageMemoryBarrier read_barrier{ + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, + .dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT, + .oldLayout = VK_IMAGE_LAYOUT_GENERAL, + .newLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, + .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .image = image, + .subresourceRange{ + .aspectMask = aspect_mask_, + .baseMipLevel = 0, + .levelCount = VK_REMAINING_MIP_LEVELS, + .baseArrayLayer = 0, + .layerCount = VK_REMAINING_ARRAY_LAYERS, + }, + }; + cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, + 0, read_barrier); + for (size_t index = 0; index < buffers.size(); index++) { + cmdbuf.CopyImageToBuffer(image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, buffers[index], + vk_copies[index]); + } + + const VkMemoryBarrier memory_write_barrier{ + .sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, + .dstAccessMask = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, + }; + const VkImageMemoryBarrier image_write_barrier{ + .sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, + .pNext = nullptr, + .srcAccessMask = 0, + .dstAccessMask = VK_ACCESS_MEMORY_WRITE_BIT, + .oldLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, + .newLayout = VK_IMAGE_LAYOUT_GENERAL, + .srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED, + .image = image, + .subresourceRange{ + .aspectMask = aspect_mask_, + .baseMipLevel = 0, + .levelCount = VK_REMAINING_MIP_LEVELS, + .baseArrayLayer = 0, + .layerCount = VK_REMAINING_ARRAY_LAYERS, + }, + }; + cmdbuf.PipelineBarrier(VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, + 0, memory_write_barrier, nullptr, image_write_barrier); + }); if (is_rescaled) { ScaleUp(true); } diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index cd11cc8fc7..18d20b2db5 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -82,7 +82,8 @@ public: } bool CanUploadMSAA() const noexcept { - return msaa_copy_pass.operator bool(); + // TODO: Implement buffer to MSAA uploads + return false; } void AccelerateImageUpload(Image&, const StagingBufferRef&, From ed4b011cad9cce64cf1f2f4444883ed835a57ffd Mon Sep 17 00:00:00 2001 From: Aleksandr Popovich Date: Mon, 19 May 2025 21:28:16 +0000 Subject: [PATCH 17/26] fix more vulkan issues and remove vertex input (#117) Co-authored-by: swurl Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/117 Co-authored-by: Aleksandr Popovich Co-committed-by: Aleksandr Popovich --- .ci/linux/build.sh | 1 + .ci/linux/package.sh | 1 + .../java/org/yuzu/yuzu_emu/NativeLibrary.kt | 5 - .../features/settings/model/BooleanSetting.kt | 7 +- .../features/settings/model/IntSetting.kt | 1 - .../settings/model/view/SettingsItem.kt | 32 +-- .../settings/ui/SettingsFragmentPresenter.kt | 17 +- .../yuzu_emu/fragments/EmulationFragment.kt | 23 +- .../app/src/main/jni/android_settings.h | 172 ++++++------- src/android/app/src/main/jni/native.cpp | 17 -- src/android/app/src/main/jni/native.h | 4 +- .../app/src/main/res/values-ar/strings.xml | 2 - .../app/src/main/res/values-ckb/strings.xml | 2 - .../app/src/main/res/values-cs/strings.xml | 2 - .../app/src/main/res/values-de/strings.xml | 2 - .../app/src/main/res/values-es/strings.xml | 2 - .../app/src/main/res/values-fa/strings.xml | 2 - .../app/src/main/res/values-fr/strings.xml | 2 - .../app/src/main/res/values-he/strings.xml | 2 - .../app/src/main/res/values-hu/strings.xml | 2 - .../app/src/main/res/values-id/strings.xml | 2 - .../app/src/main/res/values-it/strings.xml | 2 - .../app/src/main/res/values-ja/strings.xml | 2 - .../app/src/main/res/values-ko/strings.xml | 2 - .../app/src/main/res/values-nb/strings.xml | 2 - .../app/src/main/res/values-pl/strings.xml | 2 - .../src/main/res/values-pt-rBR/strings.xml | 2 - .../src/main/res/values-pt-rPT/strings.xml | 2 - .../app/src/main/res/values-ru/strings.xml | 2 - .../app/src/main/res/values-uk/strings.xml | 2 - .../app/src/main/res/values-vi/strings.xml | 2 - .../src/main/res/values-zh-rCN/strings.xml | 2 - .../src/main/res/values-zh-rTW/strings.xml | 2 - .../app/src/main/res/values/arrays.xml | 12 - .../app/src/main/res/values/strings.xml | 20 +- src/common/settings.h | 10 +- src/core/hle/kernel/k_memory_layout.h | 2 +- .../renderer_vulkan/vk_graphics_pipeline.cpp | 6 +- .../renderer_vulkan/vk_pipeline_cache.cpp | 10 +- .../renderer_vulkan/vk_rasterizer.cpp | 61 ++--- .../renderer_vulkan/vk_rasterizer.h | 4 - .../vulkan_common/vulkan_device.cpp | 237 +++++++++--------- src/video_core/vulkan_common/vulkan_device.h | 82 +++--- .../configure_graphics_extensions.cpp | 5 +- src/yuzu/configuration/shared_translation.cpp | 14 +- 45 files changed, 285 insertions(+), 502 deletions(-) diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh index f030e9b748..c020cc7edd 100755 --- a/.ci/linux/build.sh +++ b/.ci/linux/build.sh @@ -60,6 +60,7 @@ cmake .. -G Ninja \ -DYUZU_USE_QT_MULTIMEDIA=OFF \ -DYUZU_USE_QT_WEB_ENGINE=OFF \ -DENABLE_QT_TRANSLATION=ON \ + -DUSE_DISCORD_PRESENCE=OFF \ -DYUZU_USE_FASTER_LD=OFF \ -DYUZU_ENABLE_LTO=ON \ -DCMAKE_LINKER=/usr/bin/mold \ diff --git a/.ci/linux/package.sh b/.ci/linux/package.sh index 5c556cd0e4..4d58b8f328 100755 --- a/.ci/linux/package.sh +++ b/.ci/linux/package.sh @@ -21,6 +21,7 @@ fi EDEN_TAG=$(git describe --tags --abbrev=0) echo "Making stable \"$EDEN_TAG\" build" +git checkout "$EDEN_TAG" VERSION="$(echo "$EDEN_TAG")" # NOW MAKE APPIMAGE diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt index 0be943eb86..1848ca9ef9 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt @@ -166,11 +166,6 @@ object NativeLibrary { */ external fun getPerfStats(): DoubleArray - /** - * Returns the number of shaders being built - */ - external fun getShadersBuilding(): Int - /** * Returns the current CPU backend. */ diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt index 3c8ce3504d..cc494467d1 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt @@ -20,7 +20,6 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting { RENDERER_FAST_GPU("use_fast_gpu_time"), RENDERER_REACTIVE_FLUSHING("use_reactive_flushing"), RENDERER_DEBUG("debug"), - RENDERER_VERTEX_INPUT("vertex_input"), RENDERER_PROVOKING_VERTEX("provoking_vertex"), RENDERER_DESCRIPTOR_INDEXING("descriptor_indexing"), PICTURE_IN_PICTURE("picture_in_picture"), @@ -41,14 +40,12 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting { SHOW_APP_RAM_USAGE("show_app_ram_usage"), SHOW_SYSTEM_RAM_USAGE("show_system_ram_usage"), SHOW_BAT_TEMPERATURE("show_bat_temperature"), - SHOW_SHADERS_BUILDING("show_shaders_building"), OVERLAY_BACKGROUND("overlay_background"), - DEBUG_FLUSH_BY_LINE("flush_lines"), - USE_LRU_CACHE("use_lru_cache"); - + USE_LRU_CACHE("use_lru_cache"),; external fun isFrameSkippingEnabled(): Boolean external fun isFrameInterpolationEnabled(): Boolean + override fun getBoolean(needsGlobal: Boolean): Boolean = NativeConfig.getBoolean(key, needsGlobal) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt index 3e1c43ca89..035a33a762 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt @@ -33,7 +33,6 @@ enum class IntSetting(override val key: String) : AbstractIntSetting { LOCK_DRAWER("lock_drawer"), VERTICAL_ALIGNMENT("vertical_alignment"), PERF_OVERLAY_POSITION("perf_overlay_position"), - MEMORY_LAYOUT("memory_layout_mode"), FSR_SHARPENING_SLIDER("fsr_sharpening_slider"); override fun getInt(needsGlobal: Boolean): Int = NativeConfig.getInt(key, needsGlobal) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt index 49e2a19474..dfc17bff08 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt @@ -136,14 +136,7 @@ abstract class SettingsItem( titleId = R.string.dyna_state, descriptionId = R.string.dyna_state_description, min = 0, - max = 3, - ) - ) - put( - SwitchSetting( - BooleanSetting.RENDERER_VERTEX_INPUT, - titleId = R.string.vertex_input, - descriptionId = R.string.vertex_input_description + max = 2, ) ) put( @@ -193,13 +186,6 @@ abstract class SettingsItem( descriptionId = R.string.picture_in_picture_description ) ) - put( - SwitchSetting( - BooleanSetting.DEBUG_FLUSH_BY_LINE, - titleId = R.string.flush_by_line, - descriptionId = R.string.flush_by_line_description - ) - ) val dockedModeSetting = object : AbstractBooleanSetting { override val key = BooleanSetting.USE_DOCKED_MODE.key @@ -245,15 +231,6 @@ abstract class SettingsItem( descriptionId = R.string.use_docked_mode_description ) ) - put( - SingleChoiceSetting( - IntSetting.MEMORY_LAYOUT, - titleId = R.string.memory_layout, - descriptionId = R.string.memory_layout_description, - choicesId = R.array.memoryNames, - valuesId = R.array.memoryValues - ) - ) put( SwitchSetting( BooleanSetting.CORE_SYNC_CORE_SPEED, @@ -413,13 +390,6 @@ abstract class SettingsItem( descriptionId = R.string.show_bat_temperature_description ) ) - put( - SwitchSetting( - BooleanSetting.SHOW_SHADERS_BUILDING, - R.string.show_shaders_building, - descriptionId = R.string.show_shaders_building_description - ) - ) put( SingleChoiceSetting( IntSetting.RENDERER_VSYNC, diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index 0d426f67f5..d91906d438 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -241,6 +241,17 @@ class SettingsFragmentPresenter( ) ) addEdenVeilSettings(sl) + + add(BooleanSetting.FRAME_INTERPOLATION.key) + add(BooleanSetting.FRAME_SKIPPING.key) + add(BooleanSetting.CORE_SYNC_CORE_SPEED.key) + add(IntSetting.RENDERER_SHADER_BACKEND.key) + add(IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT.key) + add(IntSetting.RENDERER_NVDEC_EMULATION.key) + add(IntSetting.RENDERER_ASTC_DECODE_METHOD.key) + add(IntSetting.RENDERER_ASTC_RECOMPRESSION.key) + add(IntSetting.RENDERER_VRAM_USAGE_MODE.key) + add(BooleanSetting.USE_LRU_CACHE.key) } } @@ -250,7 +261,6 @@ class SettingsFragmentPresenter( add(BooleanSetting.RENDERER_USE_SPEED_LIMIT.key) add(ShortSetting.RENDERER_SPEED_LIMIT.key) add(BooleanSetting.USE_DOCKED_MODE.key) - add(IntSetting.MEMORY_LAYOUT.key) add(IntSetting.REGION_INDEX.key) add(IntSetting.LANGUAGE_INDEX.key) add(BooleanSetting.USE_CUSTOM_RTC.key) @@ -291,7 +301,6 @@ class SettingsFragmentPresenter( add(BooleanSetting.SHOW_APP_RAM_USAGE.key) add(BooleanSetting.SHOW_SYSTEM_RAM_USAGE.key) add(BooleanSetting.SHOW_BAT_TEMPERATURE.key) - add(BooleanSetting.SHOW_SHADERS_BUILDING.key) } } @@ -457,7 +466,6 @@ class SettingsFragmentPresenter( add(ByteSetting.RENDERER_DYNA_STATE.key) - add(BooleanSetting.RENDERER_VERTEX_INPUT.key) add(BooleanSetting.RENDERER_PROVOKING_VERTEX.key) add(BooleanSetting.RENDERER_DESCRIPTOR_INDEXING.key) @@ -1134,9 +1142,6 @@ class SettingsFragmentPresenter( add(BooleanSetting.USE_AUTO_STUB.key) add(BooleanSetting.CPU_DEBUG_MODE.key) add(SettingsItem.FASTMEM_COMBINED) - - add(HeaderSetting(R.string.log)) - add(BooleanSetting.DEBUG_FLUSH_BY_LINE.key) } } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index 8fc473410a..ddf3cb1fe1 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -64,7 +64,6 @@ import org.yuzu.yuzu_emu.features.settings.model.IntSetting import org.yuzu.yuzu_emu.features.settings.model.Settings import org.yuzu.yuzu_emu.features.settings.model.Settings.EmulationOrientation import org.yuzu.yuzu_emu.features.settings.model.Settings.EmulationVerticalAlignment -import org.yuzu.yuzu_emu.features.settings.model.ShortSetting import org.yuzu.yuzu_emu.features.settings.utils.SettingsFile import org.yuzu.yuzu_emu.model.DriverViewModel import org.yuzu.yuzu_emu.model.EmulationViewModel @@ -400,7 +399,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { emulationState.updateSurface() // Setup overlays - updateShowStatsOverlay() + updateshowStatsOvelray() // Re update binding when the specs values get initialized properly binding.inGameMenu.getHeaderView(0).apply { @@ -533,7 +532,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } } @SuppressLint("DefaultLocale") - private fun updateShowStatsOverlay() { + private fun updateshowStatsOvelray() { val showOverlay = BooleanSetting.SHOW_PERFORMANCE_OVERLAY.getBoolean() binding.showStatsOverlayText.apply { setTextColor( @@ -588,12 +587,10 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { if (BooleanSetting.SHOW_SPEED.getBoolean(NativeConfig.isPerGameConfigLoaded())) { if (sb.isNotEmpty()) sb.append(" | ") - // TODO(alekpop): this is broken on android only. it uses the clock timer but it should not. sb.append( String.format( - "Speed: %d%% / %d%%", - (perfStats[SPEED] * 100.0 + 0.5).toInt(), - ShortSetting.RENDERER_SPEED_LIMIT.getShort(NativeConfig.isPerGameConfigLoaded()) + "Speed: %d%%", + (perfStats[SPEED] * 100.0 + 0.5).toInt() ) ) } @@ -622,16 +619,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { sb.append(String.format("%.1f°C/%.1f°F", batteryTemp, tempF)) } - val shadersBuilding = NativeLibrary.getShadersBuilding() - - if (BooleanSetting.SHOW_SHADERS_BUILDING.getBoolean(NativeConfig.isPerGameConfigLoaded()) && shadersBuilding != 0) { - if (sb.isNotEmpty()) sb.append(" | ") - - val prefix = getString(R.string.shaders_prefix) - val suffix = getString(R.string.shaders_suffix) - sb.append(String.format("$prefix %d $suffix", shadersBuilding)) - } - if (BooleanSetting.OVERLAY_BACKGROUND.getBoolean(NativeConfig.isPerGameConfigLoaded())) { binding.showStatsOverlayText.setBackgroundResource(R.color.yuzu_transparent_black) } else { @@ -862,7 +849,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { R.id.menu_show_stats_overlay -> { it.isChecked = !it.isChecked BooleanSetting.SHOW_PERFORMANCE_OVERLAY.setBoolean(it.isChecked) - updateShowStatsOverlay() + updateshowStatsOvelray() true } R.id.menu_edit_overlay -> { diff --git a/src/android/app/src/main/jni/android_settings.h b/src/android/app/src/main/jni/android_settings.h index 9a71822c6a..ff569d1981 100644 --- a/src/android/app/src/main/jni/android_settings.h +++ b/src/android/app/src/main/jni/android_settings.h @@ -9,116 +9,90 @@ namespace AndroidSettings { - struct GameDir { - std::string path; - bool deep_scan = false; - }; +struct GameDir { + std::string path; + bool deep_scan = false; +}; - struct OverlayControlData { - std::string id; - bool enabled; - std::pair landscape_position; - std::pair portrait_position; - std::pair foldable_position; - }; +struct OverlayControlData { + std::string id; + bool enabled; + std::pair landscape_position; + std::pair portrait_position; + std::pair foldable_position; +}; - struct Values { - Settings::Linkage linkage; +struct Values { + Settings::Linkage linkage; - // Path settings - std::vector game_dirs; + // Path settings + std::vector game_dirs; - // Android - Settings::Setting picture_in_picture{linkage, false, "picture_in_picture", - Settings::Category::Android}; - Settings::Setting screen_layout{linkage, - 5, - "screen_layout", - Settings::Category::Android, - Settings::Specialization::Default, - true, - true}; - Settings::Setting vertical_alignment{linkage, - 0, - "vertical_alignment", - Settings::Category::Android, - Settings::Specialization::Default, - true, - true}; + // Android + Settings::Setting picture_in_picture{linkage, false, "picture_in_picture", + Settings::Category::Android}; + Settings::Setting screen_layout{linkage, + 5, + "screen_layout", + Settings::Category::Android, + Settings::Specialization::Default, + true, + true}; + Settings::Setting vertical_alignment{linkage, + 0, + "vertical_alignment", + Settings::Category::Android, + Settings::Specialization::Default, + true, + true}; - Settings::SwitchableSetting driver_path{linkage, "", "driver_path", - Settings::Category::GpuDriver}; + Settings::SwitchableSetting driver_path{linkage, "", "driver_path", + Settings::Category::GpuDriver}; - // LRU Cache - Settings::SwitchableSetting use_lru_cache{linkage, true, "use_lru_cache", - Settings::Category::System}; + // LRU Cache + Settings::SwitchableSetting use_lru_cache{linkage, true, "use_lru_cache", + Settings::Category::System}; - Settings::Setting theme{linkage, 0, "theme", Settings::Category::Android}; - Settings::Setting theme_mode{linkage, -1, "theme_mode", Settings::Category::Android}; - Settings::Setting black_backgrounds{linkage, false, "black_backgrounds", - Settings::Category::Android}; + Settings::Setting theme{linkage, 0, "theme", Settings::Category::Android}; + Settings::Setting theme_mode{linkage, -1, "theme_mode", Settings::Category::Android}; + Settings::Setting black_backgrounds{linkage, false, "black_backgrounds", + Settings::Category::Android}; - // Input/performance overlay settings - std::vector overlay_control_data; - Settings::Setting overlay_scale{linkage, 50, "control_scale", - Settings::Category::Overlay}; - Settings::Setting overlay_opacity{linkage, 100, "control_opacity", - Settings::Category::Overlay}; - - Settings::Setting joystick_rel_center{linkage, true, "joystick_rel_center", - Settings::Category::Overlay}; - Settings::Setting dpad_slide{linkage, true, "dpad_slide", + // Input/performance overlay settings + std::vector overlay_control_data; + Settings::Setting overlay_scale{linkage, 50, "control_scale", Settings::Category::Overlay}; + Settings::Setting overlay_opacity{linkage, 100, "control_opacity", Settings::Category::Overlay}; - Settings::Setting haptic_feedback{linkage, true, "haptic_feedback", + + Settings::Setting joystick_rel_center{linkage, true, "joystick_rel_center", Settings::Category::Overlay}; - Settings::Setting show_performance_overlay{linkage, true, "show_performance_overlay", - Settings::Category::Overlay, - Settings::Specialization::Paired, true, - true}; - Settings::Setting overlay_background{linkage, false, "overlay_background", - Settings::Category::Overlay, - Settings::Specialization::Default, true, true, - &show_performance_overlay}; - Settings::Setting perf_overlay_position{linkage, 0, "perf_overlay_position", - Settings::Category::Overlay, - Settings::Specialization::Default, true, true, - &show_performance_overlay}; - Settings::Setting show_fps{linkage, true, "show_fps", - Settings::Category::Overlay, - Settings::Specialization::Default, true, true, - &show_performance_overlay}; - Settings::Setting show_frame_time{linkage, false, "show_frame_time", - Settings::Category::Overlay, - Settings::Specialization::Default, true, true, - &show_performance_overlay}; - Settings::Setting show_speed{linkage, true, "show_speed", - Settings::Category::Overlay, - Settings::Specialization::Default, true, true, - &show_performance_overlay}; - Settings::Setting show_app_ram_usage{linkage, false, "show_app_ram_usage", - Settings::Category::Overlay, - Settings::Specialization::Default, true, true, - &show_performance_overlay}; - Settings::Setting show_system_ram_usage{linkage, false, "show_system_ram_usage", - Settings::Category::Overlay, - Settings::Specialization::Default, true, true, - &show_performance_overlay}; - Settings::Setting show_bat_temperature{linkage, false, "show_bat_temperature", - Settings::Category::Overlay, - Settings::Specialization::Default, true, true, - &show_performance_overlay}; - Settings::Setting show_shaders_building{linkage, true, "show_shaders_building", - Settings::Category::Overlay, - Settings::Specialization::Default, true, true, - &show_performance_overlay}; - Settings::Setting show_input_overlay{linkage, true, "show_input_overlay", - Settings::Category::Overlay}; - Settings::Setting touchscreen{linkage, true, "touchscreen", + Settings::Setting dpad_slide{linkage, true, "dpad_slide", Settings::Category::Overlay}; + Settings::Setting haptic_feedback{linkage, true, "haptic_feedback", Settings::Category::Overlay}; - Settings::Setting lock_drawer{linkage, false, "lock_drawer", - Settings::Category::Overlay}; - }; + Settings::Setting show_performance_overlay{linkage, true, "show_performance_overlay", + Settings::Category::Overlay, Settings::Specialization::Paired, true , true}; + Settings::Setting overlay_background{linkage, false, "overlay_background", + Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; + Settings::Setting perf_overlay_position{linkage, 0, "perf_overlay_position", + Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; + Settings::Setting show_fps{linkage, true, "show_fps", + Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; + Settings::Setting show_frame_time{linkage, false, "show_frame_time", + Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; + Settings::Setting show_speed{linkage, true, "show_speed", + Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; + Settings::Setting show_app_ram_usage{linkage, false, "show_app_ram_usage", + Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; + Settings::Setting show_system_ram_usage{linkage, false, "show_system_ram_usage", + Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; + Settings::Setting show_bat_temperature{linkage, false, "show_bat_temperature", + Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; + Settings::Setting show_input_overlay{linkage, true, "show_input_overlay", + Settings::Category::Overlay}; + Settings::Setting touchscreen{linkage, true, "touchscreen", Settings::Category::Overlay}; + Settings::Setting lock_drawer{linkage, false, "lock_drawer", Settings::Category::Overlay}; +}; - extern Values values; +extern Values values; } // namespace AndroidSettings diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 962fae126c..6dac1ef84e 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -67,7 +67,6 @@ #include "video_core/renderer_vulkan/renderer_vulkan.h" #include "video_core/vulkan_common/vulkan_instance.h" #include "video_core/vulkan_common/vulkan_surface.h" -#include "video_core/shader_notify.h" #define jconst [[maybe_unused]] const auto #define jauto [[maybe_unused]] auto @@ -159,12 +158,6 @@ const Core::PerfStatsResults& EmulationSession::PerfStats() { return m_perf_stats; } -int EmulationSession::ShadersBuilding() { - auto& shader_notify = m_system.GPU().ShaderNotify(); - m_shaders_building = shader_notify.ShadersBuilding(); - return m_shaders_building; -} - void EmulationSession::SurfaceChanged() { if (!IsRunning()) { return; @@ -617,16 +610,6 @@ jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats(JNIEnv* env, jcl return j_stats; } -jint Java_org_yuzu_yuzu_1emu_NativeLibrary_getShadersBuilding(JNIEnv* env, jclass clazz) { - jint j_shaders = 0; - - if (EmulationSession::GetInstance().IsRunning()) { - j_shaders = EmulationSession::GetInstance().ShadersBuilding(); - } - - return j_shaders; -} - jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCpuBackend(JNIEnv* env, jclass clazz) { if (Settings::IsNceEnabled()) { return Common::Android::ToJString(env, "NCE"); diff --git a/src/android/app/src/main/jni/native.h b/src/android/app/src/main/jni/native.h index 4cc838ee5a..6a4551ada2 100644 --- a/src/android/app/src/main/jni/native.h +++ b/src/android/app/src/main/jni/native.h @@ -44,7 +44,6 @@ public: void ShutdownEmulation(); const Core::PerfStatsResults& PerfStats(); - int ShadersBuilding(); void ConfigureFilesystemProvider(const std::string& filepath); void InitializeSystem(bool reload); void SetAppletId(int applet_id); @@ -73,7 +72,6 @@ private: InputCommon::InputSubsystem m_input_subsystem; Common::DetachedTasks m_detached_tasks; Core::PerfStatsResults m_perf_stats{}; - int m_shaders_building{0}; std::shared_ptr m_vfs; Core::SystemResultStatus m_load_result{Core::SystemResultStatus::ErrorNotInitialized}; std::atomic m_is_running = false; @@ -91,4 +89,4 @@ private: // Program index for next boot std::atomic m_next_program_index = -1; -}; \ No newline at end of file +}; diff --git a/src/android/app/src/main/res/values-ar/strings.xml b/src/android/app/src/main/res/values-ar/strings.xml index 6ffcc1ff9e..1ed93d123c 100644 --- a/src/android/app/src/main/res/values-ar/strings.xml +++ b/src/android/app/src/main/res/values-ar/strings.xml @@ -49,8 +49,6 @@ تمكين أو تعطيل ذاكرة التخزين المؤقت الأقل استخدامًا (LRU)، مما يزيد الأداء عن طريق توفير استخدام وحدة المعالجة المركزية. بعض الألعاب بها مشاكل معها، خاصة TotK 1.2.1، لذا قم بتعطيلها إذا لم يتم تشغيل اللعبة أو تعطلت بشكل عشوائي. الحالة الديناميكية الممتدة يُمكّن ميزات فولكان لتحسين الأداء، التقديم، وتوفير الموارد أثناء إنشاء خطوط المعالجة مع الحفاظ على استهلاك أقل لوحدة المعالجة المركزية/وحدة معالجة الرسومات. قد تزيد هذه الامتدادات من درجة حرارة الجهاز، وقد لا تتفاعل وحدات معالجة الرسومات القديمة من سلسلة A6XX بشكل صحيح. اضبط على 0 لاستخدام تنسيقات Yuzu المحاكاة. - VertexInputDynamicState - يحسن الأداء على الأجهزة الأحدث. مدعوم فقط على وحدات معالجة الرسومات التي تدعم فولكان 1.3+. مزامنة سرعة النواة مزامنة سرعة النواة مع النسبة القصوى للسرعة لتحسين الأداء دون تغيير السرعة الفعلية للعبة. استخدام الستاب التلقائي diff --git a/src/android/app/src/main/res/values-ckb/strings.xml b/src/android/app/src/main/res/values-ckb/strings.xml index 00b282081d..89cbd511aa 100644 --- a/src/android/app/src/main/res/values-ckb/strings.xml +++ b/src/android/app/src/main/res/values-ckb/strings.xml @@ -50,8 +50,6 @@ چالاک یان ناچالاککردنی کاشەی LRU (کەمترین بەکارهێنراوی دوایی)، کارایی زیاد دەکات بە هەڵگرتنی بەکارهێنانی CPU. هەندێک یاری کێشەییان هەیە لەگەڵیدا، بەتایبەتی TotK 1.2.1، بۆیە ئەگەر یاریەکە نەکەوتەوە یان بە هەڕەمەکی داخرا، ناچالاکی بکە. الحالة الديناميكية الممتدة يُمكّن ميزات فولكان لتحسين الأداء، التقديم، وتوفير الموارد أثناء إنشاء خطوط المعالجة مع الحفاظ على استهلاك أقل لوحدة المعالجة المركزية/وحدة معالجة الرسومات. قد تزيد هذه الامتدادات من درجة حرارة الجهاز، وقد لا تتفاعل وحدات معالجة الرسومات القديمة من سلسلة A6XX بشكل صحيح. اضبط على 0 لاستخدام تنسيقات Yuzu المحاكاة. - VertexInputDynamicState - يحسن الأداء على الأجهزة الأحدث. مدعوم فقط على وحدات معالجة الرسومات التي تدعم فولكان 1.3+. مزامنة سرعة النواة خێرایی تیکەکانی ناوک ڕێکبخە لەگەڵ ڕێژەی خێرایی بەرزترین بۆ باشترکردنی کارایی بەبێ گۆڕینی خێرایی ڕاستەقینەی یارییەکە. استخدام الستاب التلقائي diff --git a/src/android/app/src/main/res/values-cs/strings.xml b/src/android/app/src/main/res/values-cs/strings.xml index 95fcc9f75c..4f43357a6f 100644 --- a/src/android/app/src/main/res/values-cs/strings.xml +++ b/src/android/app/src/main/res/values-cs/strings.xml @@ -49,8 +49,6 @@ Povolte nebo zakažte mezipaměť LRU (Least Recently Used), což zvýší výkon snížením zatížení CPU. Některé hry s ní mají problémy, zejména TotK 1.2.1, proto ji deaktivujte, pokud hra nespustí nebo náhodně padá. Rozšířený dynamický stav Umožňuje funkce Vulkan pro lepší výkon, vykreslování a úsporu zdrojů při vytváření grafických pipeline při zachování nižšího využití CPU/GPU. Tato rozšíření mohou zvýšit teplotu zařízení a starší GPU řady A6XX nemusí reagovat správně. Nastavte na 0 pro použití emulovaných formátů Yuzu. - VertexInputDynamicState - Zlepšuje výkon na novějších zařízeních. Podporováno pouze na GPU s Vulkan 1.3+. Synchronizovat rychlost jádra Synchronizuje rychlost jádra s maximálním procentem rychlosti, aby se zlepšil výkon bez změny skutečné rychlosti hry. Použít automatický stub diff --git a/src/android/app/src/main/res/values-de/strings.xml b/src/android/app/src/main/res/values-de/strings.xml index d444c5ca88..d2a1f89730 100644 --- a/src/android/app/src/main/res/values-de/strings.xml +++ b/src/android/app/src/main/res/values-de/strings.xml @@ -50,8 +50,6 @@ Aktivieren oder deaktivieren Sie den LRU-Cache (Least Recently Used), um die Leistung durch Reduzierung der CPU-Auslastung zu verbessern. Einige Spiele haben Probleme damit, insbesondere TotK 1.2.1, deaktivieren Sie ihn also, wenn das Spiel nicht startet oder zufällig abstürzt. Erweiterter dynamischer Status Aktiviert Vulkan-Funktionen zur Verbesserung der Leistung, des Renderings und zur Ressourceneinsparung bei der Pipeline-Erstellung, während die CPU/GPU-Auslastung niedrig bleibt. Diese Erweiterungen können die Gerätetemperatur erhöhen, und ältere GPUs der A6XX-Serie reagieren möglicherweise nicht korrekt. Auf 0 setzen, um emulierte Yuzu-Formate zu verwenden. - VertexInputDynamicState - Verbessert die Leistung auf neueren Geräten. Wird nur von GPUs mit Vulkan 1.3+ unterstützt. Kern-Geschwindigkeit synchronisieren Synchronisiert die Taktrate des Kerns mit der maximalen Geschwindigkeit, um die Leistung zu verbessern, ohne die tatsächliche Spielgeschwindigkeit zu verändern. Auto-Stub verwenden diff --git a/src/android/app/src/main/res/values-es/strings.xml b/src/android/app/src/main/res/values-es/strings.xml index fb819a2401..0eb5932de2 100644 --- a/src/android/app/src/main/res/values-es/strings.xml +++ b/src/android/app/src/main/res/values-es/strings.xml @@ -50,8 +50,6 @@ Activa o desactiva la caché LRU (menos usados recientemente), aumentando el rendimiento al ahorrar uso de CPU. Algunos juegos tienen problemas con ella, especialmente TotK 1.2.1, así que desactívala si el juego no arranca o se cierra aleatoriamente. Estado dinámico extendido Habilita funciones Vulkan para mejorar rendimiento, renderizado y ahorrar recursos en creación de pipelines manteniendo bajo uso de CPU/GPU. Estas extensiones pueden aumentar la temperatura del dispositivo y GPUs antiguas de serie A6XX podrían no responder correctamente. Establecer en 0 para usar formatos emulados de Yuzu. - VertexInputDynamicState - Mejora el rendimiento en dispositivos nuevos. Solo compatible con GPUs Vulkan 1.3+. Sincronizar velocidad del núcleo Sincroniza la velocidad del núcleo con el porcentaje máximo de velocidad para mejorar el rendimiento sin alterar la velocidad real del juego. Usar Auto Stub diff --git a/src/android/app/src/main/res/values-fa/strings.xml b/src/android/app/src/main/res/values-fa/strings.xml index c39f102d77..758fa4995d 100644 --- a/src/android/app/src/main/res/values-fa/strings.xml +++ b/src/android/app/src/main/res/values-fa/strings.xml @@ -50,8 +50,6 @@ فعال یا غیرفعال کردن کش LRU (کمترین اخیراً استفاده شده)، که با کاهش استفاده از CPU عملکرد را افزایش می‌دهد. برخی بازی‌ها با آن مشکل دارند، به ویژه TotK 1.2.1، بنابراین اگر بازی اجرا نشد یا به صورت تصادفی کرش کرد، آن را غیرفعال کنید. حالت پویای گسترده قابلیت‌های ولکان را برای بهبود عملکرد، رندرینگ و صرفه‌جویی در منابع هنگام ایجاد خط لوله فعال می‌کند در حالی که مصرف CPU/GPU پایین حفظ می‌شود. این افزونه‌ها ممکن است دمای دستگاه را افزایش دهند و کارت‌های گرافیک سری قدیمی A6XX ممکن است واکنش مناسبی نشان ندهند. برای استفاده از فرمت‌های شبیه‌سازی شده یوزو روی 0 تنظیم کنید - حالت پویای ورودی رأس - عملکرد را در دستگاه‌های جدیدتر بهبود می‌بخشد. فقط در کارت‌های گرافیک با پشتیبانی از ولکان 1.3+ قابل استفاده است همگام‌سازی سرعت هسته همگام‌سازی سرعت هسته با حداکثر درصد سرعت برای بهبود عملکرد بدون تغییر سرعت واقعی بازی. استفاده از استاب خودکار diff --git a/src/android/app/src/main/res/values-fr/strings.xml b/src/android/app/src/main/res/values-fr/strings.xml index 07b9b92e8d..9e2069cd97 100644 --- a/src/android/app/src/main/res/values-fr/strings.xml +++ b/src/android/app/src/main/res/values-fr/strings.xml @@ -50,8 +50,6 @@ Activez ou désactivez le cache LRU (Least Recently Used), ce qui améliore les performances en réduisant l\'utilisation du CPU. Certains jeux ont des problèmes avec, notamment TotK 1.2.1, désactivez-le donc si le jeu ne démarre pas ou plante aléatoirement. État dynamique étendu Active les fonctionnalités Vulkan pour améliorer les performances, le rendu et économiser les ressources lors de la création de pipelines tout en maintenant une faible utilisation CPU/GPU. Ces extensions peuvent augmenter la température de l`appareil, et les GPU plus anciens de la série A6XX peuvent ne pas réagir correctement. Réglez sur 0 pour utiliser les formats émulés de Yuzu. - VertexInputDynamicState - Améliore les performances sur les appareils récents. Pris en charge uniquement par les GPU Vulkan 1.3+. Synchroniser la vitesse du cœur Synchronise la vitesse du cœur avec le pourcentage de vitesse maximal pour améliorer les performances sans modifier la vitesse réelle du jeu. Utiliser le stub automatique diff --git a/src/android/app/src/main/res/values-he/strings.xml b/src/android/app/src/main/res/values-he/strings.xml index 3cd91dea59..e712e9d267 100644 --- a/src/android/app/src/main/res/values-he/strings.xml +++ b/src/android/app/src/main/res/values-he/strings.xml @@ -50,8 +50,6 @@ הפעל או השבת את מטמון LRU (Least Recently Used), המשפר ביצועים על ידי חיסכון בשימוש במעבד. חלק מהמשחקים נתקלים בבעיות עם זה, במיוחד TotK 1.2.1, אז השבת אם המשחק לא נטען או קורס אקראית. מצב דינמי מורחב מאפשר תכונות Vulkan לשיפור ביצועים, רינדור וחיסכון במשאבים תוך שמירה על שימוש נמוך ב-CPU/GPU. הרחבות אלו עשויות להעלות את טמפ` המכשיר, וכרטיסי מסך מסדרת A6XX הישנים יותר עשויים לא להגיב כראוי. הגדר ל-0 כדי להשתמש בפורמטים המדומים של Yuzu. - VertexInputDynamicState - משפר ביצועים במכשירים חדשים יותר. נתמך רק בכרטיסי מסך עם Vulkan 1.3+. סנכרון מהירות ליבה סנכרן את מהירות הליבה לאחוז המהירות המרבי כדי לשפר ביצועים מבלי לשנות את מהירות המשחק בפועל. שימוש ב-Auto Stub diff --git a/src/android/app/src/main/res/values-hu/strings.xml b/src/android/app/src/main/res/values-hu/strings.xml index 902d6ed647..8c028fb8a8 100644 --- a/src/android/app/src/main/res/values-hu/strings.xml +++ b/src/android/app/src/main/res/values-hu/strings.xml @@ -50,8 +50,6 @@ Engedélyezze vagy tiltsa le az LRU gyorsítótárat (Least Recently Used), amely a CPU használatának csökkentésével növeli a teljesítményt. Néhány játékkal problémák adódhatnak, különösen a TotK 1.2.1 esetében, ezért tiltsa le, ha a játék nem indul el vagy véletlenszerűen összeomlik. Kiterjesztett Dinamikus Állapot Engedélyezi a Vulkan funkciókat a teljesítmény, a renderelés javításához és erőforrások megtakarításához a pipeline létrehozásánál, miközben alacsony CPU/GPU használatot tart fenn. Ezek a kiterjesztések növelhetik az eszköz hőmérsékletét, és a régebbi A6XX sorozatú GPU-k nem feltétlenül reagálnak megfelelően. Állítsa 0-ra a Yuzu által emulált formátumok használatához. - VertexInputDynamicState - Javítja a teljesítményt újabb eszközökön. Csak Vulkan 1.3+ GPU-kon támogatott. Magsebesség szinkronizálása A mag sebességének szinkronizálása a maximális sebesség százalékával a teljesítmény javítása érdekében a játék tényleges sebességének megváltoztatása nélkül. Automatikus Stub használata diff --git a/src/android/app/src/main/res/values-id/strings.xml b/src/android/app/src/main/res/values-id/strings.xml index 7741089115..ee5c8db04e 100644 --- a/src/android/app/src/main/res/values-id/strings.xml +++ b/src/android/app/src/main/res/values-id/strings.xml @@ -50,8 +50,6 @@ Aktifkan atau nonaktifkan cache LRU (Least Recently Used), meningkatkan performa dengan menghemat penggunaan CPU. Beberapa game memiliki masalah dengannya, terutama TotK 1.2.1, jadi nonaktifkan jika game tidak mau boot atau sering crash. Status Dinamis Ekstensi Mengaktifkan fitur Vulkan untuk meningkatkan performa, rendering, dan menghemat sumber daya saat pembuatan pipeline sambil mempertahankan penggunaan CPU/GPU yang rendah. Ekstensi ini dapat meningkatkan suhu perangkat, dan GPU seri A6XX lama mungkin tidak merespons dengan benar. Setel ke 0 untuk menggunakan format emulasi Yuzu. - VertexInputDynamicState - Meningkatkan performa di perangkat baru. Hanya didukung di GPU Vulkan 1.3+. Sinkronisasi Kecepatan Inti Sinkronkan kecepatan inti dengan persentase kecepatan maksimum untuk meningkatkan performa tanpa mengubah kecepatan sebenarnya dari permainan. Gunakan Auto Stub diff --git a/src/android/app/src/main/res/values-it/strings.xml b/src/android/app/src/main/res/values-it/strings.xml index 654b27a812..3ed465d956 100644 --- a/src/android/app/src/main/res/values-it/strings.xml +++ b/src/android/app/src/main/res/values-it/strings.xml @@ -50,8 +50,6 @@ Abilita o disabilita la cache LRU (Least Recently Used), aumentando le prestazioni risparmiando l\'utilizzo della CPU. Alcuni giochi hanno problemi con essa, in particolare TotK 1.2.1, quindi disabilitala se il gioco non si avvia o si blocca casualmente. Stato dinamico esteso Abilita funzionalità Vulkan per migliorare prestazioni, rendering e risparmiare risorse durante la creazione della pipeline mantenendo un basso utilizzo di CPU/GPU. Queste estensioni possono aumentare la temperatura del dispositivo e le GPU più vecchie della serie A6XX potrebbero non rispondere correttamente. Imposta su 0 per usare i formati emulati da Yuzu. - VertexInputDynamicState - Migliora le prestazioni sui dispositivi più recenti. Supportato solo su GPU Vulkan 1.3+. Sincronizza velocità core Sincronizza la velocità del core con la percentuale massima di velocità per migliorare le prestazioni senza alterare la velocità effettiva del gioco. Usa Auto Stub diff --git a/src/android/app/src/main/res/values-ja/strings.xml b/src/android/app/src/main/res/values-ja/strings.xml index e2d2985a66..6ce448998d 100644 --- a/src/android/app/src/main/res/values-ja/strings.xml +++ b/src/android/app/src/main/res/values-ja/strings.xml @@ -50,8 +50,6 @@ LRUキャッシュ(最近最も使われていない)を有効または無効にし、CPU使用率を節約してパフォーマンスを向上させます。一部のゲーム(特にTotK 1.2.1)で問題が発生する可能性があるため、ゲームが起動しないかランダムにクラッシュする場合は無効にしてください。 拡張ダイナミックステート Vulkan機能を有効にしてパフォーマンスとレンダリングを向上させ、パイプライン作成時のリソースを節約しながらCPU/GPU使用率を低く保ちます。これらの拡張機能はデバイスの温度を上昇させる可能性があり、古いA6XXシリーズのGPUでは正しく反応しない場合があります。Yuzuのエミュレート形式を使用するには0に設定します。 - 頂点入力動的状態 - 新しいデバイスでパフォーマンスを向上させます。Vulkan 1.3+ GPUでのみサポートされています。 コア速度の同期 コアの速度を最大速度パーセンテージに同期させ、ゲームの実際の速度を変えずにパフォーマンスを向上させます。 自動スタブを使用 diff --git a/src/android/app/src/main/res/values-ko/strings.xml b/src/android/app/src/main/res/values-ko/strings.xml index 5dbb6d883e..8f232711f6 100644 --- a/src/android/app/src/main/res/values-ko/strings.xml +++ b/src/android/app/src/main/res/values-ko/strings.xml @@ -50,8 +50,6 @@ LRU 캐시(최근 사용되지 않은 항목)를 활성화 또는 비활성화하여 CPU 사용량을 절약하고 성능을 향상시킵니다. 일부 게임(특히 TotK 1.2.1)에서 문제가 발생할 수 있으므로 게임이 부팅되지 않거나 무작위로 충돌하는 경우 비활성화하세요. 확장 동적 상태 Vulkan 기능을 활성화하여 파이프라인 생성 시 성능, 렌더링을 개선하고 리소스를 절약하면서 CPU/GPU 사용량을 낮게 유지합니다. 이러한 확장 기능은 장치 온도를 높일 수 있으며, 이전 A6XX 라인의 GPU는 제대로 반응하지 않을 수 있습니다. Yuzu 에뮬레이션 형식을 사용하려면 0으로 설정하세요. - 정점 입력 동적 상태 - 최신 기기에서 성능을 향상시킵니다. Vulkan 1.3+ GPU에서만 지원됩니다. 코어 속도 동기화 코어 틱 속도를 최대 속도 백분율과 동기화하여 게임의 실제 속도를 변경하지 않고 성능을 향상시킵니다. 자동 스텁 사용 diff --git a/src/android/app/src/main/res/values-nb/strings.xml b/src/android/app/src/main/res/values-nb/strings.xml index 1a5b5ccefc..b3864defcd 100644 --- a/src/android/app/src/main/res/values-nb/strings.xml +++ b/src/android/app/src/main/res/values-nb/strings.xml @@ -50,8 +50,6 @@ Aktiver eller deaktiver LRU-mellomlager (Least Recently Used), som forbedrer ytelsen ved å spare CPU-bruk. Noen spill har problemer med dette, spesielt TotK 1.2.1, så deaktiver hvis spillet ikke starter eller krasjer tilfeldig. Utvidet dynamisk tilstand Aktiverer Vulkan-funksjoner for å forbedre ytelse, rendering og spare ressurser ved pipeline-opprettelse samtidig som CPU/GPU-bruken holdes lav. Disse utvidelsene kan øke enhetstemperaturen, og eldre A6XX-serien GPU-er kan reagere unormalt. Sett til 0 for å bruke Yuzus emulerte formater. - VertexInputDynamicState - Forbedrer ytelsen på nyere enheter. Støttes kun på Vulkan 1.3+ GPU-er. Synkroniser kjernespeed Synkroniser kjernens hastighet med maksimal hastighetsprosent for å forbedre ytelsen uten å endre spillets faktiske hastighet. Bruk Auto Stub diff --git a/src/android/app/src/main/res/values-pl/strings.xml b/src/android/app/src/main/res/values-pl/strings.xml index 04a71eb8f1..934ee8d54d 100644 --- a/src/android/app/src/main/res/values-pl/strings.xml +++ b/src/android/app/src/main/res/values-pl/strings.xml @@ -50,8 +50,6 @@ Włącz lub wyłącz pamięć podręczną LRU (najrzadziej używane), zwiększając wydajność poprzez oszczędzanie użycia procesora. Niektóre gry mają z nią problemy, szczególnie TotK 1.2.1, więc wyłącz, jeśli gra się nie uruchamia lub losowo się zawiesza. Rozszerzony stan dynamiczny Włącza funkcje Vulkan w celu poprawy wydajności, renderowania i oszczędzania zasobów podczas tworzenia potoku, utrzymując niskie użycie CPU/GPU. Te rozszerzenia mogą zwiększać temperaturę urządzenia, a starsze GPU z serii A6XX mogą nie reagować prawidłowo. Ustaw na 0, aby używać formatów emulowanych przez Yuzu. - VertexInputDynamicState - Poprawia wydajność na nowszych urządzeniach. Obsługiwane tylko przez GPU Vulkan 1.3+. Synchronizuj prędkość rdzenia Synchronizuje prędkość rdzenia z maksymalnym procentem prędkości, aby poprawić wydajność bez zmiany rzeczywistej prędkości gry. Użyj Auto Stub diff --git a/src/android/app/src/main/res/values-pt-rBR/strings.xml b/src/android/app/src/main/res/values-pt-rBR/strings.xml index d5eb1f6e7d..682212ddee 100644 --- a/src/android/app/src/main/res/values-pt-rBR/strings.xml +++ b/src/android/app/src/main/res/values-pt-rBR/strings.xml @@ -50,8 +50,6 @@ Ative ou desative o cache LRU (Least Recently Used), aumentando o desempenho ao economizar uso da CPU. Alguns jogos têm problemas com ele, especialmente TotK 1.2.1, então desative se o jogo não iniciar ou travar aleatoriamente. Estado Dinâmico Estendido Ativa recursos Vulkan para melhorar desempenho, renderização e economizar recursos na criação de pipelines mantendo baixo uso de CPU/GPU. Essas extensões podem aumentar a temperatura do dispositivo e GPUs mais antigas da linha A6XX podem não responder corretamente. Defina como 0 para usar formatos emulados do Yuzu. - VertexInputDynamicState - Melhora desempenho em dispositivos mais novos. Suportado apenas em GPUs Vulkan 1.3+. Sincronizar velocidade do núcleo Sincroniza a velocidade do núcleo com a porcentagem máxima de velocidade para melhorar o desempenho sem alterar a velocidade real do jogo. Usar Auto Stub diff --git a/src/android/app/src/main/res/values-pt-rPT/strings.xml b/src/android/app/src/main/res/values-pt-rPT/strings.xml index 0f4cb60e18..56d37faa55 100644 --- a/src/android/app/src/main/res/values-pt-rPT/strings.xml +++ b/src/android/app/src/main/res/values-pt-rPT/strings.xml @@ -50,8 +50,6 @@ Ative ou desative a cache LRU (Least Recently Used), aumentando o desempenho ao poupar utilização da CPU. Alguns jogos têm problemas com ela, especialmente TotK 1.2.1, por isso desative se o jogo não arrancar ou falhar aleatoriamente. Estado Dinâmico Estendido Ativa funcionalidades Vulkan para melhorar desempenho, renderização e poupar recursos na criação de pipelines mantendo baixo uso de CPU/GPU. Estas extensões podem aumentar a temperatura do dispositivo e GPUs mais antigas da linha A6XX podem não responder corretamente. Defina como 0 para usar formatos emulados do Yuzu. - VertexInputDynamicState - Melhora o desempenho em dispositivos mais recentes. Suportado apenas em GPUs Vulkan 1.3+. Sincronizar velocidade do núcleo Sincroniza a velocidade do núcleo com a percentagem máxima de velocidade para melhorar o desempenho sem alterar a velocidade real do jogo. Usar Auto Stub diff --git a/src/android/app/src/main/res/values-ru/strings.xml b/src/android/app/src/main/res/values-ru/strings.xml index 243494ba5d..4f18397c37 100644 --- a/src/android/app/src/main/res/values-ru/strings.xml +++ b/src/android/app/src/main/res/values-ru/strings.xml @@ -50,8 +50,6 @@ Включите или отключите кэш LRU (наименее недавно использованный), что повышает производительность за счет экономии использования ЦП. Некоторые игры имеют проблемы с ним, особенно TotK 1.2.1, поэтому отключите, если игра не запускается или случайно вылетает. Расширенное динамическое состояние Включает функции Vulkan для улучшения производительности, рендеринга и экономии ресурсов при создании конвейеров, сохраняя низкое использование CPU/GPU. Эти расширения могут повысить температуру устройства, а старые GPU серии A6XX могут работать некорректно. Установите 0 для использования эмулируемых форматов Yuzu. - Динамическое состояние ввода вершин - Улучшает производительность на новых устройствах. Поддерживается только GPU с Vulkan 1.3+. Синхронизация скорости ядра Синхронизирует скорость ядра с максимальным процентом скорости для улучшения производительности без изменения фактической скорости игры. Использовать Auto Stub diff --git a/src/android/app/src/main/res/values-uk/strings.xml b/src/android/app/src/main/res/values-uk/strings.xml index 6fd938bcc4..927efccded 100644 --- a/src/android/app/src/main/res/values-uk/strings.xml +++ b/src/android/app/src/main/res/values-uk/strings.xml @@ -50,8 +50,6 @@ Увімкніть або вимкніть кеш LRU (найменш нещодавно використаний), що підвищує продуктивність за рахунок економії використання CPU. Деякі ігри мають проблеми з ним, особливо TotK 1.2.1, тому вимкніть, якщо гра не запускається або випадково вилітає. Розширений динамічний стан Активує функції Vulkan для покращення продуктивності, рендерингу та економії ресурсів під час створення конвеєрів, зберігаючи низьке використання CPU/GPU. Ці розширення можуть підвищити температуру пристрою, а старі GPU серії A6XX можуть реагувати некоректно. Встановіть 0 для використання емульованих форматів Yuzu. - Динамічний стан вводу вершин - Покращує продуктивність на нових пристроях. Підтримується лише GPU з Vulkan 1.3+. Синхронізувати швидкість ядра Синхронізує швидкість ядра з максимальним відсотком швидкості для покращення продуктивності без зміни реальної швидкості гри. Використовувати Auto Stub diff --git a/src/android/app/src/main/res/values-vi/strings.xml b/src/android/app/src/main/res/values-vi/strings.xml index 083af5f53f..8f861e3065 100644 --- a/src/android/app/src/main/res/values-vi/strings.xml +++ b/src/android/app/src/main/res/values-vi/strings.xml @@ -50,8 +50,6 @@ Bật hoặc tắt bộ nhớ đệm LRU (ít được sử dụng gần đây nhất), tăng hiệu suất bằng cách tiết kiệm sử dụng CPU. Một số trò chơi có vấn đề với nó, đặc biệt là TotK 1.2.1, vì vậy hãy tắt nếu trò chơi không khởi động hoặc bị treo ngẫu nhiên. Trạng thái động mở rộng Kích hoạt các tính năng Vulkan để cải thiện hiệu suất, kết xuất và tiết kiệm tài nguyên khi tạo pipeline trong khi vẫn duy trì mức sử dụng CPU/GPU thấp. Các tiện ích mở rộng này có thể làm tăng nhiệt độ thiết bị và GPU dòng A6XX cũ hơn có thể không phản ứng đúng cách. Đặt thành 0 để sử dụng định dạng mô phỏng của Yuzu. - Trạng thái động đầu vào đỉnh - Cải thiện hiệu suất trên các thiết bị mới hơn. Chỉ được hỗ trợ trên GPU Vulkan 1.3+. Đồng bộ tốc độ lõi Đồng bộ tốc độ lõi với tỷ lệ phần trăm tốc độ tối đa để cải thiện hiệu suất mà không làm thay đổi tốc độ thực tế của trò chơi. Sử dụng Auto Stub diff --git a/src/android/app/src/main/res/values-zh-rCN/strings.xml b/src/android/app/src/main/res/values-zh-rCN/strings.xml index 007f6b9a56..c2a69cc3aa 100644 --- a/src/android/app/src/main/res/values-zh-rCN/strings.xml +++ b/src/android/app/src/main/res/values-zh-rCN/strings.xml @@ -50,8 +50,6 @@ 启用或禁用LRU(最近最少使用)缓存,通过节省CPU使用来提高性能。某些游戏(尤其是TotK 1.2.1)可能存在问题,如果游戏无法启动或随机崩溃,请禁用它。 扩展动态状态 启用Vulkan功能以在保持低CPU/GPU使用率的同时提高性能、渲染效果并节省管道创建资源。这些扩展可能会提高设备温度,较旧的A6XX系列GPU可能无法正确响应。设置为0可使用Yuzu模拟格式。 - 顶点输入动态状态 - 提高新设备上的性能。仅支持Vulkan 1.3+ GPU。 同步核心速度 将核心速度与最大速度百分比同步,在不改变游戏实际速度的情况下提高性能。 使用自动存根 diff --git a/src/android/app/src/main/res/values-zh-rTW/strings.xml b/src/android/app/src/main/res/values-zh-rTW/strings.xml index d7d311e810..b0da549dab 100644 --- a/src/android/app/src/main/res/values-zh-rTW/strings.xml +++ b/src/android/app/src/main/res/values-zh-rTW/strings.xml @@ -50,8 +50,6 @@ 啟用或停用LRU(最近最少使用)快取,通過節省CPU使用來提高效能。某些遊戲(尤其是TotK 1.2.1)可能存在問題,如果遊戲無法啟動或隨機崩潰,請停用它。 擴展動態狀態 啟用Vulkan功能以在保持低CPU/GPU使用率的同時提高效能、渲染效果並節省管線建立資源。這些擴充可能會提高裝置溫度,較舊的A6XX系列GPU可能無法正確響應。設為0可使用Yuzu模擬格式。 - 頂點輸入動態狀態 - 提高新裝置上的效能。僅支援Vulkan 1.3+ GPU。 同步核心速度 將核心速度與最大速度百分比同步,在不改變遊戲實際速度的情況下提高效能。 使用自動存根 diff --git a/src/android/app/src/main/res/values/arrays.xml b/src/android/app/src/main/res/values/arrays.xml index eeac14d6f4..cb108dc548 100644 --- a/src/android/app/src/main/res/values/arrays.xml +++ b/src/android/app/src/main/res/values/arrays.xml @@ -21,18 +21,6 @@ 1 - - @string/memory_4gb - @string/memory_6gb - @string/memory_8gb - - - - 0 - 1 - 2 - - @string/language_brazilian_portuguese @string/language_british_english diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 45cfb1c32d..efb8178e68 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -12,10 +12,8 @@ (Enhanced) (Skipping) - Building - Shader(s) System: - Show Performance Stats Overlay + ShoW Performance Stats Overlay Customization Visibility Overlay @@ -33,8 +31,6 @@ Display the amount of RAM used by the system Show Battery Temperature Display current Battery temperature in Celsius and Fahrenheit - Show Shaders Building - Display current number of shaders being built Overlay Position Choose where the performance stats overlay is displayed on the screen Top Left @@ -52,9 +48,7 @@ Enhanced Frame Pacing Ensures smooth and consistent frame delivery by synchronizing the timing between frames, reducing stuttering and uneven animation. Ideal for games that experience frame timing instability or micro-stutters during gameplay. Extended Dynamic State - Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Legacy emulated formats. Setting 3 will only work on new devices. - VertexInputDynamicState - Improves performance on newer devices. Only supported on Vulkan 1.3+ GPUs. + Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Legacy emulated formats. Synchronize Core Speed Synchronize the core tick speed to the maximum speed percentage to improve performance without altering the game\'s actual speed. Use Auto Stub @@ -365,16 +359,12 @@ Specifies the percentage to limit emulation speed. 100% is the normal speed. Values higher or lower will increase or decrease the speed limit. CPU backend CPU accuracy - Flush debug logs by line - Flushes debugging logs on each line written, making debugging easier in cases of crashing or freezing. %1$s%2$s Device name Docked Mode Increases resolution, decreasing performance. Handheld Mode is used when disabled, lowering resolution and increasing performance. - Memory Layout - Change the emulated memory layout. This setting will not increase performance, but may help with games utilizing high resolutions via mods. Do not use on phones with 8GB of RAM or less. Emulated region Emulated language Select RTC date @@ -419,7 +409,6 @@ Graphics debugging Sets the graphics API to a slow debugging mode. Fastmem - Logging Output engine @@ -689,11 +678,6 @@ Korea Taiwan - - 4GB (Recommended) - 6GB (Unsafe) - 8GB (Unsafe) - 日本語 English diff --git a/src/common/settings.h b/src/common/settings.h index c7d34e6f2f..58044103f6 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -446,21 +446,13 @@ struct Values { Category::RendererAdvanced}; SwitchableSetting dyna_state{linkage, -#ifdef ANDROID - 2, -#else - 2, -#endif + 0, 0, 3, "dyna_state", Category::RendererExtensions, Specialization::Scalar}; - SwitchableSetting vertex_input{linkage, - false, - "vertex_input", - Category::RendererExtensions}; SwitchableSetting provoking_vertex{linkage, true, "provoking_vertex", Category::RendererExtensions}; SwitchableSetting descriptor_indexing{linkage, true, "descriptor_indexing", Category::RendererExtensions}; diff --git a/src/core/hle/kernel/k_memory_layout.h b/src/core/hle/kernel/k_memory_layout.h index 7ca5a5b41e..d7adb31699 100644 --- a/src/core/hle/kernel/k_memory_layout.h +++ b/src/core/hle/kernel/k_memory_layout.h @@ -25,7 +25,7 @@ constexpr std::size_t GetMaximumOverheadSize(std::size_t size) { } constexpr std::size_t MainMemorySize = 4_GiB; -constexpr std::size_t MainMemorySizeMax = 12_GiB; +constexpr std::size_t MainMemorySizeMax = 8_GiB; constexpr std::size_t ReservedEarlyDramSize = 384_KiB; constexpr std::size_t DramPhysicalAddress = 0x80000000; diff --git a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp index c2ed3a5719..4b4331d2f4 100644 --- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp +++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp @@ -803,9 +803,6 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { VK_DYNAMIC_STATE_STENCIL_WRITE_MASK, VK_DYNAMIC_STATE_STENCIL_REFERENCE, VK_DYNAMIC_STATE_LINE_WIDTH, VK_DYNAMIC_STATE_LINE_STIPPLE, }; - if (key.state.dynamic_vertex_input) { - dynamic_states.push_back(VK_DYNAMIC_STATE_VERTEX_INPUT_EXT); - } if (key.state.extended_dynamic_state) { static constexpr std::array extended{ VK_DYNAMIC_STATE_CULL_MODE_EXT, @@ -818,6 +815,9 @@ void GraphicsPipeline::MakePipeline(VkRenderPass render_pass) { VK_DYNAMIC_STATE_STENCIL_TEST_ENABLE_EXT, VK_DYNAMIC_STATE_STENCIL_OP_EXT, }; + if (key.state.dynamic_vertex_input) { + dynamic_states.push_back(VK_DYNAMIC_STATE_VERTEX_INPUT_EXT); + } dynamic_states.insert(dynamic_states.end(), extended.begin(), extended.end()); if (key.state.extended_dynamic_state_2) { static constexpr std::array extended2{ diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 82d68e59f4..51775f7f5c 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -128,8 +128,7 @@ Shader::AttributeType CastAttributeType(const FixedPipelineState::VertexAttribut return Shader::AttributeType::Float; } -Shader::AttributeType AttributeType(const FixedPipelineState& state, size_t index) -{ +Shader::AttributeType AttributeType(const FixedPipelineState& state, size_t index) { switch (state.DynamicAttributeType(index)) { case 0: return Shader::AttributeType::Disabled; @@ -180,8 +179,7 @@ Shader::RuntimeInfo MakeRuntimeInfo(std::span program info.generic_input_types[index] = AttributeType(key.state, index); } } else { - std::ranges::transform(key.state.attributes, - info.generic_input_types.begin(), + std::ranges::transform(key.state.attributes, info.generic_input_types.begin(), &CastAttributeType); } break; @@ -406,8 +404,6 @@ PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_, const u8 dynamic_state = Settings::values.dyna_state.GetValue(); - const bool vertex_input = Settings::values.vertex_input.GetValue(); - LOG_INFO(Render_Vulkan, "DynamicState value is set to {}", (u32) dynamic_state); dynamic_features = DynamicFeatures{ @@ -421,7 +417,7 @@ PipelineCache::PipelineCache(Tegra::MaxwellDeviceMemoryManager& device_memory_, && dynamic_state > 2, .has_extended_dynamic_state_3_enables = device.IsExtExtendedDynamicState3EnablesSupported() && dynamic_state > 2, - .has_dynamic_vertex_input = device.IsExtVertexInputDynamicStateSupported() && vertex_input, + .has_dynamic_vertex_input = device.IsExtVertexInputDynamicStateSupported(), }; LOG_INFO(Render_Vulkan, "DynamicState1: {}", dynamic_features.has_extended_dynamic_state); diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 62c057bfb4..d0cff37f61 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -952,28 +952,28 @@ void RasterizerVulkan::UpdateDynamicStates() { UpdateDepthBiasEnable(regs); } if (device.IsExtExtendedDynamicState3EnablesSupported()) { - using namespace Tegra::Engines; - - if (device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_OPEN_SOURCE - || device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_PROPRIETARY) { - struct In { - const Maxwell3D::Regs::VertexAttribute::Type d; - In(Maxwell3D::Regs::VertexAttribute::Type n) : d(n) {} - bool operator()(Maxwell3D::Regs::VertexAttribute n) const { - return n.type == d; - } - }; - - auto has_float = std::any_of( - regs.vertex_attrib_format.begin(), regs.vertex_attrib_format.end(), - In(Maxwell3D::Regs::VertexAttribute::Type::Float)); - - if (regs.logic_op.enable) - regs.logic_op.enable = static_cast(!has_float); - - UpdateLogicOpEnable(regs); - } else - UpdateLogicOpEnable(regs); + using namespace Tegra::Engines; + + if (device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_OPEN_SOURCE + || device.GetDriverID() == VkDriverIdKHR::VK_DRIVER_ID_AMD_PROPRIETARY) { + struct In { + const Maxwell3D::Regs::VertexAttribute::Type d; + In(Maxwell3D::Regs::VertexAttribute::Type n) : d(n) {} + bool operator()(Maxwell3D::Regs::VertexAttribute n) const { + return n.type == d; + } + }; + + auto has_float = std::any_of( + regs.vertex_attrib_format.begin(), regs.vertex_attrib_format.end(), + In(Maxwell3D::Regs::VertexAttribute::Type::Float)); + + if (regs.logic_op.enable) + regs.logic_op.enable = static_cast(!has_float); + + UpdateLogicOpEnable(regs); + } else + UpdateLogicOpEnable(regs); UpdateDepthClampEnable(regs); } } @@ -1103,21 +1103,12 @@ void RasterizerVulkan::UpdateDepthBias(Tegra::Engines::Maxwell3D::Regs& regs) { regs.zeta.format == Tegra::DepthFormat::X8Z24_UNORM || regs.zeta.format == Tegra::DepthFormat::S8Z24_UNORM || regs.zeta.format == Tegra::DepthFormat::V8Z24_UNORM; - - size_t length = sizeof(NEEDS_D24) / sizeof(u64); - bool needs_convert = false; - for (size_t i = 0; i < length; ++i) { - if (NEEDS_D24[i] == program_id) { - needs_convert = true; - break; - } - } - - if (is_d24 && !device.SupportsD24DepthBuffer() && needs_convert) { + if (is_d24 && !device.SupportsD24DepthBuffer() && program_id == 0x1006A800016E000ULL) { + // Only activate this in Super Smash Brothers Ultimate // the base formulas can be obtained from here: // https://docs.microsoft.com/en-us/windows/win32/direct3d11/d3d10-graphics-programming-guide-output-merger-stage-depth-bias - const double rescale_factor = static_cast(1ULL << (32 - 24)) - / (static_cast(0x1.ep+127)); + const double rescale_factor = + static_cast(1ULL << (32 - 24)) / (static_cast(0x1.ep+127)); units = static_cast(static_cast(units) * rescale_factor); } scheduler.Record([constant = units, clamp = regs.depth_bias_clamp, diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.h b/src/video_core/renderer_vulkan/vk_rasterizer.h index 33bc6cd8e4..0617b37f05 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.h +++ b/src/video_core/renderer_vulkan/vk_rasterizer.h @@ -144,10 +144,6 @@ private: static constexpr size_t MAX_IMAGE_VIEWS = MAX_TEXTURES + MAX_IMAGES; static constexpr VkDeviceSize DEFAULT_BUFFER_SIZE = 4 * sizeof(float); - static constexpr u64 NEEDS_D24[] = { - 0x1006A800016E000ULL, // SSBU - 0x0100E95004038000ULL, // XC2 - }; template void PrepareDraw(bool is_indexed, Func&&); diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 87cfe06086..474e420daf 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -459,7 +459,6 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR first_next = &diagnostics_nv; } - // TODO(alekpop): impl is incomplete, needs the settings to be assigned. VkPhysicalDeviceDescriptorIndexingFeaturesEXT descriptor_indexing{ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT, .pNext = use_diagnostics_nv ? static_cast(&diagnostics_nv) : static_cast(&features2), @@ -492,20 +491,17 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR CollectPhysicalMemoryInfo(); CollectToolingInfo(); - // TODO(alekpop): many things here are still applying and need to be changed to match the real behaviors. - if (is_qualcomm || is_turnip) { LOG_WARNING(Render_Vulkan, "Qualcomm and Turnip drivers have broken VK_EXT_custom_border_color"); - RemoveExtensionFeature(extensions.custom_border_color, - features.custom_border_color, - VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); + //RemoveExtensionFeature(extensions.custom_border_color, features.custom_border_color, + //VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); } if (is_qualcomm) { LOG_WARNING(Render_Vulkan, "Qualcomm drivers have a slow VK_KHR_push_descriptor implementation"); - RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + //RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); #if defined(ANDROID) && defined(ARCHITECTURE_arm64) // Patch the driver to enable BCn textures. @@ -539,7 +535,7 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR } else if (arch <= NvidiaArchitecture::Arch_Volta) { if (nv_major_version < 527) { LOG_WARNING(Render_Vulkan, "Volta and older have broken VK_KHR_push_descriptor"); - RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + //RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); } } if (nv_major_version >= 510) { @@ -547,16 +543,15 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR cant_blit_msaa = true; } } - if (extensions.extended_dynamic_state && is_radv) { // Mask driver version variant const u32 version = (properties.properties.driverVersion << 3) >> 3; if (version < VK_MAKE_API_VERSION(0, 21, 2, 0)) { LOG_WARNING(Render_Vulkan, "RADV versions older than 21.2 have broken VK_EXT_extended_dynamic_state"); - RemoveExtensionFeature(extensions.extended_dynamic_state, - features.extended_dynamic_state, - VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); + //RemoveExtensionFeature(extensions.extended_dynamic_state, + //features.extended_dynamic_state, + //VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); } } if (extensions.extended_dynamic_state2 && is_radv) { @@ -565,9 +560,9 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR LOG_WARNING( Render_Vulkan, "RADV versions older than 22.3.1 have broken VK_EXT_extended_dynamic_state2"); - RemoveExtensionFeature(extensions.extended_dynamic_state2, - features.extended_dynamic_state2, - VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); + // RemoveExtensionFeature(extensions.extended_dynamic_state2, + // features.extended_dynamic_state2, + // VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); } } if (extensions.extended_dynamic_state2 && is_qualcomm) { @@ -577,54 +572,53 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR // Qualcomm Adreno 7xx drivers do not properly support extended_dynamic_state2. LOG_WARNING(Render_Vulkan, "Qualcomm Adreno 7xx drivers have broken VK_EXT_extended_dynamic_state2"); - RemoveExtensionFeature(extensions.extended_dynamic_state2, - features.extended_dynamic_state2, - VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); + //RemoveExtensionFeature(extensions.extended_dynamic_state2, + //features.extended_dynamic_state2, + //VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); } } if (extensions.extended_dynamic_state3 && is_radv) { LOG_WARNING(Render_Vulkan, "RADV has broken extendedDynamicState3ColorBlendEquation"); - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; - dynamic_state3_blending = false; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = true; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = true; + dynamic_state3_blending = true; const u32 version = (properties.properties.driverVersion << 3) >> 3; if (version < VK_MAKE_API_VERSION(0, 23, 1, 0)) { LOG_WARNING(Render_Vulkan, "RADV versions older than 23.1.0 have broken depth clamp dynamic state"); - features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable = false; - dynamic_state3_enables = false; + features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable = true; + dynamic_state3_enables = true; } } if (extensions.extended_dynamic_state3 && (is_amd_driver || driver_id == VK_DRIVER_ID_SAMSUNG_PROPRIETARY)) { // AMD and Samsung drivers have broken extendedDynamicState3ColorBlendEquation LOG_WARNING(Render_Vulkan, "AMD and Samsung drivers have broken extendedDynamicState3ColorBlendEquation"); - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = false; - features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = false; - dynamic_state3_blending = false; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable = true; + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation = true; + dynamic_state3_blending = true; } if (extensions.vertex_input_dynamic_state && is_radv) { - // TODO(alekpop): Blacklist only offending driver versions - // NOTE(alekpop): It still affects the latest RADV. - // TODO(alekpop): Confirm if RDNA1 is affected + // TODO(ameerj): Blacklist only offending driver versions + // TODO(ameerj): Confirm if RDNA1 is affected const bool is_rdna2 = supported_extensions.contains(VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME); if (is_rdna2) { LOG_WARNING(Render_Vulkan, "RADV has broken VK_EXT_vertex_input_dynamic_state on RDNA2 hardware"); - RemoveExtensionFeature(extensions.vertex_input_dynamic_state, - features.vertex_input_dynamic_state, - VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + // RemoveExtensionFeature(extensions.vertex_input_dynamic_state, + // features.vertex_input_dynamic_state, + // VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); } } if (extensions.vertex_input_dynamic_state && is_qualcomm) { // Qualcomm drivers do not properly support vertex_input_dynamic_state. LOG_WARNING(Render_Vulkan, "Qualcomm drivers have broken VK_EXT_vertex_input_dynamic_state"); - RemoveExtensionFeature(extensions.vertex_input_dynamic_state, - features.vertex_input_dynamic_state, - VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + //RemoveExtensionFeature(extensions.vertex_input_dynamic_state, + // features.vertex_input_dynamic_state, + // VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); } sets_per_pool = 64; @@ -658,9 +652,9 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR const u32 version = (properties.properties.driverVersion << 3) >> 3; if (version < VK_MAKE_API_VERSION(27, 20, 100, 0)) { LOG_WARNING(Render_Vulkan, "Intel has broken VK_EXT_vertex_input_dynamic_state"); - RemoveExtensionFeature(extensions.vertex_input_dynamic_state, - features.vertex_input_dynamic_state, - VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + //RemoveExtensionFeature(extensions.vertex_input_dynamic_state, + //features.vertex_input_dynamic_state, + //VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); } } if (features.shader_float16_int8.shaderFloat16 && is_intel_windows) { @@ -687,14 +681,14 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR // mesa/mesa/-/commit/ff91c5ca42bc80aa411cb3fd8f550aa6fdd16bdc LOG_WARNING(Render_Vulkan, "ANV drivers 22.3.0 to 23.1.0 have broken VK_KHR_push_descriptor"); - RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + //RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); } } else if (extensions.push_descriptor && is_nvidia) { const auto arch = GetNvidiaArch(); if (arch <= NvidiaArchitecture::Arch_Pascal) { LOG_WARNING(Render_Vulkan, "Pascal and older architectures have broken VK_KHR_push_descriptor"); - RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); + //RemoveExtension(extensions.push_descriptor, VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME); } } @@ -728,8 +722,33 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR dynamic_state3_enables = true; } - must_emulate_scaled_formats = !Settings::values.dyna_state.GetValue(); - LOG_INFO(Render_Vulkan, "Scaled format emulation: {}", must_emulate_scaled_formats); + if (Settings::values.dyna_state.GetValue() == 0) { + must_emulate_scaled_formats = true; + LOG_INFO(Render_Vulkan, "Dynamic state is disabled (dyna_state = 0), forcing scaled format emulation ON"); + + // Disable dynamic state 1-3 and all extensions + RemoveExtensionFeature(extensions.custom_border_color, features.custom_border_color, + VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME); + + RemoveExtensionFeature(extensions.extended_dynamic_state, features.extended_dynamic_state, + VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); + + RemoveExtensionFeature(extensions.extended_dynamic_state2, features.extended_dynamic_state2, + VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); + + RemoveExtensionFeature(extensions.vertex_input_dynamic_state, features.vertex_input_dynamic_state, + VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); + + RemoveExtensionFeature(extensions.extended_dynamic_state3, features.extended_dynamic_state3, + VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); + dynamic_state3_blending = false; + dynamic_state3_enables = false; + + LOG_INFO(Render_Vulkan, "All dynamic state extensions and features have been disabled"); + } else { + must_emulate_scaled_formats = false; + LOG_INFO(Render_Vulkan, "Dynamic state is enabled (dyna_state = 1-3), disabling scaled format emulation"); + } logical = vk::Device::Create(physical, queue_cis, ExtensionListForVulkan(loaded_extensions), first_next, dld); @@ -1187,53 +1206,34 @@ void Device::RemoveUnsuitableExtensions() { RemoveExtensionFeatureIfUnsuitable(extensions.depth_clip_control, features.depth_clip_control, VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME); - int dynamic_state = Settings::values.dyna_state.GetValue(); - - // VK_EXT_extended_dynamic_state - if (dynamic_state > 0) { - extensions.extended_dynamic_state = features.extended_dynamic_state.extendedDynamicState; - RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state, - features.extended_dynamic_state, - VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); - } else { - RemoveExtensionFeature(extensions.extended_dynamic_state, - features.extended_dynamic_state, - VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); - } + /* */ // VK_EXT_extended_dynamic_state + extensions.extended_dynamic_state = features.extended_dynamic_state.extendedDynamicState; + RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state, + features.extended_dynamic_state, + VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME); // VK_EXT_extended_dynamic_state2 - if (dynamic_state > 1) { - extensions.extended_dynamic_state2 = features.extended_dynamic_state2.extendedDynamicState2; - RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state2, - features.extended_dynamic_state2, - VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); - } else { - RemoveExtensionFeature(extensions.extended_dynamic_state2, - features.extended_dynamic_state2, - VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); - } + extensions.extended_dynamic_state2 = features.extended_dynamic_state2.extendedDynamicState2; + RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state2, + features.extended_dynamic_state2, + VK_EXT_EXTENDED_DYNAMIC_STATE_2_EXTENSION_NAME); // VK_EXT_extended_dynamic_state3 - if (dynamic_state > 2) { - dynamic_state3_blending - = features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable - && features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation - && features.extended_dynamic_state3.extendedDynamicState3ColorWriteMask; - dynamic_state3_enables - = features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable - && features.extended_dynamic_state3.extendedDynamicState3LogicOpEnable; + dynamic_state3_blending = + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEnable && + features.extended_dynamic_state3.extendedDynamicState3ColorBlendEquation && + features.extended_dynamic_state3.extendedDynamicState3ColorWriteMask; + dynamic_state3_enables = + features.extended_dynamic_state3.extendedDynamicState3DepthClampEnable && + features.extended_dynamic_state3.extendedDynamicState3LogicOpEnable; + + extensions.extended_dynamic_state3 = dynamic_state3_blending || dynamic_state3_enables; + dynamic_state3_blending = dynamic_state3_blending && extensions.extended_dynamic_state3; + dynamic_state3_enables = dynamic_state3_enables && extensions.extended_dynamic_state3; + RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state3, + features.extended_dynamic_state3, + VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); - extensions.extended_dynamic_state3 = dynamic_state3_blending || dynamic_state3_enables; - dynamic_state3_blending = dynamic_state3_blending && extensions.extended_dynamic_state3; - dynamic_state3_enables = dynamic_state3_enables && extensions.extended_dynamic_state3; - RemoveExtensionFeatureIfUnsuitable(extensions.extended_dynamic_state3, - features.extended_dynamic_state3, - VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); - } else { - RemoveExtensionFeature(extensions.extended_dynamic_state3, - features.extended_dynamic_state3, - VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME); - } // VK_EXT_provoking_vertex if (Settings::values.provoking_vertex.GetValue()) { extensions.provoking_vertex = features.provoking_vertex.provokingVertexLast @@ -1249,58 +1249,49 @@ void Device::RemoveUnsuitableExtensions() { } // VK_KHR_shader_atomic_int64 - extensions.shader_atomic_int64 = features.shader_atomic_int64.shaderBufferInt64Atomics - && features.shader_atomic_int64.shaderSharedInt64Atomics; - RemoveExtensionFeatureIfUnsuitable(extensions.shader_atomic_int64, - features.shader_atomic_int64, + extensions.shader_atomic_int64 = features.shader_atomic_int64.shaderBufferInt64Atomics && + features.shader_atomic_int64.shaderSharedInt64Atomics; + RemoveExtensionFeatureIfUnsuitable(extensions.shader_atomic_int64, features.shader_atomic_int64, VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME); // VK_EXT_shader_demote_to_helper_invocation - extensions.shader_demote_to_helper_invocation = features.shader_demote_to_helper_invocation - .shaderDemoteToHelperInvocation; + extensions.shader_demote_to_helper_invocation = + features.shader_demote_to_helper_invocation.shaderDemoteToHelperInvocation; RemoveExtensionFeatureIfUnsuitable(extensions.shader_demote_to_helper_invocation, features.shader_demote_to_helper_invocation, VK_EXT_SHADER_DEMOTE_TO_HELPER_INVOCATION_EXTENSION_NAME); // VK_EXT_subgroup_size_control - extensions.subgroup_size_control = features.subgroup_size_control.subgroupSizeControl - && properties.subgroup_size_control.minSubgroupSize - <= GuestWarpSize - && properties.subgroup_size_control.maxSubgroupSize - >= GuestWarpSize; + extensions.subgroup_size_control = + features.subgroup_size_control.subgroupSizeControl && + properties.subgroup_size_control.minSubgroupSize <= GuestWarpSize && + properties.subgroup_size_control.maxSubgroupSize >= GuestWarpSize; RemoveExtensionFeatureIfUnsuitable(extensions.subgroup_size_control, features.subgroup_size_control, VK_EXT_SUBGROUP_SIZE_CONTROL_EXTENSION_NAME); // VK_EXT_transform_feedback - extensions.transform_feedback = features.transform_feedback.transformFeedback - && features.transform_feedback.geometryStreams - && properties.transform_feedback.maxTransformFeedbackStreams - >= 4 - && properties.transform_feedback.maxTransformFeedbackBuffers > 0 - && properties.transform_feedback.transformFeedbackQueries - && properties.transform_feedback.transformFeedbackDraw; - RemoveExtensionFeatureIfUnsuitable(extensions.transform_feedback, - features.transform_feedback, + extensions.transform_feedback = + features.transform_feedback.transformFeedback && + features.transform_feedback.geometryStreams && + properties.transform_feedback.maxTransformFeedbackStreams >= 4 && + properties.transform_feedback.maxTransformFeedbackBuffers > 0 && + properties.transform_feedback.transformFeedbackQueries && + properties.transform_feedback.transformFeedbackDraw; + RemoveExtensionFeatureIfUnsuitable(extensions.transform_feedback, features.transform_feedback, VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME); // VK_EXT_vertex_input_dynamic_state - if (Settings::values.vertex_input.GetValue()) { - extensions.vertex_input_dynamic_state = features.vertex_input_dynamic_state - .vertexInputDynamicState; - RemoveExtensionFeatureIfUnsuitable(extensions.vertex_input_dynamic_state, - features.vertex_input_dynamic_state, - VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); - } else { - RemoveExtensionFeature(extensions.vertex_input_dynamic_state, - features.vertex_input_dynamic_state, - VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); - } + extensions.vertex_input_dynamic_state = + features.vertex_input_dynamic_state.vertexInputDynamicState; + RemoveExtensionFeatureIfUnsuitable(extensions.vertex_input_dynamic_state, + features.vertex_input_dynamic_state, + VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME); // VK_KHR_pipeline_executable_properties if (Settings::values.renderer_shader_feedback.GetValue()) { - extensions.pipeline_executable_properties = features.pipeline_executable_properties - .pipelineExecutableInfo; + extensions.pipeline_executable_properties = + features.pipeline_executable_properties.pipelineExecutableInfo; RemoveExtensionFeatureIfUnsuitable(extensions.pipeline_executable_properties, features.pipeline_executable_properties, VK_KHR_PIPELINE_EXECUTABLE_PROPERTIES_EXTENSION_NAME); @@ -1311,12 +1302,12 @@ void Device::RemoveUnsuitableExtensions() { } // VK_KHR_workgroup_memory_explicit_layout - extensions.workgroup_memory_explicit_layout - = features.features.shaderInt16 - && features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout - && features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout8BitAccess - && features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout16BitAccess - && features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayoutScalarBlockLayout; + extensions.workgroup_memory_explicit_layout = + features.features.shaderInt16 && + features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout && + features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout8BitAccess && + features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayout16BitAccess && + features.workgroup_memory_explicit_layout.workgroupMemoryExplicitLayoutScalarBlockLayout; RemoveExtensionFeatureIfUnsuitable(extensions.workgroup_memory_explicit_layout, features.workgroup_memory_explicit_layout, VK_KHR_WORKGROUP_MEMORY_EXPLICIT_LAYOUT_EXTENSION_NAME); diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 01d0eb52f7..ddc9451a7e 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -39,35 +39,27 @@ VK_DEFINE_HANDLE(VmaAllocator) FEATURE(EXT, SubgroupSizeControl, SUBGROUP_SIZE_CONTROL, subgroup_size_control) // Define all features which may be used by the implementation and require an extension here. -#define FOR_EACH_VK_FEATURE_EXT(FEATURE) \ - FEATURE(EXT, CustomBorderColor, CUSTOM_BORDER_COLOR, custom_border_color) \ - FEATURE(EXT, DepthBiasControl, DEPTH_BIAS_CONTROL, depth_bias_control) \ - FEATURE(EXT, DepthClipControl, DEPTH_CLIP_CONTROL, depth_clip_control) \ - FEATURE(EXT, ExtendedDynamicState, EXTENDED_DYNAMIC_STATE, extended_dynamic_state) \ - FEATURE(EXT, ExtendedDynamicState2, EXTENDED_DYNAMIC_STATE_2, extended_dynamic_state2) \ - FEATURE(EXT, ExtendedDynamicState3, EXTENDED_DYNAMIC_STATE_3, extended_dynamic_state3) \ - FEATURE(EXT, 4444Formats, 4444_FORMATS, format_a4b4g4r4) \ - FEATURE(EXT, IndexTypeUint8, INDEX_TYPE_UINT8, index_type_uint8) \ - FEATURE(EXT, LineRasterization, LINE_RASTERIZATION, line_rasterization) \ - FEATURE(EXT, \ - PrimitiveTopologyListRestart, \ - PRIMITIVE_TOPOLOGY_LIST_RESTART, \ - primitive_topology_list_restart) \ - FEATURE(EXT, ProvokingVertex, PROVOKING_VERTEX, provoking_vertex) \ - FEATURE(EXT, Robustness2, ROBUSTNESS_2, robustness2) \ - FEATURE(EXT, TransformFeedback, TRANSFORM_FEEDBACK, transform_feedback) \ - FEATURE(EXT, VertexInputDynamicState, VERTEX_INPUT_DYNAMIC_STATE, vertex_input_dynamic_state) \ - FEATURE(KHR, \ - PipelineExecutableProperties, \ - PIPELINE_EXECUTABLE_PROPERTIES, \ - pipeline_executable_properties) \ - FEATURE(KHR, \ - WorkgroupMemoryExplicitLayout, \ - WORKGROUP_MEMORY_EXPLICIT_LAYOUT, \ +#define FOR_EACH_VK_FEATURE_EXT(FEATURE) \ + FEATURE(EXT, CustomBorderColor, CUSTOM_BORDER_COLOR, custom_border_color) \ + FEATURE(EXT, DepthBiasControl, DEPTH_BIAS_CONTROL, depth_bias_control) \ + FEATURE(EXT, DepthClipControl, DEPTH_CLIP_CONTROL, depth_clip_control) \ + FEATURE(EXT, ExtendedDynamicState, EXTENDED_DYNAMIC_STATE, extended_dynamic_state) \ + FEATURE(EXT, ExtendedDynamicState2, EXTENDED_DYNAMIC_STATE_2, extended_dynamic_state2) \ + FEATURE(EXT, ExtendedDynamicState3, EXTENDED_DYNAMIC_STATE_3, extended_dynamic_state3) \ + FEATURE(EXT, 4444Formats, 4444_FORMATS, format_a4b4g4r4) \ + FEATURE(EXT, IndexTypeUint8, INDEX_TYPE_UINT8, index_type_uint8) \ + FEATURE(EXT, LineRasterization, LINE_RASTERIZATION, line_rasterization) \ + FEATURE(EXT, PrimitiveTopologyListRestart, PRIMITIVE_TOPOLOGY_LIST_RESTART, \ + primitive_topology_list_restart) \ + FEATURE(EXT, ProvokingVertex, PROVOKING_VERTEX, provoking_vertex) \ + FEATURE(EXT, Robustness2, ROBUSTNESS_2, robustness2) \ + FEATURE(EXT, TransformFeedback, TRANSFORM_FEEDBACK, transform_feedback) \ + FEATURE(EXT, VertexInputDynamicState, VERTEX_INPUT_DYNAMIC_STATE, vertex_input_dynamic_state) \ + FEATURE(KHR, PipelineExecutableProperties, PIPELINE_EXECUTABLE_PROPERTIES, \ + pipeline_executable_properties) \ + FEATURE(KHR, WorkgroupMemoryExplicitLayout, WORKGROUP_MEMORY_EXPLICIT_LAYOUT, \ workgroup_memory_explicit_layout) -// TODO(alekpop): descriptor index is incomplete and needs fix. - // Define miscellaneous extensions which may be used by the implementation here. #define FOR_EACH_VK_EXTENSION(EXTENSION) \ EXTENSION(EXT, CONDITIONAL_RENDERING, conditional_rendering) \ @@ -157,24 +149,24 @@ VK_DEFINE_HANDLE(VmaAllocator) FEATURE_NAME(variable_pointer, variablePointersStorageBuffer) // Define features where the absence of the feature may result in a degraded experience. -#define FOR_EACH_VK_RECOMMENDED_FEATURE(FEATURE_NAME) \ - FEATURE_NAME(custom_border_color, customBorderColors) \ - FEATURE_NAME(depth_bias_control, depthBiasControl) \ - FEATURE_NAME(depth_bias_control, leastRepresentableValueForceUnormRepresentation) \ - FEATURE_NAME(depth_bias_control, depthBiasExact) \ - FEATURE_NAME(extended_dynamic_state, extendedDynamicState) \ - FEATURE_NAME(format_a4b4g4r4, formatA4B4G4R4) \ - FEATURE_NAME(index_type_uint8, indexTypeUint8) \ - FEATURE_NAME(primitive_topology_list_restart, primitiveTopologyListRestart) \ - FEATURE_NAME(provoking_vertex, provokingVertexLast) \ - FEATURE_NAME(robustness2, nullDescriptor) \ - FEATURE_NAME(robustness2, robustBufferAccess2) \ - FEATURE_NAME(robustness2, robustImageAccess2) \ - FEATURE_NAME(shader_float16_int8, shaderFloat16) \ - FEATURE_NAME(shader_float16_int8, shaderInt8) \ - FEATURE_NAME(timeline_semaphore, timelineSemaphore) \ - FEATURE_NAME(transform_feedback, transformFeedback) \ - FEATURE_NAME(uniform_buffer_standard_layout, uniformBufferStandardLayout) \ +#define FOR_EACH_VK_RECOMMENDED_FEATURE(FEATURE_NAME) \ + FEATURE_NAME(custom_border_color, customBorderColors) \ + FEATURE_NAME(depth_bias_control, depthBiasControl) \ + FEATURE_NAME(depth_bias_control, leastRepresentableValueForceUnormRepresentation) \ + FEATURE_NAME(depth_bias_control, depthBiasExact) \ + FEATURE_NAME(extended_dynamic_state, extendedDynamicState) \ + FEATURE_NAME(format_a4b4g4r4, formatA4B4G4R4) \ + FEATURE_NAME(index_type_uint8, indexTypeUint8) \ + FEATURE_NAME(primitive_topology_list_restart, primitiveTopologyListRestart) \ + FEATURE_NAME(provoking_vertex, provokingVertexLast) \ + FEATURE_NAME(robustness2, nullDescriptor) \ + FEATURE_NAME(robustness2, robustBufferAccess2) \ + FEATURE_NAME(robustness2, robustImageAccess2) \ + FEATURE_NAME(shader_float16_int8, shaderFloat16) \ + FEATURE_NAME(shader_float16_int8, shaderInt8) \ + FEATURE_NAME(timeline_semaphore, timelineSemaphore) \ + FEATURE_NAME(transform_feedback, transformFeedback) \ + FEATURE_NAME(uniform_buffer_standard_layout, uniformBufferStandardLayout) \ FEATURE_NAME(vertex_input_dynamic_state, vertexInputDynamicState) namespace Vulkan { diff --git a/src/yuzu/configuration/configure_graphics_extensions.cpp b/src/yuzu/configuration/configure_graphics_extensions.cpp index 6ac7948288..61491c0ab7 100644 --- a/src/yuzu/configuration/configure_graphics_extensions.cpp +++ b/src/yuzu/configuration/configure_graphics_extensions.cpp @@ -30,8 +30,7 @@ ConfigureGraphicsExtensions::~ConfigureGraphicsExtensions() = default; void ConfigureGraphicsExtensions::SetConfiguration() {} -void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& builder) -{ +void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& builder) { auto& layout = *ui->populate_target->layout(); std::map hold{}; // A map will sort the data for us @@ -52,8 +51,6 @@ void ConfigureGraphicsExtensions::Setup(const ConfigurationShared::Builder& buil if (setting->Id() == Settings::values.dyna_state.Id()) { widget->slider->setTickInterval(1); widget->slider->setTickPosition(QSlider::TicksAbove); - } else if (setting->Id() == Settings::values.vertex_input.Id()) { - // widget->checkbox->setDisabled(true); } } diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index ead67a46d0..da87850fae 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -234,23 +234,13 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { tr("Enables the VkExtendedDynamicState* extensions.\nHigher dynamic states will generally improve " "performance, but may cause issues on certain games or devices.")); - INSERT(Settings, - vertex_input, - tr("VertexInputDynamicState"), - tr("Enables the VkVertexInputDynamicState extension.\n" - "Only Vulkan 1.3+ devices support this extension, and will generally see improved " - "performance.")); - INSERT(Settings, provoking_vertex, tr("Provoking Vertex"), tr("Improves lighting and vertex handling in certain games.\n" "Only Vulkan 1.0+ devices support this extension.")); - INSERT(Settings, - descriptor_indexing, - tr("Descriptor Indexing"), + INSERT(Settings, descriptor_indexing, tr("Descriptor Indexing"), tr("Improves texture & buffer handling and the Maxwell translation layer.\n" - "Some Vulkan 1.1+ and all 1.2+ devices support this extension.\n" - "This extension is incomplete. Use with caution.")); + "Some Vulkan 1.1+ and all 1.2+ devices support this extension.")); // Renderer (Debug) From 244c07c999c509d05efd2ef9c56af3892f79d079 Mon Sep 17 00:00:00 2001 From: Aleksandr Popovich Date: Mon, 19 May 2025 21:28:51 +0000 Subject: [PATCH 18/26] Added option for software keyboard applet on android (#113) Signed-off-by: Aleksandr Popovich Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/113 Co-authored-by: Aleksandr Popovich Co-committed-by: Aleksandr Popovich --- .../features/settings/model/IntSetting.kt | 18 +++- .../features/settings/model/Settings.kt | 3 +- .../settings/model/view/SettingsItem.kt | 10 ++ .../settings/ui/SettingsFragmentPresenter.kt | 102 ++++-------------- .../app/src/main/res/values/arrays.xml | 27 +++-- .../app/src/main/res/values/strings.xml | 9 ++ 6 files changed, 74 insertions(+), 95 deletions(-) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt index 035a33a762..c56d44ee9f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt @@ -33,7 +33,23 @@ enum class IntSetting(override val key: String) : AbstractIntSetting { LOCK_DRAWER("lock_drawer"), VERTICAL_ALIGNMENT("vertical_alignment"), PERF_OVERLAY_POSITION("perf_overlay_position"), - FSR_SHARPENING_SLIDER("fsr_sharpening_slider"); + FSR_SHARPENING_SLIDER("fsr_sharpening_slider"), + CABINET_APPLET("cabinet_applet_mode"), + CONTROLLER_APPLET("controller_applet_mode"), + DATA_ERASE_APPLET("data_erase_applet_mode"), + ERROR_APPLET("error_applet_mode"), + NET_CONNECT_APPLET("net_connect_applet_mode"), + PLAYER_SELECT_APPLET("player_select_applet"), + SWKBD_APPLET("swkbd_applet_mode"), + MII_EDIT_APPLET("mii_edit_applet_mode"), + WEB_APPLET("web_applet_mode"), + SHOP_APPLET("shop_applet_mode"), + PHOTO_VIEWER_APPLET("photo_viewer_applet_mode"), + OFFLINE_WEB_APPLET("offline_web_applet_mode"), + LOGIN_SHARE_APPLET("login_share_applet_mode"), + WIFI_WEB_AUTH_APPLET("wifi_web_auth_applet_mode"), + MY_PAGE_APPLET("my_page_applet_mode"), + ; override fun getInt(needsGlobal: Boolean): Int = NativeConfig.getInt(key, needsGlobal) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt index 299a192a13..f6879723fe 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt @@ -25,7 +25,8 @@ object Settings { SECTION_INPUT_PLAYER_EIGHT, SECTION_THEME(R.string.preferences_theme), SECTION_DEBUG(R.string.preferences_debug), - SECTION_EDEN_VEIL(R.string.eden_veil); + SECTION_EDEN_VEIL(R.string.eden_veil), + SECTION_APPLETS(R.string.applets_menu); } fun getPlayerString(player: Int): String = diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt index dfc17bff08..71fb11c671 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt @@ -579,6 +579,16 @@ abstract class SettingsItem( override fun reset() = setBoolean(defaultValue) } put(SwitchSetting(fastmem, R.string.fastmem)) + + // Applet Settings + put( + SingleChoiceSetting( + IntSetting.SWKBD_APPLET, + titleId = R.string.swkbd_applet, + choicesId = R.array.appletEntries, + valuesId = R.array.appletValues + ) + ) } } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index d91906d438..4fc1540d0e 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -88,7 +88,7 @@ class SettingsFragmentPresenter( MenuTag.SECTION_ROOT -> addConfigSettings(sl) MenuTag.SECTION_SYSTEM -> addSystemSettings(sl) MenuTag.SECTION_RENDERER -> addGraphicsSettings(sl) - MenuTag.SECTION_PERFORMANCE_STATS -> addPerfomanceOverlaySettings(sl) + MenuTag.SECTION_PERFORMANCE_STATS -> addPerformanceOverlaySettings(sl) MenuTag.SECTION_AUDIO -> addAudioSettings(sl) MenuTag.SECTION_INPUT -> addInputSettings(sl) MenuTag.SECTION_INPUT_PLAYER_ONE -> addInputPlayer(sl, 0) @@ -102,6 +102,7 @@ class SettingsFragmentPresenter( MenuTag.SECTION_THEME -> addThemeSettings(sl) MenuTag.SECTION_DEBUG -> addDebugSettings(sl) MenuTag.SECTION_EDEN_VEIL -> addEdenVeilSettings(sl) + MenuTag.SECTION_APPLETS -> addAppletSettings(sl) } settingsList = sl adapter.submitList(settingsList) { @@ -162,6 +163,14 @@ class SettingsFragmentPresenter( menuKey = MenuTag.SECTION_EDEN_VEIL ) ) + add( + SubmenuSetting( + titleId = R.string.applets_menu, + descriptionId = R.string.applets_menu_description, + iconId = R.drawable.ic_applet, + menuKey = MenuTag.SECTION_APPLETS + ) + ) add( RunnableSetting( titleId = R.string.reset_to_default, @@ -173,88 +182,6 @@ class SettingsFragmentPresenter( } } - private val InterpolationSetting = object : AbstractBooleanSetting { - override val key = BooleanSetting.FRAME_INTERPOLATION.key - - override fun getBoolean(needsGlobal: Boolean): Boolean { - return BooleanSetting.FRAME_INTERPOLATION.getBoolean(needsGlobal) - } - - override fun setBoolean(value: Boolean) { - BooleanSetting.FRAME_INTERPOLATION.setBoolean(value) - } - - override val defaultValue = BooleanSetting.FRAME_INTERPOLATION.defaultValue - - override fun getValueAsString(needsGlobal: Boolean): String = - BooleanSetting.FRAME_INTERPOLATION.getValueAsString(needsGlobal) - - override fun reset() = BooleanSetting.FRAME_INTERPOLATION.reset() - } - - private val syncCoreSpeedSetting = object : AbstractBooleanSetting { - override val key = BooleanSetting.CORE_SYNC_CORE_SPEED.key - - override fun getBoolean(needsGlobal: Boolean): Boolean { - return BooleanSetting.CORE_SYNC_CORE_SPEED.getBoolean(needsGlobal) - } - - override fun setBoolean(value: Boolean) { - BooleanSetting.CORE_SYNC_CORE_SPEED.setBoolean(value) - } - - override val defaultValue = BooleanSetting.CORE_SYNC_CORE_SPEED.defaultValue - - override fun getValueAsString(needsGlobal: Boolean): String = - BooleanSetting.CORE_SYNC_CORE_SPEED.getValueAsString(needsGlobal) - - override fun reset() = BooleanSetting.CORE_SYNC_CORE_SPEED.reset() - } - - private val frameSkippingSetting = object : AbstractBooleanSetting { - override val key = BooleanSetting.FRAME_SKIPPING.key - - override fun getBoolean(needsGlobal: Boolean): Boolean { - return BooleanSetting.FRAME_SKIPPING.getBoolean(needsGlobal) - } - - override fun setBoolean(value: Boolean) { - BooleanSetting.FRAME_SKIPPING.setBoolean(value) - } - - override val defaultValue = BooleanSetting.FRAME_SKIPPING.defaultValue - - override fun getValueAsString(needsGlobal: Boolean): String = - BooleanSetting.FRAME_SKIPPING.getValueAsString(needsGlobal) - - override fun reset() = BooleanSetting.FRAME_SKIPPING.reset() - } - - private fun addEdenVeilSubmenu(sl: ArrayList) { - sl.apply { - add( - SubmenuSetting( - titleId = R.string.eden_veil, - descriptionId = R.string.eden_veil_description, - iconId = R.drawable.ic_code, - menuKey = MenuTag.SECTION_EDEN_VEIL - ) - ) - addEdenVeilSettings(sl) - - add(BooleanSetting.FRAME_INTERPOLATION.key) - add(BooleanSetting.FRAME_SKIPPING.key) - add(BooleanSetting.CORE_SYNC_CORE_SPEED.key) - add(IntSetting.RENDERER_SHADER_BACKEND.key) - add(IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT.key) - add(IntSetting.RENDERER_NVDEC_EMULATION.key) - add(IntSetting.RENDERER_ASTC_DECODE_METHOD.key) - add(IntSetting.RENDERER_ASTC_RECOMPRESSION.key) - add(IntSetting.RENDERER_VRAM_USAGE_MODE.key) - add(BooleanSetting.USE_LRU_CACHE.key) - } - } - private fun addSystemSettings(sl: ArrayList) { sl.apply { add(StringSetting.DEVICE_NAME.key) @@ -288,7 +215,7 @@ class SettingsFragmentPresenter( } } - private fun addPerfomanceOverlaySettings(sl: ArrayList) { + private fun addPerformanceOverlaySettings(sl: ArrayList) { sl.apply { add(HeaderSetting(R.string.stats_overlay_customization)) add(BooleanSetting.SHOW_PERFORMANCE_OVERLAY.key) @@ -457,6 +384,7 @@ class SettingsFragmentPresenter( } } + // TODO(alekpop): sort these into headers. private fun addEdenVeilSettings(sl: ArrayList) { sl.apply { add(BooleanSetting.FRAME_INTERPOLATION.key) @@ -479,6 +407,12 @@ class SettingsFragmentPresenter( add(IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT.key) } } + + private fun addAppletSettings(sl: ArrayList) { + sl.apply { + add(IntSetting.SWKBD_APPLET.key) + } + } private fun addInputPlayer(sl: ArrayList, playerIndex: Int) { sl.apply { val connectedSetting = object : AbstractBooleanSetting { diff --git a/src/android/app/src/main/res/values/arrays.xml b/src/android/app/src/main/res/values/arrays.xml index cb108dc548..04779469cc 100644 --- a/src/android/app/src/main/res/values/arrays.xml +++ b/src/android/app/src/main/res/values/arrays.xml @@ -410,14 +410,23 @@ - @string/never - @string/on_load - @string/always - - - 0 - 1 - 2 - + @string/never + @string/on_load + @string/always + + + 0 + 1 + 2 + + + @string/applet_hle + @string/applet_lle + + + + 0 + 1 + diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index efb8178e68..6a143e1a27 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -859,6 +859,15 @@ Center Bottom + + Applets + (WIP) Change applet frontends and settings + + Custom Frontend + Real Applet + + Software Keyboard + Licenses FidelityFX-FSR From bc55ed496f48f8b9f5ecde3d6dfc35d03912ba2e Mon Sep 17 00:00:00 2001 From: Aleksandr Popovich Date: Mon, 19 May 2025 21:29:22 +0000 Subject: [PATCH 19/26] add option to censor the username in logs (#111) Signed-off-by: Aleksandr Popovich Co-authored-by: Esther1024 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/111 Co-authored-by: Aleksandr Popovich Co-committed-by: Aleksandr Popovich --- src/common/logging/backend.cpp | 18 ++++++++-- src/common/settings.h | 1 + src/yuzu/configuration/configure_debug.cpp | 2 ++ src/yuzu/configuration/configure_debug.ui | 39 +++++++++++++--------- 4 files changed, 42 insertions(+), 18 deletions(-) diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index e5bf6b723a..ff07ab68eb 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -4,8 +4,10 @@ #include #include #include +#include #include +#include #include #ifdef _WIN32 @@ -104,9 +106,21 @@ public: return; } - bytes_written += file->WriteString(FormatLogMessage(entry).append(1, '\n')); + auto message = FormatLogMessage(entry).append(1, '\n'); - // Option to log each line rather than 4k buffers +#ifndef ANDROID + if (Settings::values.censor_username.GetValue()) { + char* username = getenv("USER"); + if (!username) { + username = getenv("USERNAME"); + } + boost::replace_all(message, username, "user"); + } +#endif + + bytes_written += file->WriteString(message); + + // Option to log each line rather than 4k buffers if (Settings::values.log_flush_lines.GetValue()) { file->Flush(); } diff --git a/src/common/settings.h b/src/common/settings.h index 58044103f6..5e0efab8e6 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -633,6 +633,7 @@ struct Values { // Miscellaneous Setting log_filter{linkage, "*:Info", "log_filter", Category::Miscellaneous}; Setting log_flush_lines{linkage, false, "flush_lines", Category::Miscellaneous}; + Setting censor_username{linkage, true, "censor_username", Category::Miscellaneous}; Setting use_dev_keys{linkage, false, "use_dev_keys", Category::Miscellaneous}; Setting first_launch{linkage, true, "first_launch", Category::Miscellaneous}; Setting hide_pre_alpha_warning{linkage, diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index bcb8d1fc5e..10607ee233 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp @@ -40,6 +40,7 @@ void ConfigureDebug::SetConfiguration() { ui->toggle_console->setChecked(UISettings::values.show_console.GetValue()); ui->log_filter_edit->setText(QString::fromStdString(Settings::values.log_filter.GetValue())); ui->flush_line->setChecked(Settings::values.log_flush_lines.GetValue()); + ui->censor_username->setChecked(Settings::values.censor_username.GetValue()); ui->homebrew_args_edit->setText( QString::fromStdString(Settings::values.program_args.GetValue())); ui->fs_access_log->setEnabled(runtime_lock); @@ -90,6 +91,7 @@ void ConfigureDebug::ApplyConfiguration() { UISettings::values.show_console = ui->toggle_console->isChecked(); Settings::values.log_filter = ui->log_filter_edit->text().toStdString(); Settings::values.log_flush_lines = ui->flush_line->isChecked(); + Settings::values.censor_username = ui->censor_username->isChecked(); Settings::values.program_args = ui->homebrew_args_edit->text().toStdString(); Settings::values.enable_fs_access_log = ui->fs_access_log->isChecked(); Settings::values.reporting_services = ui->reporting_services->isChecked(); diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui index 3a54d93b7b..155dac412b 100644 --- a/src/yuzu/configuration/configure_debug.ui +++ b/src/yuzu/configuration/configure_debug.ui @@ -474,21 +474,7 @@ Debugging - - - - Enable Verbose Reporting Services** - - - - - - - Enable FS Access Log - - - - + Qt::Orientation::Vertical @@ -504,7 +490,7 @@ - + Enable this to output the latest generated audio command list to the console. Only affects games using the audio renderer. @@ -521,6 +507,27 @@ + + + + Enable FS Access Log + + + + + + + Enable Verbose Reporting Services** + + + + + + + Censor username in logs + + + From 1f8b8e0fa16fe9e254d31f06dde6984bbd75676f Mon Sep 17 00:00:00 2001 From: Aleksandr Popovich Date: Mon, 19 May 2025 21:30:10 +0000 Subject: [PATCH 20/26] remove solo executables (#106) also, fixes CI not targeting the right flag settings. this pr needs to add the room exe removal from lime3ds. Signed-off-by: Aleksandr Popovich Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/106 Co-authored-by: Aleksandr Popovich Co-committed-by: Aleksandr Popovich --- .ci/linux/build.sh | 5 +- .github/workflows/build.yml | 2 +- .github/workflows/trigger_release.yml | 2 +- CMakeLists.txt | 11 +- src/CMakeLists.txt | 137 +++++++++--------- src/dedicated_room/CMakeLists.txt | 8 +- src/dedicated_room/yuzu_room.cpp | 44 ++++-- src/dedicated_room/yuzu_room.h | 7 + src/yuzu/CMakeLists.txt | 4 + src/yuzu/main.cpp | 19 +++ src/yuzu_room_standalone/CMakeLists.txt | 11 ++ src/yuzu_room_standalone/main.cpp | 9 ++ .../yuzu_room_standalone.cpp | 10 ++ 13 files changed, 178 insertions(+), 91 deletions(-) create mode 100644 src/dedicated_room/yuzu_room.h create mode 100644 src/yuzu_room_standalone/CMakeLists.txt create mode 100644 src/yuzu_room_standalone/main.cpp create mode 100644 src/yuzu_room_standalone/yuzu_room_standalone.cpp diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh index c020cc7edd..70917aec6f 100755 --- a/.ci/linux/build.sh +++ b/.ci/linux/build.sh @@ -25,14 +25,13 @@ if [ -z "$NPROC" ]; then fi if [ "$TARGET" = "appimage" ]; then - # Compile the AppImage we distribute with Clang. - export EXTRA_CMAKE_FLAGS=(-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_LINKER=/etc/bin/ld.lld) + export EXTRA_CMAKE_FLAGS=(-DYUZU_CMD=OFF -DYUZU_ROOM_STANDALONE=OFF) # Bundle required QT wayland libraries export EXTRA_QT_PLUGINS="waylandcompositor" export EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" else # For the linux-fresh verification target, verify compilation without PCH as well. - export EXTRA_CMAKE_FLAGS=(-DCITRA_USE_PRECOMPILED_HEADERS=OFF) + export EXTRA_CMAKE_FLAGS=(-DYUZU_USE_PRECOMPILED_HEADERS=OFF) fi if [ "$GITHUB_REF_TYPE" == "tag" ]; then diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8d636c117..d90e424fe8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,7 +96,7 @@ jobs: fetch-tags: true - name: Build - run: ./.ci/linux/build.sh v3 8 + run: TARGET=appimage ./.ci/linux/build.sh v3 8 - name: Package AppImage run: ./.ci/linux/package.sh v3 &> /dev/null diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml index 5553884862..29d66c42d7 100644 --- a/.github/workflows/trigger_release.yml +++ b/.github/workflows/trigger_release.yml @@ -93,7 +93,7 @@ jobs: fetch-tags: true - name: Build - run: ./.ci/linux/build.sh v3 8 + run: TARGET=appimage ./.ci/linux/build.sh v3 8 - name: Package AppImage run: ./.ci/linux/package.sh v3 &> /dev/null diff --git a/CMakeLists.txt b/CMakeLists.txt index 40a9b9ee18..95fc803e30 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,11 @@ option(YUZU_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON) option(YUZU_DOWNLOAD_ANDROID_VVL "Download validation layer binary for android" ON) -CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Compile LDN room server" ON "NOT ANDROID" OFF) +CMAKE_DEPENDENT_OPTION(YUZU_ROOM "Enable dedicated room functionality" ON "NOT ANDROID" OFF) + +CMAKE_DEPENDENT_OPTION(YUZU_ROOM_STANDALONE "Enable standalone room executable" ON "YUZU_ROOM" OFF) + +CMAKE_DEPENDENT_OPTION(YUZU_CMD "Compile the eden-cli executable" ON "NOT ANDROID" OFF) CMAKE_DEPENDENT_OPTION(YUZU_CRASH_DUMPS "Compile crash dump (Minidump) support" OFF "WIN32 OR LINUX" OFF) @@ -285,6 +289,10 @@ if (ARCHITECTURE_arm64 AND (ANDROID OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")) add_definitions(-DHAS_NCE=1) endif() +if (YUZU_ROOM) + add_definitions(-DYUZU_ROOM) +endif() + # Configure C++ standard # =========================== @@ -396,7 +404,6 @@ endif() add_subdirectory(externals) - if (ENABLE_QT) if (NOT USE_SYSTEM_QT) download_qt(6.8.3) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 117a0e1265..4308534f12 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -88,26 +88,26 @@ if (MSVC) /wd4702 # unreachable code (when used with LTO) ) - if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS) +if (USE_CCACHE OR YUZU_USE_PRECOMPILED_HEADERS) # when caching, we need to use /Z7 to downgrade debug info to use an older but more cacheable format # Precompiled headers are deleted if not using /Z7. See https://github.com/nanoant/CMakePCHCompiler/issues/21 - add_compile_options(/Z7) - # Avoid D9025 warning - string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") - string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") - else() - add_compile_options(/Zi) - endif() + add_compile_options(/Z7) + # Avoid D9025 warning + string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") + string(REPLACE "/Zi" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") +else() + add_compile_options(/Zi) +endif() - if (ARCHITECTURE_x86_64) - add_compile_options(/QIntel-jcc-erratum) - endif() +if (ARCHITECTURE_x86_64) + add_compile_options(/QIntel-jcc-erratum) +endif() - # /GS- - No stack buffer overflow checks - add_compile_options("$<$:/GS->") +# /GS- - No stack buffer overflow checks +add_compile_options("$<$:/GS->") - set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE) - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE) +set(CMAKE_EXE_LINKER_FLAGS_DEBUG "/DEBUG /MANIFEST:NO" CACHE STRING "" FORCE) +set(CMAKE_EXE_LINKER_FLAGS_RELEASE "/DEBUG /MANIFEST:NO /INCREMENTAL:NO /OPT:REF,ICF" CACHE STRING "" FORCE) else() add_compile_options( -fwrapv @@ -124,63 +124,63 @@ else() -Wno-missing-field-initializers ) - if (CMAKE_CXX_COMPILER_ID MATCHES Clang) # Clang or AppleClang - add_compile_options( - -Wno-braced-scalar-init - -Wno-unused-private-field - -Wno-nullability-completeness - -Werror=shadow-uncaptured-local - -Werror=implicit-fallthrough - -Werror=type-limits - ) - endif() +if (CMAKE_CXX_COMPILER_ID MATCHES Clang) # Clang or AppleClang + add_compile_options( + -Wno-braced-scalar-init + -Wno-unused-private-field + -Wno-nullability-completeness + -Werror=shadow-uncaptured-local + -Werror=implicit-fallthrough + -Werror=type-limits + ) +endif() - if (ARCHITECTURE_x86_64) - add_compile_options("-mcx16") - endif() +if (ARCHITECTURE_x86_64) + add_compile_options("-mcx16") +endif() - if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang) - add_compile_options("-stdlib=libc++") - endif() +if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang) + add_compile_options("-stdlib=libc++") +endif() - # GCC bugs - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - # These diagnostics would be great if they worked, but are just completely broken - # and produce bogus errors on external libraries like fmt. - add_compile_options( - -Wno-array-bounds - -Wno-stringop-overread - -Wno-stringop-overflow - ) - endif() +# GCC bugs +if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # These diagnostics would be great if they worked, but are just completely broken + # and produce bogus errors on external libraries like fmt. + add_compile_options( + -Wno-array-bounds + -Wno-stringop-overread + -Wno-stringop-overflow + ) +endif() - # Set file offset size to 64 bits. - # - # On modern Unixes, this is typically already the case. The lone exception is - # glibc, which may default to 32 bits. glibc allows this to be configured - # by setting _FILE_OFFSET_BITS. - if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW) - add_definitions(-D_FILE_OFFSET_BITS=64) - endif() +# Set file offset size to 64 bits. +# +# On modern Unixes, this is typically already the case. The lone exception is +# glibc, which may default to 32 bits. glibc allows this to be configured +# by setting _FILE_OFFSET_BITS. +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW) + add_definitions(-D_FILE_OFFSET_BITS=64) +endif() - if (MINGW) - add_definitions(-DMINGW_HAS_SECURE_API) - add_compile_options("-msse4.1") +if (MINGW) + add_definitions(-DMINGW_HAS_SECURE_API) + add_compile_options("-msse4.1") - if (MINGW_STATIC_BUILD) - add_definitions(-DQT_STATICPLUGIN) - add_compile_options("-static") - endif() + if (MINGW_STATIC_BUILD) + add_definitions(-DQT_STATICPLUGIN) + add_compile_options("-static") endif() +endif() - if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW) - # GNU ar: Create thin archive files. - # Requires binutils-2.19 or later. - set(CMAKE_C_ARCHIVE_CREATE " qcTP ") - set(CMAKE_C_ARCHIVE_APPEND " qTP ") - set(CMAKE_CXX_ARCHIVE_CREATE " qcTP ") - set(CMAKE_CXX_ARCHIVE_APPEND " qTP ") - endif() +if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW) + # GNU ar: Create thin archive files. + # Requires binutils-2.19 or later. + set(CMAKE_C_ARCHIVE_CREATE " qcTP ") + set(CMAKE_C_ARCHIVE_APPEND " qTP ") + set(CMAKE_CXX_ARCHIVE_CREATE " qcTP ") + set(CMAKE_CXX_ARCHIVE_APPEND " qTP ") +endif() endif() add_subdirectory(common) @@ -194,18 +194,23 @@ add_subdirectory(frontend_common) add_subdirectory(shader_recompiler) if (YUZU_ROOM) - add_subdirectory(dedicated_room) + add_subdirectory(dedicated_room) endif() if (YUZU_TESTS) add_subdirectory(tests) endif() -if (ENABLE_SDL2) +if (ENABLE_SDL2 AND YUZU_CMD) add_subdirectory(yuzu_cmd) set_target_properties(yuzu-cmd PROPERTIES OUTPUT_NAME "eden-cli") endif() +if (YUZU_ROOM_STANDALONE) + add_subdirectory(yuzu_room_standalone) + set_target_properties(yuzu-room PROPERTIES OUTPUT_NAME "eden-room") +endif() + if (ENABLE_QT) add_subdirectory(yuzu) endif() diff --git a/src/dedicated_room/CMakeLists.txt b/src/dedicated_room/CMakeLists.txt index 56c7d9a54e..5ffe45be25 100644 --- a/src/dedicated_room/CMakeLists.txt +++ b/src/dedicated_room/CMakeLists.txt @@ -1,9 +1,13 @@ # SPDX-FileCopyrightText: 2017 Citra Emulator Project # SPDX-License-Identifier: GPL-2.0-or-later -add_executable(yuzu-room +# SPDX-FileCopyrightText: 2025 eden Emulator Project +# SPDX-License-Identifier: GPL-3.0-or-later + +add_library(yuzu-room STATIC EXCLUDE_FROM_ALL precompiled_headers.h yuzu_room.cpp + yuzu_room.h yuzu_room.rc ) @@ -27,6 +31,4 @@ if (YUZU_USE_PRECOMPILED_HEADERS) target_precompile_headers(yuzu-room PRIVATE precompiled_headers.h) endif() -set_target_properties(yuzu-room PROPERTIES OUTPUT_NAME "eden-room") - create_target_directory_groups(yuzu-room) diff --git a/src/dedicated_room/yuzu_room.cpp b/src/dedicated_room/yuzu_room.cpp index 7604cf4276..f02407780f 100644 --- a/src/dedicated_room/yuzu_room.cpp +++ b/src/dedicated_room/yuzu_room.cpp @@ -1,9 +1,11 @@ // SPDX-FileCopyrightText: Copyright 2017 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project / Eden Emulator Project +// SPDX-FileCopyrightText: Copyright yuzu/Citra Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later +// SPDX-FileCopyrightText: 2025 eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later #include #include @@ -47,6 +49,8 @@ #include #endif +#include "yuzu_room.h" + static void PrintHelp(const char* argv0) { LOG_INFO(Network, "Usage: {}" @@ -186,11 +190,17 @@ static void InitializeLogging(const std::string& log_file) { } /// Application entry point -int main(int argc, char** argv) { +void LaunchRoom(int argc, char** argv, bool called_by_option) +{ Common::DetachedTasks detached_tasks; int option_index = 0; char* endarg; + char* new_argv0 = argv[0]; + if (called_by_option) { + strncat(new_argv0, " --room", 8); + } + std::string room_name; std::string room_description; std::string password; @@ -205,6 +215,7 @@ int main(int argc, char** argv) { u32 port = Network::DefaultRoomPort; u32 max_members = 16; + // TODO(alekpop): Implement this into main executable, for --room and a few others. static struct option long_options[] = { {"room-name", required_argument, 0, 'n'}, {"room-description", required_argument, 0, 'd'}, @@ -222,14 +233,15 @@ int main(int argc, char** argv) { {"enable-yuzu-mods", no_argument, 0, 'e'}, {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'}, + // Entry option + {"room", 0, 0, 0}, {0, 0, 0, 0}, }; InitializeLogging(log_file); while (optind < argc) { - int arg = - getopt_long(argc, argv, "n:d:s:p:m:w:g:u:t:a:i:l:hv", long_options, &option_index); + int arg = getopt_long(argc, argv, "n:d:s:p:m:w:g:u:t:a:i:l:hv", long_options, &option_index); if (arg != -1) { switch (static_cast(arg)) { case 'n': @@ -273,10 +285,10 @@ int main(int argc, char** argv) { break; case 'h': PrintHelp(argv[0]); - return 0; + std::exit(0); case 'v': PrintVersion(); - return 0; + std::exit(0); } } } @@ -284,12 +296,12 @@ int main(int argc, char** argv) { if (room_name.empty()) { LOG_ERROR(Network, "Room name is empty!"); PrintHelp(argv[0]); - return -1; + std::exit(-1); } if (preferred_game.empty()) { LOG_ERROR(Network, "Preferred game is empty!"); PrintHelp(argv[0]); - return -1; + std::exit(-1); } if (preferred_game_id == 0) { LOG_ERROR(Network, @@ -297,10 +309,11 @@ int main(int argc, char** argv) { "room.\nSet with --preferred-game-id id"); } if (max_members > Network::MaxConcurrentConnections || max_members < 2) { - LOG_ERROR(Network, "max_members needs to be in the range 2 - {}!", + LOG_ERROR(Network, + "max_members needs to be in the range 2 - {}!", Network::MaxConcurrentConnections); PrintHelp(argv[0]); - return -1; + std::exit(-1); } if (bind_address.empty()) { LOG_INFO(Network, "Bind address is empty: defaulting to 0.0.0.0"); @@ -308,11 +321,12 @@ int main(int argc, char** argv) { if (port > UINT16_MAX) { LOG_ERROR(Network, "Port needs to be in the range 0 - 65535!"); PrintHelp(argv[0]); - return -1; + std::exit(-1); } if (ban_list_file.empty()) { - LOG_ERROR(Network, "Ban list file not set!\nThis should get set to load and save room ban " - "list.\nSet with --ban-list-file "); + LOG_ERROR(Network, + "Ban list file not set!\nThis should get set to load and save room ban " + "list.\nSet with --ban-list-file "); } bool announce = true; if (token.empty() && announce) { @@ -368,7 +382,7 @@ int main(int argc, char** argv) { password, max_members, username, preferred_game_info, std::move(verify_backend), ban_list)) { LOG_INFO(Network, "Failed to create room: "); - return -1; + std::exit(-1); } LOG_INFO(Network, "Room is open. Close with Q+Enter..."); auto announce_session = std::make_unique(network); @@ -395,5 +409,5 @@ int main(int argc, char** argv) { } network.Shutdown(); detached_tasks.WaitForAllTasks(); - return 0; + std::exit(0); } diff --git a/src/dedicated_room/yuzu_room.h b/src/dedicated_room/yuzu_room.h new file mode 100644 index 0000000000..4dbd4808bf --- /dev/null +++ b/src/dedicated_room/yuzu_room.h @@ -0,0 +1,7 @@ +// Copyright eden Emulator Project +// Licensed under GPLv3 or any later version +// Refer to the license.txt file included. + +#pragma once + +void LaunchRoom(int argc, char** argv, bool called_by_option); diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 83ca3307fc..d5ef48de96 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -484,4 +484,8 @@ if (YUZU_USE_PRECOMPILED_HEADERS) target_precompile_headers(yuzu PRIVATE precompiled_headers.h) endif() +if (YUZU_ROOM) + target_link_libraries(yuzu PRIVATE yuzu-room) +endif() + create_target_directory_groups(yuzu) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 450d340580..928e42df59 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -52,6 +52,10 @@ #include "yuzu/multiplayer/state.h" #include "yuzu/util/controller_navigation.h" +#ifdef YUZU_ROOM +#include "dedicated_room/yuzu_room.h" +#endif + // These are wrappers to avoid the calls to CreateDirectory and CreateFile because of the Windows // defines. static FileSys::VirtualDir VfsFilesystemCreateDirectoryWrapper( @@ -5457,6 +5461,20 @@ static void SetHighDPIAttributes() { } int main(int argc, char* argv[]) { +#if YUZU_ROOM + bool launch_room = false; + for (int i = 1; i < argc; i++) { + if (strcmp(argv[i], "--room") == 0) { + launch_room = true; + } + } + + if (launch_room) { + LaunchRoom(argc, argv, true); + return 0; + } +#endif + bool has_broken_vulkan = false; bool is_child = false; if (CheckEnvVars(&is_child)) { @@ -5521,6 +5539,7 @@ int main(int argc, char* argv[]) { QApplication app(argc, argv); + #ifdef _WIN32 OverrideWindowsFont(); #endif diff --git a/src/yuzu_room_standalone/CMakeLists.txt b/src/yuzu_room_standalone/CMakeLists.txt new file mode 100644 index 0000000000..a0e688d4a8 --- /dev/null +++ b/src/yuzu_room_standalone/CMakeLists.txt @@ -0,0 +1,11 @@ +add_executable(yuzu_room_standalone + yuzu_room_standalone.cpp +) + +set_target_properties(yuzu_room_standalone PROPERTIES OUTPUT_NAME "eden-room") + +target_link_libraries(yuzu_room_standalone PRIVATE yuzu-room) + +if(UNIX AND NOT APPLE) + install(TARGETS yuzu_room_standalone RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") +endif() diff --git a/src/yuzu_room_standalone/main.cpp b/src/yuzu_room_standalone/main.cpp new file mode 100644 index 0000000000..3129fb9dd9 --- /dev/null +++ b/src/yuzu_room_standalone/main.cpp @@ -0,0 +1,9 @@ +#include + +using namespace std; + +int main() +{ + cout << "Hello World!" << endl; + return 0; +} diff --git a/src/yuzu_room_standalone/yuzu_room_standalone.cpp b/src/yuzu_room_standalone/yuzu_room_standalone.cpp new file mode 100644 index 0000000000..719e8dda3c --- /dev/null +++ b/src/yuzu_room_standalone/yuzu_room_standalone.cpp @@ -0,0 +1,10 @@ +// Copyright eden Emulator Project +// Licensed under GPLv3 or any later version +// Refer to the license.txt file included. + +#include "dedicated_room/yuzu_room.h" + +int main(int argc, char* argv[]) +{ + LaunchRoom(argc, argv, false); +} From 1b2bccf51f601d96dc1cfd808e7204f04e7c311b Mon Sep 17 00:00:00 2001 From: MaranBr Date: Tue, 20 May 2025 15:57:19 -0400 Subject: [PATCH 21/26] Improves Externals, CI, CMake and Qt handling --- .ci/linux/build.sh | 30 +- .ci/linux/eden.dwfsprof | 385 +++++++++--------- .ci/linux/package.sh | 24 +- .ci/windows/build-bqt.bat | 23 +- .ci/windows/build.bat | 17 +- .ci/windows/package.ps1 | 24 +- CMakeLists.txt | 24 +- CMakeModules/DownloadExternals.cmake | 4 +- ...org.yuzu_emu.yuzu.desktop => eden.desktop} | 2 +- ...mu.yuzu.metainfo.xml => eden.metainfo.xml} | 0 dist/{org.yuzu_emu.yuzu.xml => eden.xml} | 0 src/yuzu/CMakeLists.txt | 8 +- 12 files changed, 266 insertions(+), 275 deletions(-) rename dist/{org.yuzu_emu.yuzu.desktop => eden.desktop} (94%) rename dist/{org.yuzu_emu.yuzu.metainfo.xml => eden.metainfo.xml} (100%) rename dist/{org.yuzu_emu.yuzu.xml => eden.xml} (100%) diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh index 70917aec6f..4567cca816 100755 --- a/.ci/linux/build.sh +++ b/.ci/linux/build.sh @@ -25,7 +25,7 @@ if [ -z "$NPROC" ]; then fi if [ "$TARGET" = "appimage" ]; then - export EXTRA_CMAKE_FLAGS=(-DYUZU_CMD=OFF -DYUZU_ROOM_STANDALONE=OFF) + export EXTRA_CMAKE_FLAGS=(-DCMAKE_INSTALL_PREFIX=/usr) # Bundle required QT wayland libraries export EXTRA_QT_PLUGINS="waylandcompositor" export EXTRA_PLATFORM_PLUGINS="libqwayland-egl.so;libqwayland-generic.so" @@ -34,35 +34,37 @@ else export EXTRA_CMAKE_FLAGS=(-DYUZU_USE_PRECOMPILED_HEADERS=OFF) fi -if [ "$GITHUB_REF_TYPE" == "tag" ]; then - export EXTRA_CMAKE_FLAGS=($EXTRA_CMAKE_FLAGS -DENABLE_QT_UPDATE_CHECKER=ON) -fi +# TODO(crueter): update checker +# if [ "$GITHUB_REF_TYPE" == "tag" ]; then +# export EXTRA_CMAKE_FLAGS=($EXTRA_CMAKE_FLAGS -DENABLE_QT_UPDATE_CHECKER=ON) +# fi mkdir -p build && cd build cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -DENABLE_QT_TRANSLATION=ON \ + -DENABLE_QT_TRANSLATION=ON \ -DUSE_DISCORD_PRESENCE=ON \ - -DUSE_CCACHE=ON \ -DCMAKE_CXX_FLAGS="$ARCH_FLAGS" \ -DCMAKE_C_FLAGS="$ARCH_FLAGS" \ -DYUZU_USE_BUNDLED_VCPKG=OFF \ -DYUZU_USE_BUNDLED_QT=OFF \ - -DUSE_SYSTEM_QT=ON \ -DYUZU_USE_BUNDLED_FFMPEG=OFF \ -DYUZU_USE_BUNDLED_SDL2=OFF \ -DYUZU_USE_EXTERNAL_SDL2=ON \ -DYUZU_TESTS=OFF \ +<<<<<<< HEAD -DYUZU_USE_LLVM_DEMANGLE=OFF \ -DYUZU_USE_QT_MULTIMEDIA=OFF \ -DYUZU_USE_QT_WEB_ENGINE=OFF \ -DENABLE_QT_TRANSLATION=ON \ -DUSE_DISCORD_PRESENCE=OFF \ -DYUZU_USE_FASTER_LD=OFF \ +======= + -DYUZU_USE_QT_MULTIMEDIA=ON \ + -DYUZU_USE_QT_WEB_ENGINE=ON \ + -DYUZU_USE_FASTER_LD=ON \ +>>>>>>> cmake-qt-fix -DYUZU_ENABLE_LTO=ON \ - -DCMAKE_LINKER=/usr/bin/mold \ "${EXTRA_CMAKE_FLAGS[@]}" ninja -j${NPROC} @@ -72,11 +74,3 @@ if [ -d "bin/Release" ]; then else strip -s bin/* fi - -if [ "$TARGET" = "appimage" ]; then - ccache -s -else - ccache -s -v -fi - -#ctest -VV -C Release diff --git a/.ci/linux/eden.dwfsprof b/.ci/linux/eden.dwfsprof index 377d5fec89..bc360f0d46 100644 --- a/.ci/linux/eden.dwfsprof +++ b/.ci/linux/eden.dwfsprof @@ -1,219 +1,150 @@ AppRun +eden.desktop org.eden_emu.eden.desktop -bin/eden +shared/bin/eden shared/lib/lib.path shared/lib/ld-linux-x86-64.so.2 -shared/lib/libQt6Widgets.so.6.9.0 -shared/lib/libQt6Network.so.6.9.0 -shared/lib/libusb-1.0.so.0.5.0 -shared/lib/libenet.so.7.0.6 -shared/lib/libbrotlicommon.so.1.1.0 -shared/lib/libbrotlienc.so.1.1.0 -shared/lib/libbrotlidec.so.1.1.0 -shared/lib/libz.so.1.3.1 +shared/lib/libQt6Widgets.so.6.4.2 +shared/lib/libQt6DBus.so.6.4.2 +shared/lib/libudev.so.1.7.5 +shared/lib/libbrotlienc.so.1.0.9 +shared/lib/libbrotlidec.so.1.0.9 shared/lib/libssl.so.3 shared/lib/libcrypto.so.3 -shared/lib/libavcodec.so.61.19.100 -shared/lib/libavdevice.so.61.3.100 -shared/lib/libavfilter.so.10.4.100 -shared/lib/libavformat.so.61.7.100 -shared/lib/libavutil.so.59.39.100 -shared/lib/libswresample.so.5.3.100 -shared/lib/libswscale.so.8.3.100 -shared/lib/libva.so.2.2200.0 -shared/lib/libboost_context.so.1.87.0 -shared/lib/liblz4.so.1.10.0 -shared/lib/libzstd.so.1.5.7 -shared/lib/libSDL2-2.0.so.0.3200.54 -shared/lib/libfmt.so.11.1.4 -shared/lib/libopus.so.0.10.1 -shared/lib/libQt6Gui.so.6.9.0 -shared/lib/libQt6DBus.so.6.9.0 -shared/lib/libGLX.so.0.0.0 -shared/lib/libOpenGL.so.0.0.0 -shared/lib/libQt6Core.so.6.9.0 -shared/lib/libstdc++.so.6.0.33 +shared/lib/libavcodec.so.59.37.100 +shared/lib/libavutil.so.57.28.100 +shared/lib/libQt6Gui.so.6.4.2 +shared/lib/libQt6Core.so.6.4.2 +shared/lib/libstdc++.so.6.0.30 shared/lib/libm.so.6 shared/lib/libgcc_s.so.1 shared/lib/libc.so.6 -shared/lib/libgssapi_krb5.so.2.2 -shared/lib/libproxy.so.0.5.9 -shared/lib/libudev.so.1.7.10 -shared/lib/libvpx.so.9.1.0 -shared/lib/libwebpmux.so.3.1.1 -shared/lib/liblzma.so.5.8.1 -shared/lib/libdav1d.so.7.0.0 -shared/lib/libopencore-amrwb.so.0.0.5 -shared/lib/librsvg-2.so.2.60.0 -shared/lib/libcairo.so.2.11804.4 -shared/lib/libgobject-2.0.so.0.8400.1 -shared/lib/libglib-2.0.so.0.8400.1 -shared/lib/libsnappy.so.1.2.2 -shared/lib/libaom.so.3.12.0 -shared/lib/libgsm.so.1.0.22 -shared/lib/libjxl.so.0.11.1 -shared/lib/libjxl_threads.so.0.11.1 +shared/lib/libdbus-1.so.3.32.4 +shared/lib/libbrotlicommon.so.1.0.9 +shared/lib/libswresample.so.4.7.100 +shared/lib/libvpx.so.7.1.0 +shared/lib/libwebpmux.so.3.0.10 +shared/lib/libwebp.so.7.1.5 +shared/lib/liblzma.so.5.4.1 +shared/lib/libdav1d.so.6.6.0 +shared/lib/librsvg-2.so.2.48.0 +shared/lib/libgobject-2.0.so.0.7400.6 +shared/lib/libglib-2.0.so.0.7400.6 +shared/lib/libcairo.so.2.11600.0 +shared/lib/libzvbi.so.0.13.2 +shared/lib/libz.so.1.2.13 +shared/lib/libsnappy.so.1.1.9 +shared/lib/libaom.so.3.6.0 +shared/lib/libcodec2.so.1.0 +shared/lib/libgsm.so.1.0.19 +shared/lib/libjxl.so.0.7.0 +shared/lib/libjxl_threads.so.0.7.0 shared/lib/libmp3lame.so.0.0.0 -shared/lib/libopencore-amrnb.so.0.0.5 -shared/lib/libopenjp2.so.2.5.3 +shared/lib/libopenjp2.so.2.5.0 +shared/lib/libopus.so.0.8.0 +shared/lib/librav1e.so.0.5.1 +shared/lib/libshine.so.3.0.1 shared/lib/libspeex.so.1.5.2 +shared/lib/libSvtAv1Enc.so.1.4.1 shared/lib/libtheoraenc.so.1.1.2 shared/lib/libtheoradec.so.1.1.4 +shared/lib/libtwolame.so.0.0.0 shared/lib/libvorbis.so.0.4.9 shared/lib/libvorbisenc.so.2.0.12 -shared/lib/libwebp.so.7.1.10 shared/lib/libx264.so.164 +shared/lib/libx265.so.199 shared/lib/libxvidcore.so.4.3 -shared/lib/libvpl.so.2.14 -shared/lib/libraw1394.so.11.1.0 -shared/lib/libavc1394.so.0.3.0 -shared/lib/librom1394.so.0.3.0 -shared/lib/libiec61883.so.0.1.1 -shared/lib/libjack.so.0.1.0 -shared/lib/libdrm.so.2.124.0 -shared/lib/libxcb.so.1.1.0 -shared/lib/libxcb-shm.so.0.0.0 -shared/lib/libxcb-shape.so.0.0.0 -shared/lib/libxcb-xfixes.so.0.0.0 -shared/lib/libasound.so.2.0.0 -shared/lib/libGL.so.1.7.0 -shared/lib/libpulse.so.0.24.3 -shared/lib/libv4l2.so.0.0.0 -shared/lib/libXv.so.1.0.0 -shared/lib/libX11.so.6.4.0 -shared/lib/libXext.so.6.4.0 -shared/lib/libpostproc.so.58.3.100 -shared/lib/libbs2b.so.0.0.0 -shared/lib/librubberband.so.3.0.0 -shared/lib/libharfbuzz.so.0.61101.0 -shared/lib/libfribidi.so.0.4.0 -shared/lib/libplacebo.so.349 -shared/lib/libvmaf.so.3.0.0 -shared/lib/libass.so.9.3.1 -shared/lib/libvidstab.so.1.2 -shared/lib/libzmq.so.5.2.5 -shared/lib/libzimg.so.2.0.0 -shared/lib/libglslang.so.15.2.0 -shared/lib/libOpenCL.so.1.0.0 -shared/lib/libfontconfig.so.1.15.0 -shared/lib/libfreetype.so.6.20.2 -shared/lib/libdvdnav.so.4.3.0 -shared/lib/libdvdread.so.8.0.0 -shared/lib/libxml2.so.2.13.5 -shared/lib/libbz2.so.1.0.8 -shared/lib/libmodplug.so.1.0.0 -shared/lib/libopenmpt.so.0.4.4 -shared/lib/libbluray.so.2.4.3 -shared/lib/libgmp.so.10.5.0 -shared/lib/libgnutls.so.30.40.3 -shared/lib/libsrt.so.1.5.4 -shared/lib/libssh.so.4.10.1 -shared/lib/libva-drm.so.2.2200.0 -shared/lib/libva-x11.so.2.2200.0 +shared/lib/libva.so.2.1700.0 +shared/lib/libmfx.so.1.35 +shared/lib/libva-drm.so.2.1700.0 +shared/lib/libva-x11.so.2.1700.0 shared/lib/libvdpau.so.1.0.0 -shared/lib/libsoxr.so.0.1.2 +shared/lib/libX11.so.6.4.0 +shared/lib/libdrm.so.2.4.0 +shared/lib/libOpenCL.so.1.0.0 shared/lib/libEGL.so.1.1.0 -shared/lib/libxkbcommon.so.0.8.1 -shared/lib/libpng16.so.16.47.0 -shared/lib/libmd4c.so.0.5.2 -shared/lib/libdbus-1.so.3.38.3 -shared/lib/libGLdispatch.so.0.0.0 -shared/lib/libdouble-conversion.so.3.3.0 +shared/lib/libfontconfig.so.1.12.0 +shared/lib/libxkbcommon.so.0.0.0 +shared/lib/libGLX.so.0.0.0 +shared/lib/libOpenGL.so.0.0.0 +shared/lib/libpng16.so.16.39.0 +shared/lib/libharfbuzz.so.0.60000.0 +shared/lib/libmd4c.so.0.4.8 +shared/lib/libfreetype.so.6.18.3 +shared/lib/libicui18n.so.72.1 +shared/lib/libicuuc.so.72.1 +shared/lib/libdouble-conversion.so.3.1 shared/lib/libb2.so.1.0.4 -shared/lib/libpcre2-16.so.0.14.0 -shared/lib/libkrb5.so.3.3 -shared/lib/libk5crypto.so.3.1 -shared/lib/libcom_err.so.2.1 -shared/lib/libkrb5support.so.0.1 -shared/lib/libkeyutils.so.1.10 -shared/lib/libresolv.so.2 -shared/lib/libproxy/libpxbackend-1.0.so -shared/lib/libcap.so.2.75 -shared/lib/libgio-2.0.so.0.8400.1 -shared/lib/libgdk_pixbuf-2.0.so.0.4200.12 -shared/lib/libpangocairo-1.0.so.0.5600.3 -shared/lib/libpango-1.0.so.0.5600.3 -shared/lib/libXrender.so.1.3.0 +shared/lib/libpcre2-16.so.0.11.2 +shared/lib/libzstd.so.1.5.4 +shared/lib/libsystemd.so.0.35.0 +shared/lib/libsoxr.so.0.1.2 +shared/lib/libcairo-gobject.so.2.11600.0 +shared/lib/libgdk_pixbuf-2.0.so.0.4200.10 +shared/lib/libgio-2.0.so.0.7400.6 +shared/lib/libxml2.so.2.9.14 +shared/lib/libpangocairo-1.0.so.0.5000.12 +shared/lib/libpango-1.0.so.0.5000.12 +shared/lib/libffi.so.8.1.2 +shared/lib/libpcre2-8.so.0.11.2 +shared/lib/libpixman-1.so.0.42.2 +shared/lib/libxcb-shm.so.0.0.0 +shared/lib/libxcb.so.1.1.0 shared/lib/libxcb-render.so.0.0.0 -shared/lib/libpixman-1.so.0.44.2 -shared/lib/libffi.so.8.1.4 -shared/lib/libpcre2-8.so.0.14.0 -shared/lib/libjxl_cms.so.0.11.1 -shared/lib/libhwy.so.1.2.0 +shared/lib/libXrender.so.1.3.0 +shared/lib/libXext.so.6.4.0 +shared/lib/libhwy.so.1.0.3 +shared/lib/liblcms2.so.2.0.14 shared/lib/libogg.so.0.8.5 -shared/lib/libsharpyuv.so.0.1.1 -shared/lib/libdb-5.3.so -shared/lib/libXau.so.6.0.0 -shared/lib/libXdmcp.so.6.0.0 -shared/lib/pulseaudio/libpulsecommon-17.0.so -shared/lib/libv4lconvert.so.0.0.0 -shared/lib/libfftw3.so.3.6.10 -shared/lib/libsamplerate.so.0.2.2 -shared/lib/libgraphite2.so.3.2.1 -shared/lib/libunwind.so.8.1.0 -shared/lib/libshaderc_shared.so.1 -shared/lib/libglslang-default-resource-limits.so.15.2.0 -shared/lib/libvulkan.so.1.4.309 -shared/lib/liblcms2.so.2.0.17 -shared/lib/libdovi.so.3.3.1 -shared/lib/libunibreak.so.6.0.1 -shared/lib/libgomp.so.1.0.0 -shared/lib/libsodium.so.26.2.0 -shared/lib/libpgm-5.3.so.0.0.128 -shared/lib/libSPIRV-Tools-opt.so -shared/lib/libSPIRV-Tools.so -shared/lib/libexpat.so.1.10.2 -shared/lib/libmpg123.so.0.48.3 -shared/lib/libvorbisfile.so.3.3.8 -shared/lib/libleancrypto.so.1 -shared/lib/libp11-kit.so.0.4.1 -shared/lib/libidn2.so.0.4.0 -shared/lib/libunistring.so.5.2.0 -shared/lib/libtasn1.so.6.6.4 -shared/lib/libhogweed.so.6.10 -shared/lib/libnettle.so.8.10 +shared/lib/libnuma.so.1.0.0 +shared/lib/libpthread.so.0 shared/lib/libXfixes.so.3.1.0 shared/lib/libX11-xcb.so.1.0.0 shared/lib/libxcb-dri3.so.0.1.0 -shared/lib/libsystemd.so.0.40.0 -shared/lib/libcurl.so.4.8.0 -shared/lib/libduktape.so.207.20700 -shared/lib/libgmodule-2.0.so.0.8400.1 +shared/lib/libGLdispatch.so.0.0.0 +shared/lib/libexpat.so.1.8.10 +shared/lib/libgraphite2.so.3.2.1 +shared/lib/libicudata.so.72.1 +shared/lib/libgomp.so.1.0.0 +shared/lib/libcap.so.2.66 +shared/lib/libgcrypt.so.20.4.1 +shared/lib/liblz4.so.1.9.4 +shared/lib/libgmodule-2.0.so.0.7400.6 +shared/lib/libjpeg.so.62.3.0 shared/lib/libmount.so.1.1.0 -shared/lib/libjpeg.so.8.3.2 -shared/lib/libtiff.so.6.1.0 -shared/lib/libpangoft2-1.0.so.0.5600.3 +shared/lib/libselinux.so.1 +shared/lib/libpangoft2-1.0.so.0.5000.12 +shared/lib/libfribidi.so.0.4.0 shared/lib/libthai.so.0.3.1 -shared/lib/libsndfile.so.1.0.37 -shared/lib/libasyncns.so.0.3.1 -shared/lib/libnghttp3.so.9.2.6 -shared/lib/libnghttp2.so.14.28.4 -shared/lib/libssh2.so.1.0.1 -shared/lib/libpsl.so.5.3.5 +shared/lib/libXau.so.6.0.0 +shared/lib/libXdmcp.so.6.0.0 +shared/lib/libgpg-error.so.0.33.1 shared/lib/libblkid.so.1.1.0 -shared/lib/libjbig.so.2.1 shared/lib/libdatrie.so.1.4.0 -shared/lib/libFLAC.so.14.0.0 -shared/lib/libSDL3.so.0.2.10 +shared/lib/libbsd.so.0.11.7 +shared/lib/libmd.so.0.0.5 +shared/lib/libvulkan.so.1.3.239 share/vulkan/icd.d/intel_hasvk_icd.x86_64.json shared/lib/libvulkan_intel_hasvk.so +shared/lib/libwayland-client.so.0.21.0 shared/lib/libxcb-present.so.0.0.0 +shared/lib/libxcb-xfixes.so.0.0.0 shared/lib/libxcb-sync.so.1.0.0 shared/lib/libxcb-randr.so.0.1.0 shared/lib/libxshmfence.so.1.0.0 -shared/lib/libxcb-keysyms.so.1.0.0 -shared/lib/libwayland-client.so.0.23.1 share/vulkan/icd.d/intel_icd.x86_64.json shared/lib/libvulkan_intel.so -share/vulkan/icd.d/nouveau_icd.x86_64.json -shared/lib/libvulkan_nouveau.so +share/vulkan/icd.d/lvp_icd.x86_64.json +shared/lib/libvulkan_lvp.so +shared/lib/libLLVM-15.so.1 +shared/lib/libedit.so.2.0.70 +shared/lib/libz3.so.4 +shared/lib/libtinfo.so.6.4 share/vulkan/icd.d/radeon_icd.x86_64.json shared/lib/libvulkan_radeon.so -shared/lib/libLLVM.so.19.1 -shared/lib/libelf-0.192.so -shared/lib/libdrm_amdgpu.so.1.124.0 -shared/lib/libedit.so.0.0.75 -shared/lib/libncursesw.so.6.5 +shared/lib/libdrm_amdgpu.so.1.0.0 +shared/lib/libelf-0.188.so +shared/lib/libVkLayer_MESA_device_select.so bin/qt.conf shared/lib/qt6/plugins/platforms/libqeglfs.so shared/lib/qt6/plugins/platforms/libqlinuxfb.so @@ -225,29 +156,57 @@ shared/lib/qt6/plugins/platforms/libqvnc.so shared/lib/qt6/plugins/platforms/libqwayland-egl.so shared/lib/qt6/plugins/platforms/libqwayland-generic.so shared/lib/qt6/plugins/platforms/libqxcb.so -shared/lib/libQt6XcbQpa.so.6.9.0 -shared/lib/libxcb-cursor.so.0.0.0 -shared/lib/libxcb-icccm.so.4.0.0 -shared/lib/libxcb-image.so.0.0.0 -shared/lib/libxcb-render-util.so.0.0.0 -shared/lib/libxcb-xkb.so.1.0.0 -shared/lib/libSM.so.6.0.1 -shared/lib/libICE.so.6.3.0 -shared/lib/libxcb-xinput.so.0.1.0 -shared/lib/libxkbcommon-x11.so.0.8.1 -shared/lib/libxcb-util.so.1.0.0 -shared/lib/libuuid.so.1.3.0 +shared/lib/libQt6WaylandClient.so.6.4.2 +shared/lib/libwayland-cursor.so.0.21.0 shared/lib/qt6/plugins/platformthemes/libqgtk3.so -shared/lib/qt6/plugins/platformthemes/libqt6ct.so -shared/lib/qt6/plugins/platformthemes/libqxdgdesktopportal.so -shared/lib/libqt6ct-common.so.0.10 -etc/fonts/fonts.conf +shared/lib/libgtk-3.so.0.2406.32 +shared/lib/libgdk-3.so.0.2406.32 +shared/lib/libatk-1.0.so.0.24609.1 +shared/lib/libepoxy.so.0.0.0 shared/lib/libXi.so.6.1.0 -shared/lib/libwayland-cursor.so.0.23.1 -shared/lib/libwayland-egl.so.1.23.1 +shared/lib/libatk-bridge-2.0.so.0.0.0 +shared/lib/libwayland-egl.so.1.21.0 shared/lib/libXcursor.so.1.0.2 +shared/lib/libXdamage.so.1.1.0 +shared/lib/libXcomposite.so.1.0.0 shared/lib/libXrandr.so.2.2.0 -shared/lib/qt6/plugins/styles/libqt6ct-style.so +shared/lib/libXinerama.so.1.0.0 +shared/lib/libdl.so.2 +shared/lib/libatspi.so.0.0.1 +share/glib-2.0/schemas/gschemas.compiled +shared/lib/gio/modules/giomodule.cache +shared/lib/gio/modules/libdconfsettings.so +shared/lib/gio/modules/libgvfsdbus.so +shared/lib/gvfs/libgvfscommon.so +share/X11/xkb/rules/evdev +share/X11/xkb/keycodes/evdev +share/X11/xkb/keycodes/aliases +share/X11/xkb/types/complete +share/X11/xkb/types/basic +share/X11/xkb/types/mousekeys +share/X11/xkb/types/pc +share/X11/xkb/types/iso9995 +share/X11/xkb/types/level5 +share/X11/xkb/types/extra +share/X11/xkb/types/numpad +share/X11/xkb/compat/complete +share/X11/xkb/compat/basic +share/X11/xkb/compat/ledcaps +share/X11/xkb/compat/lednum +share/X11/xkb/compat/iso9995 +share/X11/xkb/compat/mousekeys +share/X11/xkb/compat/accessx +share/X11/xkb/compat/misc +share/X11/xkb/compat/ledscroll +share/X11/xkb/compat/xfree86 +share/X11/xkb/compat/level5 +share/X11/xkb/compat/caps +share/X11/xkb/symbols/pc +share/X11/xkb/symbols/srvr_ctrl +share/X11/xkb/symbols/keypad +share/X11/xkb/symbols/altwin +share/X11/xkb/symbols/us +share/X11/xkb/symbols/inet shared/lib/qt6/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so shared/lib/qt6/plugins/platforminputcontexts/libibusplatforminputcontextplugin.so shared/lib/qt6/plugins/iconengines/libqsvgicon.so @@ -255,5 +214,37 @@ shared/lib/qt6/plugins/imageformats/libqgif.so shared/lib/qt6/plugins/imageformats/libqico.so shared/lib/qt6/plugins/imageformats/libqjpeg.so shared/lib/qt6/plugins/imageformats/libqsvg.so -shared/lib/libQt6Svg.so.6.9.0 +shared/lib/libQt6Svg.so.6.4.2 +etc/fonts/fonts.conf +shared/lib/qt6/plugins/wayland-shell-integration/libfullscreen-shell-v1.so +shared/lib/qt6/plugins/wayland-shell-integration/libivi-shell.so +shared/lib/qt6/plugins/wayland-shell-integration/libqt-shell.so +shared/lib/qt6/plugins/wayland-shell-integration/libwl-shell-plugin.so +shared/lib/qt6/plugins/wayland-shell-integration/libxdg-shell.so +shared/lib/qt6/plugins/wayland-graphics-integration-client/libdmabuf-server.so +shared/lib/qt6/plugins/wayland-graphics-integration-client/libdrm-egl-server.so +shared/lib/qt6/plugins/wayland-graphics-integration-client/libqt-plugin-wayland-egl.so +shared/lib/qt6/plugins/wayland-graphics-integration-client/libshm-emulation-server.so +shared/lib/qt6/plugins/wayland-graphics-integration-client/libvulkan-server.so +shared/lib/libQt6WaylandEglClientHwIntegration.so.6.4.2 +shared/lib/libQt6OpenGL.so.6.4.2 +share/glvnd/egl_vendor.d/50_mesa.json +shared/lib/libEGL_mesa.so.0.0.0 +shared/lib/libgbm.so.1.0.0 +shared/lib/libglapi.so.0.0.0 +shared/lib/libxcb-dri2.so.0.0.0 +shared/lib/libwayland-server.so.0.21.0 +shared/lib/dri/swrast_dri.so +shared/lib/libsensors.so.5.0.0 +shared/lib/libdrm_radeon.so.1.0.1 +shared/lib/libdrm_nouveau.so.2.0.0 +shared/lib/libdrm_intel.so.1.0.0 +shared/lib/libpciaccess.so.0.11.1 +shared/lib/qt6/plugins/wayland-decoration-client/libbradient.so +shared/lib/gtk-3.0/modules/libcanberra-gtk3-module.so +shared/lib/libcanberra-gtk3.so.0.1.9 +shared/lib/libcanberra.so.0.2.5 +shared/lib/libvorbisfile.so.3.3.8 +shared/lib/libtdb.so.1.4.8 +shared/lib/libltdl.so.7.3.2 shared/lib/libXss.so.1.0.0 diff --git a/.ci/linux/package.sh b/.ci/linux/package.sh index 4d58b8f328..bbf9c29fb1 100755 --- a/.ci/linux/package.sh +++ b/.ci/linux/package.sh @@ -3,6 +3,8 @@ # SPDX-FileCopyrightText: 2025 eden Emulator Project # SPDX-License-Identifier: GPL-3.0-or-later +# TODO: create a lighter version based on pflyly's script + # This script assumes you're in the source directory set -ex @@ -10,6 +12,8 @@ export APPIMAGE_EXTRACT_AND_RUN=1 export BASE_ARCH="$(uname -m)" export ARCH="$BASE_ARCH" +export BUILDDIR="$2" + LIB4BN="https://raw.githubusercontent.com/VHSgunzo/sharun/refs/heads/main/lib4bin" URUNTIME="https://github.com/VHSgunzo/uruntime/releases/latest/download/uruntime-appimage-dwarfs-$ARCH" @@ -19,9 +23,14 @@ if [ "$ARCH" = 'x86_64' ]; then fi fi +if [ "$BUILDDIR" = '' ] +then + BUILDDIR=build +fi + EDEN_TAG=$(git describe --tags --abbrev=0) echo "Making stable \"$EDEN_TAG\" build" -git checkout "$EDEN_TAG" +# git checkout "$EDEN_TAG" VERSION="$(echo "$EDEN_TAG")" # NOW MAKE APPIMAGE @@ -42,10 +51,13 @@ cp ../dist/eden.svg ./eden.svg ln -sf ./eden.svg ./.DirIcon -if [ "$DEVEL" = 'true' ]; then - sed -i 's|Name=Eden|Name=Eden Nightly|' ./eden.desktop - UPINFO="$(echo "$UPINFO" | sed 's|latest|nightly|')" -fi +# TODO(crueter): Nightly +# if [ "$DEVEL" = 'true' ]; then +# sed -i 's|Name=Eden|Name=Eden Nightly|' ./eden.desktop +# UPINFO="$(echo "$UPINFO" | sed 's|latest|nightly|')" +# fi + +UPINFO='gh-releases-zsync|eden-emulator|Releases|latest|*.AppImage.zsync' LIBDIR="/usr/lib" # some distros are weird and use a subdir @@ -59,7 +71,7 @@ fi wget --retry-connrefused --tries=30 "$LIB4BN" -O ./lib4bin chmod +x ./lib4bin xvfb-run -a -- ./lib4bin -p -v -e -s -k \ - ../build/bin/eden* \ + ../$BUILDDIR/bin/eden* \ $LIBDIR/lib*GL*.so* \ $LIBDIR/libSDL2*.so* \ $LIBDIR/dri/* \ diff --git a/.ci/windows/build-bqt.bat b/.ci/windows/build-bqt.bat index 925d420690..11f8fc8ee2 100755 --- a/.ci/windows/build-bqt.bat +++ b/.ci/windows/build-bqt.bat @@ -1,27 +1,24 @@ -echo off +@echo off set chain=%1 if not defined DevEnvDir ( - "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %chain% + CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" %chain% ) -mkdir build +CALL mkdir build -cmake -S . -B build\%chain% ^ +CALL cmake -S . -B build\%chain% ^ -DCMAKE_BUILD_TYPE=Release ^ --DYUZU_USE_BUNDLED_QT=ON ^ -DENABLE_QT_TRANSLATION=ON ^ -DUSE_DISCORD_PRESENCE=ON ^ +-DYUZU_USE_BUNDLED_QT=ON ^ +-DYUZU_USE_QT_MULTIMEDIA=ON ^ +-DYUZU_USE_QT_WEB_ENGINE=ON ^ -DYUZU_USE_BUNDLED_VCPKG=ON ^ -DYUZU_USE_BUNDLED_SDL2=ON ^ +-DYUZU_ENABLE_LTO=ON ^ -G "Ninja" ^ --DYUZU_TESTS=OFF ^ --DCMAKE_C_COMPILER_LAUNCHER=ccache ^ --DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^ --DCMAKE_TOOLCHAIN_FILE="%CD%\CMakeModules\MSVCCache.cmake" ^ --DUSE_CCACHE=ON +-DYUZU_TESTS=OFF -cmake --build build\%chain% - -ccache -s -v \ No newline at end of file +CALL cmake --build build\%chain% diff --git a/.ci/windows/build.bat b/.ci/windows/build.bat index 4dbe862a94..8535588fbc 100755 --- a/.ci/windows/build.bat +++ b/.ci/windows/build.bat @@ -1,4 +1,4 @@ -echo off +@echo off set chain=%1 set qt_ver=%2 @@ -11,21 +11,16 @@ CALL mkdir build CALL cmake -S . -B build\%chain% ^ -DCMAKE_BUILD_TYPE=Release ^ --DYUZU_USE_BUNDLED_QT=ON ^ -DENABLE_QT_TRANSLATION=ON ^ -DUSE_DISCORD_PRESENCE=ON ^ +-DYUZU_USE_BUNDLED_QT=OFF ^ +-DYUZU_USE_QT_MULTIMEDIA=ON ^ +-DYUZU_USE_QT_WEB_ENGINE=ON ^ -DYUZU_USE_BUNDLED_VCPKG=ON ^ -DYUZU_USE_BUNDLED_SDL2=ON ^ +-DYUZU_ENABLE_LTO=ON ^ -G "Ninja" ^ -DYUZU_TESTS=OFF ^ --DUSE_BUNDLED_QT=OFF ^ --DUSE_SYSTEM_QT=ON ^ --DCMAKE_PREFIX_PATH=C:\Qt\%qt_ver%\msvc2022_64 ^ --DCMAKE_C_COMPILER_LAUNCHER=ccache ^ --DCMAKE_CXX_COMPILER_LAUNCHER=ccache ^ --DCMAKE_TOOLCHAIN_FILE="%CD%\CMakeModules\MSVCCache.cmake" ^ --DUSE_CCACHE=ON +-DQt6_DIR=C:\Qt\%qt_ver%\msvc2022_64 CALL cmake --build build\%chain% - -CALL ccache -s -v \ No newline at end of file diff --git a/.ci/windows/package.ps1 b/.ci/windows/package.ps1 index f7c5f09042..4cdc938933 100755 --- a/.ci/windows/package.ps1 +++ b/.ci/windows/package.ps1 @@ -12,31 +12,29 @@ $ARTIFACTS_DIR = "artifacts" New-Item -ItemType Directory -Path $ARTIFACTS_DIR -Force New-Item -ItemType Directory -Path $RELEASE_DIST -Force +Copy-Item -Path "build/$target/bin/*" -Destination "$RELEASE_DIST" -Recurse -ErrorAction SilentlyContinue -Force + if ($debug -eq "yes") { mkdir -p pdb - $BUILD_PDB = "eden-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" - Get-ChildItem "build/$target/bin/" -Recurse -Filter "*.pdb" | Copy-Item -destination .\pdb -ErrorAction SilentlyContinue - + Get-ChildItem -Path "$RELEASE_DIST" -Filter "*.pdb" -Recurse | Move-Item -Destination .\pdb -ErrorAction SilentlyContinue -Force + if (Test-Path -Path ".\pdb\*.pdb") { + $BUILD_PDB = "eden-windows-msvc-$GITDATE-$GITREV-debugsymbols.zip" 7z a -tzip $BUILD_PDB .\pdb\*.pdb - Move-Item $BUILD_PDB $ARTIFACTS_DIR/ -ErrorAction SilentlyContinue + Move-Item -Path $BUILD_PDB -Destination $ARTIFACTS_DIR/ -ErrorAction SilentlyContinue -Force } -} else { - Remove-Item -Force "$RELEASE_DIST\*.pdb" } - -Copy-Item "build/$target/bin/Release/*" -Destination "$RELEASE_DIST" -Recurse -ErrorAction SilentlyContinue -if (-not $?) { - # Try without Release subfolder if that doesn't exist - Copy-Item "build/$target/bin/*" -Destination "$RELEASE_DIST" -Recurse -ErrorAction SilentlyContinue +if ($debug -ne "yes") { + Remove-Item "$RELEASE_DIST\*.pdb" -Recurse -ErrorAction SilentlyContinue -Force } +Move-Item -Path "$RELEASE_DIST\Release\*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue -Force +Remove-Item "$RELEASE_DIST\Release" -ErrorAction SilentlyContinue -Force $BUILD_ZIP = "eden-windows-msvc-$GITDATE-$GITREV.zip" - 7z a -tzip $BUILD_ZIP $RELEASE_DIST\* +Move-Item -Path $BUILD_ZIP -Destination $ARTIFACTS_DIR/ -ErrorAction SilentlyContinue -Force -Move-Item $BUILD_ZIP $ARTIFACTS_DIR/ -Force #-ErrorAction SilentlyContinue Copy-Item "LICENSE*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue Copy-Item "README*" -Destination "$RELEASE_DIST" -ErrorAction SilentlyContinue diff --git a/CMakeLists.txt b/CMakeLists.txt index 95fc803e30..e094d99dee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -368,11 +368,6 @@ if (UNIX AND NOT APPLE) find_package(gamemode 1.7 MODULE) endif() -# Please consider this as a stub -if(ENABLE_QT6 AND Qt6_LOCATION) - list(APPEND CMAKE_PREFIX_PATH "${Qt6_LOCATION}") -endif() - # find SDL2 exports a bunch of variables that are needed, so its easier to do this outside of the YUZU_find_package if (ENABLE_SDL2) if (YUZU_USE_BUNDLED_SDL2) @@ -405,8 +400,14 @@ endif() add_subdirectory(externals) if (ENABLE_QT) - if (NOT USE_SYSTEM_QT) + if (YUZU_USE_BUNDLED_QT) download_qt(6.8.3) + else() + message(STATUS "Using system Qt") + if (NOT Qt6_DIR) + set(Qt6_DIR "" CACHE PATH "Additional path to search for Qt6 libraries like C:/Qt/6.8.3/msvc2022_64/lib/cmake/Qt6") + endif() + list(APPEND CMAKE_PREFIX_PATH "${Qt6_DIR}") endif() find_package(Qt6 REQUIRED COMPONENTS Widgets Multimedia Concurrent) @@ -433,6 +434,7 @@ if (ENABLE_QT) if (NOT DEFINED QT_HOST_PATH) set(QT_HOST_PATH "${QT_TARGET_PATH}") endif() + message(STATUS "Using target Qt at ${QT_TARGET_PATH}") message(STATUS "Using host Qt at ${QT_HOST_PATH}") endif() @@ -648,13 +650,15 @@ endif() # https://specifications.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html # https://www.freedesktop.org/software/appstream/docs/ if(ENABLE_QT AND UNIX AND NOT APPLE) - install(FILES "dist/org.yuzu_emu.yuzu.desktop" + install(FILES "dist/eden.desktop" DESTINATION "share/applications") install(FILES "dist/eden.svg" DESTINATION "share/icons/hicolor/scalable/apps" - RENAME "org.yuzu_emu.eden.svg") - install(FILES "dist/org.yuzu_emu.yuzu.xml" + RENAME "eden.svg") + + # TODO: these files need to be updated. + install(FILES "dist/eden.xml" DESTINATION "share/mime/packages") - install(FILES "dist/org.yuzu_emu.yuzu.metainfo.xml" + install(FILES "dist/eden.metainfo.xml" DESTINATION "share/metainfo") endif() diff --git a/CMakeModules/DownloadExternals.cmake b/CMakeModules/DownloadExternals.cmake index f48c844f08..adc658d74f 100644 --- a/CMakeModules/DownloadExternals.cmake +++ b/CMakeModules/DownloadExternals.cmake @@ -72,7 +72,7 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out elseif ("x86_64" IN_LIST ARCHITECTURE) set(arch_path "msvc2022_64") else() - message(FATAL_ERROR "Unsupported bundled Qt architecture. Enable USE_SYSTEM_QT and provide your own.") + message(FATAL_ERROR "Unsupported bundled Qt architecture. Disable YUZU_USE_BUNDLED_QT and provide your own.") endif() set(arch "win64_${arch_path}") @@ -83,7 +83,7 @@ function(determine_qt_parameters target host_out type_out arch_out arch_path_out endif() set(host_arch "win64_${host_arch_path}") else() - message(FATAL_ERROR "Unsupported bundled Qt toolchain. Enable USE_SYSTEM_QT and provide your own.") + message(FATAL_ERROR "Unsupported bundled Qt toolchain. Disable YUZU_USE_BUNDLED_QT and provide your own.") endif() endif() elseif (APPLE) diff --git a/dist/org.yuzu_emu.yuzu.desktop b/dist/eden.desktop similarity index 94% rename from dist/org.yuzu_emu.yuzu.desktop rename to dist/eden.desktop index 4a102995ec..c23f95b136 100644 --- a/dist/org.yuzu_emu.yuzu.desktop +++ b/dist/eden.desktop @@ -7,7 +7,7 @@ Type=Application Name=eden GenericName=Switch Emulator Comment=Nintendo Switch video game console emulator -Icon=org.yuzu_emu.eden +Icon=eden TryExec=eden Exec=eden %f Categories=Game;Emulator;Qt; diff --git a/dist/org.yuzu_emu.yuzu.metainfo.xml b/dist/eden.metainfo.xml similarity index 100% rename from dist/org.yuzu_emu.yuzu.metainfo.xml rename to dist/eden.metainfo.xml diff --git a/dist/org.yuzu_emu.yuzu.xml b/dist/eden.xml similarity index 100% rename from dist/org.yuzu_emu.yuzu.xml rename to dist/eden.xml diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index d5ef48de96..12f2e13210 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -450,14 +450,14 @@ if(UNIX AND NOT APPLE) install(TARGETS yuzu) endif() -if (WIN32 AND USE_SYSTEM_QT AND QT_VERSION VERSION_GREATER_EQUAL 6) +if (WIN32 AND NOT YUZU_USE_BUNDLED_QT AND QT_VERSION VERSION_GREATER_EQUAL 6) set(YUZU_EXE_DIR "$") add_custom_command(TARGET yuzu POST_BUILD COMMAND ${WINDEPLOYQT_EXECUTABLE} "${YUZU_EXE_DIR}/eden.exe" --dir "${YUZU_EXE_DIR}" --libdir "${YUZU_EXE_DIR}" --plugindir "${YUZU_EXE_DIR}/plugins" --no-compiler-runtime --no-opengl-sw --no-system-d3d-compiler --no-translations --verbose 0) endif() -if (NOT USE_SYSTEM_QT) - include(CopyYuzuQt6Deps) - copy_yuzu_Qt6_deps(yuzu) +if (YUZU_USE_BUNDLED_QT) + include(CopyYuzuQt6Deps) + copy_yuzu_Qt6_deps(yuzu) endif() if (ENABLE_SDL2) From ebd360531392fac067cc2ac4675a6d25a5943891 Mon Sep 17 00:00:00 2001 From: MaranBr Date: Tue, 20 May 2025 16:01:12 -0400 Subject: [PATCH 22/26] Quick fix and code cleanup --- .ci/linux/build.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.ci/linux/build.sh b/.ci/linux/build.sh index 4567cca816..f87b12e762 100755 --- a/.ci/linux/build.sh +++ b/.ci/linux/build.sh @@ -52,18 +52,9 @@ cmake .. -G Ninja \ -DYUZU_USE_BUNDLED_SDL2=OFF \ -DYUZU_USE_EXTERNAL_SDL2=ON \ -DYUZU_TESTS=OFF \ -<<<<<<< HEAD - -DYUZU_USE_LLVM_DEMANGLE=OFF \ - -DYUZU_USE_QT_MULTIMEDIA=OFF \ - -DYUZU_USE_QT_WEB_ENGINE=OFF \ - -DENABLE_QT_TRANSLATION=ON \ - -DUSE_DISCORD_PRESENCE=OFF \ - -DYUZU_USE_FASTER_LD=OFF \ -======= -DYUZU_USE_QT_MULTIMEDIA=ON \ -DYUZU_USE_QT_WEB_ENGINE=ON \ -DYUZU_USE_FASTER_LD=ON \ ->>>>>>> cmake-qt-fix -DYUZU_ENABLE_LTO=ON \ "${EXTRA_CMAKE_FLAGS[@]}" From ce6b506b02942a8248e62f34b195b55699221a69 Mon Sep 17 00:00:00 2001 From: Esther1024 Date: Wed, 21 May 2025 04:08:07 +0000 Subject: [PATCH 23/26] microprofiler memleak fix (#123) some 50mb being leaked; may as well Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/123 Co-authored-by: Esther1024 Co-committed-by: Esther1024 --- externals/microprofile/microprofile.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/externals/microprofile/microprofile.h b/externals/microprofile/microprofile.h index 8f75a25aa8..15a1ddc980 100644 --- a/externals/microprofile/microprofile.h +++ b/externals/microprofile/microprofile.h @@ -1141,6 +1141,9 @@ void MicroProfileShutdown() MicroProfileWebServerStop(); MicroProfileStopContextSwitchTrace(); MicroProfileGpuShutdown(); + for (uint32_t i = 0; i < S.nNumLogs; ++i) { + delete S.Pool[i]; + } } #ifdef MICROPROFILE_IOS From 28e05a51083c0f9cc6c146dce59fdb781ea3a210 Mon Sep 17 00:00:00 2001 From: swurl Date: Wed, 21 May 2025 04:08:24 +0000 Subject: [PATCH 24/26] remove leftovers from early access (#122) Signed-off-by: swurl Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/122 Co-authored-by: swurl Co-committed-by: swurl --- src/android/app/build.gradle.kts | 5 ---- .../app/src/ea/res/drawable/ic_yuzu.xml | 22 ----------------- .../app/src/ea/res/drawable/ic_yuzu_full.xml | 12 ---------- .../app/src/ea/res/drawable/ic_yuzu_title.xml | 24 ------------------- 4 files changed, 63 deletions(-) delete mode 100644 src/android/app/src/ea/res/drawable/ic_yuzu.xml delete mode 100644 src/android/app/src/ea/res/drawable/ic_yuzu_full.xml delete mode 100644 src/android/app/src/ea/res/drawable/ic_yuzu_title.xml diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts index 95a9cd84f5..c10f863b7c 100644 --- a/src/android/app/build.gradle.kts +++ b/src/android/app/build.gradle.kts @@ -147,11 +147,6 @@ android { isDefault = true dimension = "version" } - - create("ea") { - dimension = "version" - applicationIdSuffix = ".ea" - } } externalNativeBuild { diff --git a/src/android/app/src/ea/res/drawable/ic_yuzu.xml b/src/android/app/src/ea/res/drawable/ic_yuzu.xml deleted file mode 100644 index deb8ba53fd..0000000000 --- a/src/android/app/src/ea/res/drawable/ic_yuzu.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - diff --git a/src/android/app/src/ea/res/drawable/ic_yuzu_full.xml b/src/android/app/src/ea/res/drawable/ic_yuzu_full.xml deleted file mode 100644 index 4ef4728769..0000000000 --- a/src/android/app/src/ea/res/drawable/ic_yuzu_full.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/src/android/app/src/ea/res/drawable/ic_yuzu_title.xml b/src/android/app/src/ea/res/drawable/ic_yuzu_title.xml deleted file mode 100644 index 29d0cfced8..0000000000 --- a/src/android/app/src/ea/res/drawable/ic_yuzu_title.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - From b1b6e0064f65ab4fe386b0c6772ae73e51c1efc1 Mon Sep 17 00:00:00 2001 From: swurl Date: Wed, 21 May 2025 04:09:46 +0000 Subject: [PATCH 25/26] re-enable citron migration (#119) Signed-off-by: swurl Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/119 Co-authored-by: swurl Co-committed-by: swurl --- src/yuzu/configuration/configure_graphics_extensions.ui | 3 ++- src/yuzu/game_list.cpp | 2 +- src/yuzu/user_data_migration.cpp | 8 +------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/yuzu/configuration/configure_graphics_extensions.ui b/src/yuzu/configuration/configure_graphics_extensions.ui index df44b6c353..beae6df6b0 100644 --- a/src/yuzu/configuration/configure_graphics_extensions.ui +++ b/src/yuzu/configuration/configure_graphics_extensions.ui @@ -29,7 +29,8 @@ While it's recommended to use state 3, some games may perform better on lower states. Setting to 0 (disabled) may also break games. -If your GPU is older (i.e. RX570/580 or older), it may not support these features. If this is the case, set the slider to 0 and uncheck all boxes. +If your GPU is older (i.e. RX570/580 or older), it may not support these features. If this is the case, set the slider to 0 and uncheck all boxes. +These settings are experimental, and may cause black screens. If your games fail to boot or are stuck on a black screen, change these settings around. true diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index ced89a6287..3788249d93 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -611,7 +611,7 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri shortcut_menu->addAction(tr("Add to Applications Menu")); #endif context_menu.addSeparator(); - QAction* properties = context_menu.addAction(tr("Properties")); + QAction* properties = context_menu.addAction(tr("Configure Game")); favorite->setVisible(program_id != 0); favorite->setCheckable(true); diff --git a/src/yuzu/user_data_migration.cpp b/src/yuzu/user_data_migration.cpp index 1585695ff0..44947b8ecd 100644 --- a/src/yuzu/user_data_migration.cpp +++ b/src/yuzu/user_data_migration.cpp @@ -120,13 +120,7 @@ void UserDataMigrator::ShowMigrationPrompt(QMainWindow *main_window) continue; QAbstractButton *button = migration_prompt.addButton(iter.key()); - // TMP: disable citron - if (iter.key() == main_window->tr("Citron")) { - button->setEnabled(false); - button->setToolTip( - main_window->tr("Citron migration is known to cause issues. It's recommended " - "to manually set up your data again.")); - } + buttonMap[iter.key()] = button; promptText.append(main_window->tr("\n- %1").arg(iter.key())); } From c79b7f82c82f253f4aa1e2cd880e0efbd5bcaa54 Mon Sep 17 00:00:00 2001 From: swurl Date: Wed, 21 May 2025 18:02:34 -0400 Subject: [PATCH 26/26] added settings to android (#118) Signed-off-by: Aleksandr Popovich Signed-off-by: swurl Reviewed-on: #118 Co-authored-by: Aleksandr Popovich Co-authored-by: swurl Co-committed-by: Aleksandr Popovich --- .ci/windows/build.bat | 2 +- .../java/org/yuzu/yuzu_emu/NativeLibrary.kt | 5 ++ .../features/settings/model/BooleanSetting.kt | 8 ++- .../features/settings/model/IntSetting.kt | 1 + .../features/settings/model/Settings.kt | 1 + .../settings/model/view/SettingsItem.kt | 50 ++++++++++------ .../features/settings/ui/SettingsFragment.kt | 9 ++- .../settings/ui/SettingsFragmentPresenter.kt | 53 +++++++++++++---- .../yuzu_emu/fragments/EmulationFragment.kt | 34 +++++------ .../org/yuzu/yuzu_emu/ui/GamesFragment.kt | 59 +++++++++++++++++-- .../app/src/main/jni/android_settings.h | 6 +- src/android/app/src/main/jni/native.cpp | 17 ++++++ src/android/app/src/main/jni/native.h | 2 + .../app/src/main/res/values-ar/strings.xml | 1 - .../app/src/main/res/values-ckb/strings.xml | 1 - .../app/src/main/res/values-cs/strings.xml | 1 - .../app/src/main/res/values-de/strings.xml | 1 - .../app/src/main/res/values-es/strings.xml | 1 - .../app/src/main/res/values-fa/strings.xml | 1 - .../app/src/main/res/values-fr/strings.xml | 1 - .../app/src/main/res/values-he/strings.xml | 1 - .../app/src/main/res/values-hu/strings.xml | 1 - .../app/src/main/res/values-id/strings.xml | 1 - .../app/src/main/res/values-it/strings.xml | 1 - .../app/src/main/res/values-ja/strings.xml | 1 - .../app/src/main/res/values-ko/strings.xml | 1 - .../app/src/main/res/values-nb/strings.xml | 1 - .../app/src/main/res/values-pl/strings.xml | 1 - .../src/main/res/values-pt-rBR/strings.xml | 1 - .../src/main/res/values-pt-rPT/strings.xml | 1 - .../app/src/main/res/values-ru/strings.xml | 1 - .../app/src/main/res/values-uk/strings.xml | 1 - .../app/src/main/res/values-vi/strings.xml | 1 - .../src/main/res/values-zh-rCN/strings.xml | 1 - .../src/main/res/values-zh-rTW/strings.xml | 1 - .../app/src/main/res/values/arrays.xml | 12 ++++ .../app/src/main/res/values/strings.xml | 52 +++++++++++----- .../renderer_vulkan/renderer_vulkan.cpp | 14 ++--- 38 files changed, 243 insertions(+), 104 deletions(-) diff --git a/.ci/windows/build.bat b/.ci/windows/build.bat index 8535588fbc..e3386fd552 100755 --- a/.ci/windows/build.bat +++ b/.ci/windows/build.bat @@ -21,6 +21,6 @@ CALL cmake -S . -B build\%chain% ^ -DYUZU_ENABLE_LTO=ON ^ -G "Ninja" ^ -DYUZU_TESTS=OFF ^ --DQt6_DIR=C:\Qt\%qt_ver%\msvc2022_64 +-DQt6_DIR=C:\Qt\%qt_ver%\msvc2022_64 CALL cmake --build build\%chain% diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt index 1848ca9ef9..0be943eb86 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/NativeLibrary.kt @@ -166,6 +166,11 @@ object NativeLibrary { */ external fun getPerfStats(): DoubleArray + /** + * Returns the number of shaders being built + */ + external fun getShadersBuilding(): Int + /** * Returns the current CPU backend. */ diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt index cc494467d1..7598d77f46 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/BooleanSetting.kt @@ -33,16 +33,18 @@ enum class BooleanSetting(override val key: String) : AbstractBooleanSetting { TOUCHSCREEN("touchscreen"), SHOW_THERMAL_OVERLAY("show_thermal_overlay"), FRAME_INTERPOLATION("frame_interpolation"), - FRAME_SKIPPING("frame_skipping"), +// FRAME_SKIPPING("frame_skipping"), SHOW_FPS("show_fps"), SHOW_FRAMETIME("show_frame_time"), - SHOW_SPEED("show_speed"), SHOW_APP_RAM_USAGE("show_app_ram_usage"), SHOW_SYSTEM_RAM_USAGE("show_system_ram_usage"), SHOW_BAT_TEMPERATURE("show_bat_temperature"), + SHOW_SHADERS_BUILDING("show_shaders_building"), OVERLAY_BACKGROUND("overlay_background"), + DONT_SHOW_EDEN_VEIL_WARNING("dont_show_eden_veil_warning"), + DEBUG_FLUSH_BY_LINE("flush_lines"), USE_LRU_CACHE("use_lru_cache"),; - external fun isFrameSkippingEnabled(): Boolean +// external fun isFrameSkippingEnabled(): Boolean external fun isFrameInterpolationEnabled(): Boolean diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt index c56d44ee9f..8e71f13d25 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/IntSetting.kt @@ -33,6 +33,7 @@ enum class IntSetting(override val key: String) : AbstractIntSetting { LOCK_DRAWER("lock_drawer"), VERTICAL_ALIGNMENT("vertical_alignment"), PERF_OVERLAY_POSITION("perf_overlay_position"), + MEMORY_LAYOUT("memory_layout_mode"), FSR_SHARPENING_SLIDER("fsr_sharpening_slider"), CABINET_APPLET("cabinet_applet_mode"), CONTROLLER_APPLET("controller_applet_mode"), diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt index f6879723fe..320436fb5f 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/Settings.kt @@ -34,6 +34,7 @@ object Settings { const val PREF_FIRST_APP_LAUNCH = "FirstApplicationLaunch" const val PREF_SHOULD_SHOW_PRE_ALPHA_WARNING = "ShouldShowPreAlphaWarning" + const val PREF_SHOULD_SHOW_PRE_ALPHA_BANNER = "ShouldShowPreAlphaBanner" const val PREF_MEMORY_WARNING_SHOWN = "MemoryWarningShown" const val SECTION_STATS_OVERLAY = "Stats Overlay" diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt index 71fb11c671..efe5de5291 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/model/view/SettingsItem.kt @@ -52,10 +52,6 @@ abstract class SettingsItem( val isEditable: Boolean get() { - if (setting.key == BooleanSetting.FRAME_SKIPPING.key) { - // disabled for now - return false - } // Can't change docked mode toggle when using handheld mode if (setting.key == BooleanSetting.USE_DOCKED_MODE.key) { return NativeInput.getStyleIndex(0) != NpadStyleIndex.Handheld @@ -136,7 +132,7 @@ abstract class SettingsItem( titleId = R.string.dyna_state, descriptionId = R.string.dyna_state_description, min = 0, - max = 2, + max = 3, ) ) put( @@ -186,6 +182,13 @@ abstract class SettingsItem( descriptionId = R.string.picture_in_picture_description ) ) + put( + SwitchSetting( + BooleanSetting.DEBUG_FLUSH_BY_LINE, + titleId = R.string.flush_by_line, + descriptionId = R.string.flush_by_line_description + ) + ) val dockedModeSetting = object : AbstractBooleanSetting { override val key = BooleanSetting.USE_DOCKED_MODE.key @@ -216,13 +219,13 @@ abstract class SettingsItem( ) ) - put( - SwitchSetting( - BooleanSetting.FRAME_SKIPPING, - titleId = R.string.frame_skipping, - descriptionId = R.string.frame_skipping_description - ) - ) +// put( +// SwitchSetting( +// BooleanSetting.FRAME_SKIPPING, +// titleId = R.string.frame_skipping, +// descriptionId = R.string.frame_skipping_description +// ) +// ) put( SwitchSetting( @@ -231,6 +234,15 @@ abstract class SettingsItem( descriptionId = R.string.use_docked_mode_description ) ) + put( + SingleChoiceSetting( + IntSetting.MEMORY_LAYOUT, + titleId = R.string.memory_layout, + descriptionId = R.string.memory_layout_description, + choicesId = R.array.memoryNames, + valuesId = R.array.memoryValues + ) + ) put( SwitchSetting( BooleanSetting.CORE_SYNC_CORE_SPEED, @@ -362,13 +374,6 @@ abstract class SettingsItem( descriptionId = R.string.show_frametime_description ) ) - put( - SwitchSetting( - BooleanSetting.SHOW_SPEED, - R.string.show_speed, - descriptionId = R.string.show_speed_description - ) - ) put( SwitchSetting( BooleanSetting.SHOW_APP_RAM_USAGE, @@ -390,6 +395,13 @@ abstract class SettingsItem( descriptionId = R.string.show_bat_temperature_description ) ) + put( + SwitchSetting( + BooleanSetting.SHOW_SHADERS_BUILDING, + R.string.show_shaders_building, + descriptionId = R.string.show_shaders_building_description + ) + ) put( SingleChoiceSetting( IntSetting.RENDERER_VSYNC, diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt index ec16f16c46..bac90eb4ef 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragment.kt @@ -8,6 +8,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.core.content.edit import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.updatePadding @@ -15,15 +16,17 @@ import androidx.fragment.app.Fragment import androidx.fragment.app.activityViewModels import androidx.navigation.findNavController import androidx.navigation.fragment.navArgs +import androidx.preference.PreferenceManager import androidx.recyclerview.widget.LinearLayoutManager import com.google.android.material.transition.MaterialSharedAxis import org.yuzu.yuzu_emu.R import org.yuzu.yuzu_emu.databinding.FragmentSettingsBinding import org.yuzu.yuzu_emu.features.input.NativeInput +import org.yuzu.yuzu_emu.features.settings.model.BooleanSetting import org.yuzu.yuzu_emu.features.settings.model.Settings import org.yuzu.yuzu_emu.fragments.MessageDialogFragment import org.yuzu.yuzu_emu.utils.ViewUtils.updateMargins -import org.yuzu.yuzu_emu.utils.collect +import org.yuzu.yuzu_emu.utils.* class SettingsFragment : Fragment() { private lateinit var presenter: SettingsFragmentPresenter @@ -66,7 +69,8 @@ class SettingsFragment : Fragment() { presenter = SettingsFragmentPresenter( settingsViewModel, settingsAdapter!!, - args.menuTag + args.menuTag, + activity ) binding.toolbarSettingsLayout.title = if (args.menuTag == Settings.MenuTag.SECTION_ROOT && @@ -86,6 +90,7 @@ class SettingsFragment : Fragment() { else -> getString(args.menuTag.titleId) } } + binding.listSettings.apply { adapter = settingsAdapter layoutManager = LinearLayoutManager(requireContext()) diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt index 4fc1540d0e..69517ebd5a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/features/settings/ui/SettingsFragmentPresenter.kt @@ -4,6 +4,8 @@ package org.yuzu.yuzu_emu.features.settings.ui import android.annotation.SuppressLint +import android.app.Activity +import android.app.AlertDialog import android.os.Build import android.widget.Toast import androidx.preference.PreferenceManager @@ -29,11 +31,14 @@ import org.yuzu.yuzu_emu.features.settings.model.view.* import org.yuzu.yuzu_emu.utils.InputHandler import org.yuzu.yuzu_emu.utils.NativeConfig import androidx.core.content.edit +import androidx.fragment.app.FragmentActivity +import org.yuzu.yuzu_emu.fragments.MessageDialogFragment class SettingsFragmentPresenter( private val settingsViewModel: SettingsViewModel, private val adapter: SettingsAdapter, - private var menuTag: MenuTag + private var menuTag: MenuTag, + private var activity: FragmentActivity? ) { private var settingsList = ArrayList() @@ -66,7 +71,7 @@ class SettingsFragmentPresenter( } // Allows you to show/hide abstract settings based on the paired setting key - fun ArrayList.addAbstract(item: SettingsItem) { + private fun ArrayList.addAbstract(item: SettingsItem) { val pairedSettingKey = item.setting.pairedSettingKey if (pairedSettingKey.isNotEmpty()) { val pairedSettingsItem = @@ -78,6 +83,9 @@ class SettingsFragmentPresenter( } fun onViewCreated() { + if (menuTag == MenuTag.SECTION_EDEN_VEIL) { + showEdenVeilWarningDialog() + } loadSettingsList() } @@ -224,10 +232,10 @@ class SettingsFragmentPresenter( add(HeaderSetting(R.string.stats_overlay_items)) add(BooleanSetting.SHOW_FPS.key) add(BooleanSetting.SHOW_FRAMETIME.key) - add(BooleanSetting.SHOW_SPEED.key) add(BooleanSetting.SHOW_APP_RAM_USAGE.key) add(BooleanSetting.SHOW_SYSTEM_RAM_USAGE.key) add(BooleanSetting.SHOW_BAT_TEMPERATURE.key) + add(BooleanSetting.SHOW_SHADERS_BUILDING.key) } } @@ -387,24 +395,25 @@ class SettingsFragmentPresenter( // TODO(alekpop): sort these into headers. private fun addEdenVeilSettings(sl: ArrayList) { sl.apply { - add(BooleanSetting.FRAME_INTERPOLATION.key) - add(BooleanSetting.FRAME_SKIPPING.key) - add(BooleanSetting.USE_LRU_CACHE.key) - add(BooleanSetting.RENDERER_FAST_GPU.key) - + add(HeaderSetting(R.string.veil_extensions)) add(ByteSetting.RENDERER_DYNA_STATE.key) - add(BooleanSetting.RENDERER_PROVOKING_VERTEX.key) add(BooleanSetting.RENDERER_DESCRIPTOR_INDEXING.key) - add(BooleanSetting.CORE_SYNC_CORE_SPEED.key) - + add(HeaderSetting(R.string.veil_renderer)) + add(BooleanSetting.FRAME_INTERPOLATION.key) + add(BooleanSetting.RENDERER_FAST_GPU.key) add(IntSetting.RENDERER_SHADER_BACKEND.key) add(IntSetting.RENDERER_NVDEC_EMULATION.key) add(IntSetting.RENDERER_ASTC_DECODE_METHOD.key) add(IntSetting.RENDERER_ASTC_RECOMPRESSION.key) add(IntSetting.RENDERER_VRAM_USAGE_MODE.key) add(IntSetting.RENDERER_OPTIMIZE_SPIRV_OUTPUT.key) + + add(HeaderSetting(R.string.veil_misc)) + add(BooleanSetting.USE_LRU_CACHE.key) + add(BooleanSetting.CORE_SYNC_CORE_SPEED.key) + add(IntSetting.MEMORY_LAYOUT.key) } } @@ -1076,6 +1085,28 @@ class SettingsFragmentPresenter( add(BooleanSetting.USE_AUTO_STUB.key) add(BooleanSetting.CPU_DEBUG_MODE.key) add(SettingsItem.FASTMEM_COMBINED) + + add(HeaderSetting(R.string.log)) + add(BooleanSetting.DEBUG_FLUSH_BY_LINE.key) + } + } + + fun showEdenVeilWarningDialog() { + val shouldDisplayVeilWarning = !BooleanSetting.DONT_SHOW_EDEN_VEIL_WARNING.getBoolean() + if (shouldDisplayVeilWarning) { + activity?.let { + MessageDialogFragment.newInstance( + it, + titleId = R.string.eden_veil_warning_title, + descriptionId = R.string.eden_veil_warning_description, + positiveButtonTitleId = R.string.dont_show_again, + negativeButtonTitleId = R.string.close, + showNegativeButton = true, + positiveAction = { + BooleanSetting.DONT_SHOW_EDEN_VEIL_WARNING.setBoolean(true) + } + ).show(it.supportFragmentManager, MessageDialogFragment.TAG) + } } } } diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt index ddf3cb1fe1..2f5918b59a 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt @@ -399,7 +399,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { emulationState.updateSurface() // Setup overlays - updateshowStatsOvelray() + updateShowStatsOverlay() // Re update binding when the specs values get initialized properly binding.inGameMenu.getHeaderView(0).apply { @@ -532,7 +532,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { } } @SuppressLint("DefaultLocale") - private fun updateshowStatsOvelray() { + private fun updateShowStatsOverlay() { val showOverlay = BooleanSetting.SHOW_PERFORMANCE_OVERLAY.getBoolean() binding.showStatsOverlayText.apply { setTextColor( @@ -560,7 +560,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { if (BooleanSetting.SHOW_FPS.getBoolean(NativeConfig.isPerGameConfigLoaded())) { val enableFrameInterpolation = BooleanSetting.FRAME_INTERPOLATION.getBoolean() - val enableFrameSkipping = BooleanSetting.FRAME_SKIPPING.getBoolean() +// val enableFrameSkipping = BooleanSetting.FRAME_SKIPPING.getBoolean() var fpsText = String.format("FPS: %.1f", actualFps) @@ -568,9 +568,9 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { fpsText += " " + getString(R.string.enhanced_fps_suffix) } - if (enableFrameSkipping) { - fpsText += " " + getString(R.string.skipping_fps_suffix) - } +// if (enableFrameSkipping) { +// fpsText += " " + getString(R.string.skipping_fps_suffix) +// } sb.append(fpsText) } @@ -585,16 +585,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { ) } - if (BooleanSetting.SHOW_SPEED.getBoolean(NativeConfig.isPerGameConfigLoaded())) { - if (sb.isNotEmpty()) sb.append(" | ") - sb.append( - String.format( - "Speed: %d%%", - (perfStats[SPEED] * 100.0 + 0.5).toInt() - ) - ) - } - if (BooleanSetting.SHOW_APP_RAM_USAGE.getBoolean(NativeConfig.isPerGameConfigLoaded())) { if (sb.isNotEmpty()) sb.append(" | ") val appRamUsage = File("/proc/self/statm").readLines()[0].split(' ')[1].toLong() * 4096 / 1000000 @@ -619,6 +609,16 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { sb.append(String.format("%.1f°C/%.1f°F", batteryTemp, tempF)) } + val shadersBuilding = NativeLibrary.getShadersBuilding() + + if (BooleanSetting.SHOW_SHADERS_BUILDING.getBoolean(NativeConfig.isPerGameConfigLoaded()) && shadersBuilding != 0) { + if (sb.isNotEmpty()) sb.append(" | ") + + val prefix = getString(R.string.shaders_prefix) + val suffix = getString(R.string.shaders_suffix) + sb.append(String.format("$prefix %d $suffix", shadersBuilding)) + } + if (BooleanSetting.OVERLAY_BACKGROUND.getBoolean(NativeConfig.isPerGameConfigLoaded())) { binding.showStatsOverlayText.setBackgroundResource(R.color.yuzu_transparent_black) } else { @@ -849,7 +849,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback { R.id.menu_show_stats_overlay -> { it.isChecked = !it.isChecked BooleanSetting.SHOW_PERFORMANCE_OVERLAY.setBoolean(it.isChecked) - updateshowStatsOvelray() + updateShowStatsOverlay() true } R.id.menu_edit_overlay -> { diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt index dd5f8518c3..730c59e592 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt @@ -12,10 +12,13 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.view.inputmethod.InputMethodManager +import android.widget.ImageButton import android.widget.PopupMenu import android.widget.TextView import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AppCompatActivity +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.toArgb import androidx.constraintlayout.widget.ConstraintLayout import androidx.core.view.ViewCompat import androidx.core.view.WindowInsetsCompat @@ -43,6 +46,7 @@ import org.yuzu.yuzu_emu.utils.collect import java.util.Locale import androidx.core.content.edit import androidx.core.view.updateLayoutParams +import org.yuzu.yuzu_emu.features.settings.model.Settings class GamesFragment : Fragment() { private var _binding: FragmentGamesBinding? = null @@ -58,7 +62,8 @@ class GamesFragment : Fragment() { private val homeViewModel: HomeViewModel by activityViewModels() private lateinit var gameAdapter: GameAdapter - private val preferences = PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext) + private val preferences = + PreferenceManager.getDefaultSharedPreferences(YuzuApplication.appContext) private lateinit var mainActivity: MainActivity private val getGamesDirectory = @@ -151,8 +156,13 @@ class GamesFragment : Fragment() { getGamesDirectory.launch(Intent(Intent.ACTION_OPEN_DOCUMENT_TREE).data) } - setInsets() - addPreAlphaBanner() + setInsets() + val shouldDisplayPreAlphaBanner = + PreferenceManager.getDefaultSharedPreferences(requireContext()) + .getBoolean(Settings.PREF_SHOULD_SHOW_PRE_ALPHA_BANNER, true) + if (shouldDisplayPreAlphaBanner) { + addPreAlphaBanner() + } } val applyGridGamesBinding = { @@ -260,7 +270,44 @@ class GamesFragment : Fragment() { ) gravity = Gravity.CENTER } + + val closeButton = ImageButton(requireContext()).apply { + id = "pre_alpha_close_button".hashCode() + layoutParams = ConstraintLayout.LayoutParams( + resources.getDimensionPixelSize(R.dimen.spacing_large), + resources.getDimensionPixelSize(R.dimen.spacing_large) + ).apply { + startToStart = "pre_alpha_banner".hashCode() + topToTop = "pre_alpha_banner".hashCode() + bottomToBottom = "pre_alpha_banner".hashCode() + marginStart = resources.getDimensionPixelSize(R.dimen.spacing_large) * 2 + topMargin = resources.getDimensionPixelSize(R.dimen.spacing_small) + } + setImageResource(android.R.drawable.ic_menu_close_clear_cancel) + setColorFilter( + MaterialColors.getColor( + this, + com.google.android.material.R.attr.colorOnError + ) + ) + setBackgroundColor(Color.Transparent.toArgb()) + setOnClickListener { + PreferenceManager.getDefaultSharedPreferences(requireContext()) + .edit() { + putBoolean(Settings.PREF_SHOULD_SHOW_PRE_ALPHA_BANNER, false) + } + binding.root.removeView(preAlphaBanner) + binding.root.removeView(this) + + binding.swipeRefresh.updateLayoutParams { + topToBottom = R.id.frame_search + } + } + } + binding.root.addView(preAlphaBanner) + binding.root.addView(closeButton) + binding.swipeRefresh.updateLayoutParams { topToBottom = preAlphaBanner.id } @@ -284,12 +331,14 @@ class GamesFragment : Fragment() { item.isChecked = true true } + R.id.view_list -> { preferences.edit() { putInt(PREF_VIEW_TYPE, GameAdapter.VIEW_TYPE_LIST) } applyGridGamesBinding() item.isChecked = true true } + else -> false } } @@ -394,7 +443,7 @@ class GamesFragment : Fragment() { val barInsets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars()) val cutoutInsets = windowInsets.getInsets(WindowInsetsCompat.Type.displayCutout()) val spacingNavigation = resources.getDimensionPixelSize(R.dimen.spacing_navigation) - resources.getDimensionPixelSize(R.dimen.spacing_navigation_rail) + resources.getDimensionPixelSize(R.dimen.spacing_navigation_rail) val isLandscape = resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE @@ -418,7 +467,7 @@ class GamesFragment : Fragment() { binding.noticeText.updatePadding(bottom = spacingNavigation) binding.header.updatePadding(top = cutoutInsets.top + resources.getDimensionPixelSize(R.dimen.spacing_large) + if (isLandscape) barInsets.top else 0) binding.gridGames.updatePadding( - top = resources.getDimensionPixelSize(R.dimen.spacing_med) + top = resources.getDimensionPixelSize(R.dimen.spacing_med) ) val mlpFab = binding.addDirectory.layoutParams as ViewGroup.MarginLayoutParams diff --git a/src/android/app/src/main/jni/android_settings.h b/src/android/app/src/main/jni/android_settings.h index ff569d1981..45e9618d3c 100644 --- a/src/android/app/src/main/jni/android_settings.h +++ b/src/android/app/src/main/jni/android_settings.h @@ -79,18 +79,20 @@ struct Values { Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; Settings::Setting show_frame_time{linkage, false, "show_frame_time", Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; - Settings::Setting show_speed{linkage, true, "show_speed", - Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; Settings::Setting show_app_ram_usage{linkage, false, "show_app_ram_usage", Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; Settings::Setting show_system_ram_usage{linkage, false, "show_system_ram_usage", Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; Settings::Setting show_bat_temperature{linkage, false, "show_bat_temperature", Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; + Settings::Setting show_shaders_building{linkage, true, "show_shaders_building", + Settings::Category::Overlay, Settings::Specialization::Default, true , true, &show_performance_overlay}; Settings::Setting show_input_overlay{linkage, true, "show_input_overlay", Settings::Category::Overlay}; Settings::Setting touchscreen{linkage, true, "touchscreen", Settings::Category::Overlay}; Settings::Setting lock_drawer{linkage, false, "lock_drawer", Settings::Category::Overlay}; + + Settings::Setting dont_show_eden_veil_warning{linkage, false, "dont_show_eden_veil_warning", Settings::Category::Miscellaneous}; }; extern Values values; diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 6dac1ef84e..962fae126c 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -67,6 +67,7 @@ #include "video_core/renderer_vulkan/renderer_vulkan.h" #include "video_core/vulkan_common/vulkan_instance.h" #include "video_core/vulkan_common/vulkan_surface.h" +#include "video_core/shader_notify.h" #define jconst [[maybe_unused]] const auto #define jauto [[maybe_unused]] auto @@ -158,6 +159,12 @@ const Core::PerfStatsResults& EmulationSession::PerfStats() { return m_perf_stats; } +int EmulationSession::ShadersBuilding() { + auto& shader_notify = m_system.GPU().ShaderNotify(); + m_shaders_building = shader_notify.ShadersBuilding(); + return m_shaders_building; +} + void EmulationSession::SurfaceChanged() { if (!IsRunning()) { return; @@ -610,6 +617,16 @@ jdoubleArray Java_org_yuzu_yuzu_1emu_NativeLibrary_getPerfStats(JNIEnv* env, jcl return j_stats; } +jint Java_org_yuzu_yuzu_1emu_NativeLibrary_getShadersBuilding(JNIEnv* env, jclass clazz) { + jint j_shaders = 0; + + if (EmulationSession::GetInstance().IsRunning()) { + j_shaders = EmulationSession::GetInstance().ShadersBuilding(); + } + + return j_shaders; +} + jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getCpuBackend(JNIEnv* env, jclass clazz) { if (Settings::IsNceEnabled()) { return Common::Android::ToJString(env, "NCE"); diff --git a/src/android/app/src/main/jni/native.h b/src/android/app/src/main/jni/native.h index 6a4551ada2..dfbc8b2943 100644 --- a/src/android/app/src/main/jni/native.h +++ b/src/android/app/src/main/jni/native.h @@ -44,6 +44,7 @@ public: void ShutdownEmulation(); const Core::PerfStatsResults& PerfStats(); + int ShadersBuilding(); void ConfigureFilesystemProvider(const std::string& filepath); void InitializeSystem(bool reload); void SetAppletId(int applet_id); @@ -72,6 +73,7 @@ private: InputCommon::InputSubsystem m_input_subsystem; Common::DetachedTasks m_detached_tasks; Core::PerfStatsResults m_perf_stats{}; + int m_shaders_building{0}; std::shared_ptr m_vfs; Core::SystemResultStatus m_load_result{Core::SystemResultStatus::ErrorNotInitialized}; std::atomic m_is_running = false; diff --git a/src/android/app/src/main/res/values-ar/strings.xml b/src/android/app/src/main/res/values-ar/strings.xml index 1ed93d123c..c05652f70a 100644 --- a/src/android/app/src/main/res/values-ar/strings.xml +++ b/src/android/app/src/main/res/values-ar/strings.xml @@ -7,7 +7,6 @@ (مُحسَّن) - (تخطي) النظام: عرض إحصائيات الأداء تخصيص diff --git a/src/android/app/src/main/res/values-ckb/strings.xml b/src/android/app/src/main/res/values-ckb/strings.xml index 89cbd511aa..b6aa73505b 100644 --- a/src/android/app/src/main/res/values-ckb/strings.xml +++ b/src/android/app/src/main/res/values-ckb/strings.xml @@ -8,7 +8,6 @@ (پێشکەوتوو) - (بازدان) سیستەم: پیشاندانی ستاتیستی کارایی خۆڕێکخستن diff --git a/src/android/app/src/main/res/values-cs/strings.xml b/src/android/app/src/main/res/values-cs/strings.xml index 4f43357a6f..ee1bcd6dc9 100644 --- a/src/android/app/src/main/res/values-cs/strings.xml +++ b/src/android/app/src/main/res/values-cs/strings.xml @@ -7,7 +7,6 @@ (Vylepšený) - (Přeskakování) Systém: Zobrazit překryv statistik výkonu Přizpůsobení diff --git a/src/android/app/src/main/res/values-de/strings.xml b/src/android/app/src/main/res/values-de/strings.xml index d2a1f89730..4e20ca069a 100644 --- a/src/android/app/src/main/res/values-de/strings.xml +++ b/src/android/app/src/main/res/values-de/strings.xml @@ -8,7 +8,6 @@ (Enhanced) - (Skipping) System: Leistungsstatistik Overlay anzeigen Anpassung diff --git a/src/android/app/src/main/res/values-es/strings.xml b/src/android/app/src/main/res/values-es/strings.xml index 0eb5932de2..dc8d2207cc 100644 --- a/src/android/app/src/main/res/values-es/strings.xml +++ b/src/android/app/src/main/res/values-es/strings.xml @@ -8,7 +8,6 @@ (Mejorado) - (Saltando) Sistema: Mostrar superposición de estadísticas de rendimiento Personalización diff --git a/src/android/app/src/main/res/values-fa/strings.xml b/src/android/app/src/main/res/values-fa/strings.xml index 758fa4995d..cc90431372 100644 --- a/src/android/app/src/main/res/values-fa/strings.xml +++ b/src/android/app/src/main/res/values-fa/strings.xml @@ -8,7 +8,6 @@ (بهبودیافته) - (رد کردن) سیستم: نمایش آمار عملکرد سفارشی‌سازی diff --git a/src/android/app/src/main/res/values-fr/strings.xml b/src/android/app/src/main/res/values-fr/strings.xml index 9e2069cd97..ff06bc8f90 100644 --- a/src/android/app/src/main/res/values-fr/strings.xml +++ b/src/android/app/src/main/res/values-fr/strings.xml @@ -8,7 +8,6 @@ (Amélioré) - (Saut) Système: Afficher les stats de performance Personnalisation diff --git a/src/android/app/src/main/res/values-he/strings.xml b/src/android/app/src/main/res/values-he/strings.xml index e712e9d267..61cc06a31e 100644 --- a/src/android/app/src/main/res/values-he/strings.xml +++ b/src/android/app/src/main/res/values-he/strings.xml @@ -8,7 +8,6 @@ (משופר) - (דילוג) מערכת: הצג סטטיסטיקות ביצועים התאמה אישית diff --git a/src/android/app/src/main/res/values-hu/strings.xml b/src/android/app/src/main/res/values-hu/strings.xml index 8c028fb8a8..fd0086039a 100644 --- a/src/android/app/src/main/res/values-hu/strings.xml +++ b/src/android/app/src/main/res/values-hu/strings.xml @@ -8,7 +8,6 @@ (Továbbfejlesztett) - (Kihagyás) Rendszer: Teljesítmény statisztikák megjelenítése Testreszabás diff --git a/src/android/app/src/main/res/values-id/strings.xml b/src/android/app/src/main/res/values-id/strings.xml index ee5c8db04e..22685207f1 100644 --- a/src/android/app/src/main/res/values-id/strings.xml +++ b/src/android/app/src/main/res/values-id/strings.xml @@ -8,7 +8,6 @@ (Ditingkatkan) - (Melewatkan) Sistem: Tampilkan Overlay Statistik Performa Kustomisasi diff --git a/src/android/app/src/main/res/values-it/strings.xml b/src/android/app/src/main/res/values-it/strings.xml index 3ed465d956..260b329e35 100644 --- a/src/android/app/src/main/res/values-it/strings.xml +++ b/src/android/app/src/main/res/values-it/strings.xml @@ -8,7 +8,6 @@ (Migliorato) - (Salto) Sistema: Mostra overlay prestazioni Personalizzazione diff --git a/src/android/app/src/main/res/values-ja/strings.xml b/src/android/app/src/main/res/values-ja/strings.xml index 6ce448998d..354d959f67 100644 --- a/src/android/app/src/main/res/values-ja/strings.xml +++ b/src/android/app/src/main/res/values-ja/strings.xml @@ -8,7 +8,6 @@ (強化) - (スキップ) システム: パフォーマンス統計オーバーレイを表示 カスタマイズ diff --git a/src/android/app/src/main/res/values-ko/strings.xml b/src/android/app/src/main/res/values-ko/strings.xml index 8f232711f6..f663d93d7b 100644 --- a/src/android/app/src/main/res/values-ko/strings.xml +++ b/src/android/app/src/main/res/values-ko/strings.xml @@ -8,7 +8,6 @@ (향상됨) - (건너뜀) 시스템: 성능 통계 오버레이 표시 사용자 지정 diff --git a/src/android/app/src/main/res/values-nb/strings.xml b/src/android/app/src/main/res/values-nb/strings.xml index b3864defcd..969dbbbf54 100644 --- a/src/android/app/src/main/res/values-nb/strings.xml +++ b/src/android/app/src/main/res/values-nb/strings.xml @@ -8,7 +8,6 @@ (Forbedret) - (Hopp) System: Vis ytelsesstatistikkoverlay Tilpasning diff --git a/src/android/app/src/main/res/values-pl/strings.xml b/src/android/app/src/main/res/values-pl/strings.xml index 934ee8d54d..3b022b2b20 100644 --- a/src/android/app/src/main/res/values-pl/strings.xml +++ b/src/android/app/src/main/res/values-pl/strings.xml @@ -8,7 +8,6 @@ (Ulepszony) - (Pomijanie) System: Pokaż nakładkę statystyk wydajności Dostosowanie diff --git a/src/android/app/src/main/res/values-pt-rBR/strings.xml b/src/android/app/src/main/res/values-pt-rBR/strings.xml index 682212ddee..44c8d4d98e 100644 --- a/src/android/app/src/main/res/values-pt-rBR/strings.xml +++ b/src/android/app/src/main/res/values-pt-rBR/strings.xml @@ -8,7 +8,6 @@ (Aprimorado) - (Pular) Sistema: Mostrar sobreposição de estatísticas de desempenho Personalização diff --git a/src/android/app/src/main/res/values-pt-rPT/strings.xml b/src/android/app/src/main/res/values-pt-rPT/strings.xml index 56d37faa55..57a8d74e46 100644 --- a/src/android/app/src/main/res/values-pt-rPT/strings.xml +++ b/src/android/app/src/main/res/values-pt-rPT/strings.xml @@ -8,7 +8,6 @@ (Melhorado) - (Saltar) Sistema: Mostrar Overlay de Desempenho Personalização diff --git a/src/android/app/src/main/res/values-ru/strings.xml b/src/android/app/src/main/res/values-ru/strings.xml index 4f18397c37..55a9826e06 100644 --- a/src/android/app/src/main/res/values-ru/strings.xml +++ b/src/android/app/src/main/res/values-ru/strings.xml @@ -8,7 +8,6 @@ (Улучшенный) - (Пропуск) Система: Показать оверлей статистики Настройки diff --git a/src/android/app/src/main/res/values-uk/strings.xml b/src/android/app/src/main/res/values-uk/strings.xml index 927efccded..41db237f0a 100644 --- a/src/android/app/src/main/res/values-uk/strings.xml +++ b/src/android/app/src/main/res/values-uk/strings.xml @@ -8,7 +8,6 @@ (Покращений) - (Пропуск) Система: Показати накладання статистики Налаштування diff --git a/src/android/app/src/main/res/values-vi/strings.xml b/src/android/app/src/main/res/values-vi/strings.xml index 8f861e3065..1d883e0e9a 100644 --- a/src/android/app/src/main/res/values-vi/strings.xml +++ b/src/android/app/src/main/res/values-vi/strings.xml @@ -8,7 +8,6 @@ (Nâng cao) - (Bỏ qua) Hệ thống: Hiển thị thống kê hiệu suất Tùy chỉnh diff --git a/src/android/app/src/main/res/values-zh-rCN/strings.xml b/src/android/app/src/main/res/values-zh-rCN/strings.xml index c2a69cc3aa..bfc7da1922 100644 --- a/src/android/app/src/main/res/values-zh-rCN/strings.xml +++ b/src/android/app/src/main/res/values-zh-rCN/strings.xml @@ -8,7 +8,6 @@ (增强) - (跳过) 系统: 显示性能统计悬浮窗 自定义 diff --git a/src/android/app/src/main/res/values-zh-rTW/strings.xml b/src/android/app/src/main/res/values-zh-rTW/strings.xml index b0da549dab..71030e941b 100644 --- a/src/android/app/src/main/res/values-zh-rTW/strings.xml +++ b/src/android/app/src/main/res/values-zh-rTW/strings.xml @@ -8,7 +8,6 @@ (增強) - (跳過) 系統: 顯示效能統計疊加層 自訂 diff --git a/src/android/app/src/main/res/values/arrays.xml b/src/android/app/src/main/res/values/arrays.xml index 04779469cc..e1db50c54e 100644 --- a/src/android/app/src/main/res/values/arrays.xml +++ b/src/android/app/src/main/res/values/arrays.xml @@ -21,6 +21,18 @@ 1 + + @string/memory_4gb + @string/memory_6gb + @string/memory_8gb + + + + 0 + 1 + 2 + + @string/language_brazilian_portuguese @string/language_british_english diff --git a/src/android/app/src/main/res/values/strings.xml b/src/android/app/src/main/res/values/strings.xml index 6a143e1a27..138957257c 100644 --- a/src/android/app/src/main/res/values/strings.xml +++ b/src/android/app/src/main/res/values/strings.xml @@ -11,9 +11,10 @@ (Enhanced) - (Skipping) + Building + Shader(s) System: - ShoW Performance Stats Overlay + Show Performance Stats Overlay Customization Visibility Overlay @@ -31,6 +32,8 @@ Display the amount of RAM used by the system Show Battery Temperature Display current Battery temperature in Celsius and Fahrenheit + Show Shaders Building + Display current number of shaders being built Overlay Position Choose where the performance stats overlay is displayed on the screen Top Left @@ -44,23 +47,35 @@ Eden’s Veil - Beyond default - Enhanced Frame Pacing - Ensures smooth and consistent frame delivery by synchronizing the timing between frames, reducing stuttering and uneven animation. Ideal for games that experience frame timing instability or micro-stutters during gameplay. + Experimental settings to improve performance and capability. These settings may cause black screens or other game issues. + Experimental Settings + The settings contained within Eden\'s Veil are highly experimental and may cause issues. If your game does not boot, disable any extensions and change Extended Dynamic State to 0. + + GPU Extensions Extended Dynamic State Enables Vulkan features to improve performance, rendering, and save resources on pipeline creation while maintaining lower CPU/GPU usage. These extensions may increase device temperature, and GPUs belonging to the older A6XX line may not react properly. Set to 0 to use Legacy emulated formats. - Synchronize Core Speed - Synchronize the core tick speed to the maximum speed percentage to improve performance without altering the game\'s actual speed. + Provoking Vertex + Improves lighting and vertex handling in certain games. Only supported on Vulkan 1.0+ GPUs. + Descriptor Indexing + Improves texture and buffer handling, as well as the Maxwell translation layer. Supported by some Vulkan 1.1 GPUs and all Vulkan 1.2+ GPUs. + + Renderer + Enhanced Frame Pacing + Ensures smooth and consistent frame delivery by synchronizing the timing between frames, reducing stuttering and uneven animation. Ideal for games that experience frame timing instability or micro-stutters during gameplay. Use Auto Stub Automatically stub missing services and functions. This may improve compatibility but can cause crashes and stability issues. Uninstall firmware Uninstalling the firmware will remove it from the device and may affect game compatibility. Uninstalling firmware Firmware uninstalled successfully - Provoking Vertex - Improves lighting and vertex handling in certain games. Only supported on Vulkan 1.0+ GPUs. - Descriptor Indexing - Improves texture and buffer handling, as well as the Maxwell translation layer. Supported by some Vulkan 1.1 GPUs and all Vulkan 1.2+ GPUs. + + Miscellaneous + Synchronize Core Speed + Synchronize the core tick speed to the maximum speed percentage to improve performance without altering the game\'s actual speed. + Enable LRU Cache + Enable or disable the Least Recently Used (LRU) cache, increasing performance by saving CPU process usage. Some games have issue with it, notably TotK 1.2.1, so disable if the game doesn\'t boot or crashes randomly. + Memory Layout + (EXPERIMENTAL) Change the emulated memory layout. This setting will not increase performance, but may help with games utilizing high resolutions via mods. Do not use on phones with 8GB of RAM or less. Shader Backend @@ -404,12 +419,18 @@ CPU CPU Debugging Puts the CPU in a slow debugging mode. + GPU API Graphics debugging Sets the graphics API to a slow debugging mode. Fastmem + Logging + Flush debug logs by line + Flushes debugging logs on each line written, making debugging easier in cases of crashing or freezing. + + Output engine Volume @@ -678,6 +699,11 @@ Korea Taiwan + + 4GB (Recommended) + 6GB (Unsafe) + 8GB (Unsafe) + 日本語 English @@ -749,10 +775,6 @@ 3X (2160p/3240p) (Slow) 4X (2880p/4320p) (Slow) - - Enable LRU Cache - Enable or disable the Least Recently Used (LRU) cache, increasing performance by saving CPU process usage. Some games have issue with it, notably TotK 1.2.1, so disable if the game doesn\'t boot or crashes randomly. - Immediate (Off) Mailbox diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 30f5ff7a75..dd22dadf42 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp @@ -202,7 +202,7 @@ RendererVulkan::~RendererVulkan() { #ifdef __ANDROID__ class BooleanSetting { public: - static BooleanSetting FRAME_SKIPPING; +// static BooleanSetting FRAME_SKIPPING; static BooleanSetting FRAME_INTERPOLATION; explicit BooleanSetting(bool initial_value = false) : value(initial_value) {} @@ -219,13 +219,13 @@ class BooleanSetting { }; // Initialize static members - BooleanSetting BooleanSetting::FRAME_SKIPPING(false); +// BooleanSetting BooleanSetting::FRAME_SKIPPING(false); BooleanSetting BooleanSetting::FRAME_INTERPOLATION(false); - extern "C" JNIEXPORT jboolean JNICALL - Java_org_uzuy_uzuy_1emu_features_settings_model_BooleanSetting_isFrameSkippingEnabled(JNIEnv* env, jobject /* this */) { - return static_cast(BooleanSetting::FRAME_SKIPPING.getBoolean()); - } +// extern "C" JNIEXPORT jboolean JNICALL +// Java_org_uzuy_uzuy_1emu_features_settings_model_BooleanSetting_isFrameSkippingEnabled(JNIEnv* env, jobject /* this */) { +// return static_cast(BooleanSetting::FRAME_SKIPPING.getBoolean()); +// } extern "C" JNIEXPORT jboolean JNICALL Java_org_uzuy_uzuy_1emu_features_settings_model_BooleanSetting_isFrameInterpolationEnabled(JNIEnv* env, jobject /* this */) { @@ -310,7 +310,7 @@ void RendererVulkan::Composite(std::span framebu static int target_fps = 60; // Target FPS (30 or 60) int frame_skip_threshold = 1; - bool frame_skipping = BooleanSetting::FRAME_SKIPPING.getBoolean(); + bool frame_skipping = false; //BooleanSetting::FRAME_SKIPPING.getBoolean(); bool frame_interpolation = BooleanSetting::FRAME_INTERPOLATION.getBoolean(); #endif