Browse Source
Merge pull request #12756 from liamwhite/applet-multiprocess-hwc
Merge pull request #12756 from liamwhite/applet-multiprocess-hwc
general: applet multiprocessremotes/1778439668340191200/nce_cpp
committed by
GitHub
79 changed files with 1173 additions and 255 deletions
-
3src/common/settings.cpp
-
32src/common/settings.h
-
1src/common/settings_common.h
-
2src/common/settings_enums.h
-
4src/core/file_sys/content_archive.cpp
-
1src/core/file_sys/content_archive.h
-
7src/core/hle/kernel/k_process.cpp
-
6src/core/hle/service/am/am_types.h
-
12src/core/hle/service/am/frontend/applet_software_keyboard.cpp
-
2src/core/hle/service/am/frontend/applet_software_keyboard.h
-
81src/core/hle/service/am/library_applet_creator.cpp
-
23src/core/hle/service/am/process.cpp
-
2src/core/hle/service/am/process.h
-
18src/core/hle/service/am/self_controller.cpp
-
2src/core/hle/service/am/self_controller.h
-
19src/core/hle/service/am/system_buffer_manager.cpp
-
3src/core/hle/service/am/system_buffer_manager.h
-
4src/core/hle/service/am/window_controller.cpp
-
7src/core/hle/service/nvdrv/core/container.cpp
-
1src/core/hle/service/nvdrv/core/container.h
-
8src/core/hle/service/nvdrv/core/nvmap.cpp
-
17src/core/hle/service/nvdrv/devices/nvdisp_disp0.cpp
-
176src/core/hle/service/nvnflinger/fb_share_buffer_manager.cpp
-
24src/core/hle/service/nvnflinger/fb_share_buffer_manager.h
-
1src/core/hle/service/nvnflinger/hardware_composer.cpp
-
13src/core/hle/service/nvnflinger/hwc_layer.h
-
7src/core/hle/service/nvnflinger/nvnflinger.cpp
-
6src/core/hle/service/nvnflinger/nvnflinger.h
-
6src/core/hle/service/vi/layer/vi_layer.cpp
-
13src/core/hle/service/vi/layer/vi_layer.h
-
18src/frontend_common/config.cpp
-
2src/frontend_common/config.h
-
2src/video_core/CMakeLists.txt
-
36src/video_core/capture.h
-
7src/video_core/framebuffer_config.h
-
15src/video_core/gpu.cpp
-
2src/video_core/gpu.h
-
21src/video_core/host_shaders/fidelityfx_fsr.frag
-
2src/video_core/host_shaders/fxaa.frag
-
19src/video_core/host_shaders/opengl_fidelityfx_fsr.frag
-
2src/video_core/host_shaders/opengl_present.frag
-
2src/video_core/host_shaders/present_bicubic.frag
-
14src/video_core/host_shaders/present_gaussian.frag
-
1src/video_core/host_shaders/vulkan_fidelityfx_fsr_easu_fp16.frag
-
1src/video_core/host_shaders/vulkan_fidelityfx_fsr_easu_fp32.frag
-
1src/video_core/host_shaders/vulkan_fidelityfx_fsr_rcas_fp16.frag
-
1src/video_core/host_shaders/vulkan_fidelityfx_fsr_rcas_fp32.frag
-
2src/video_core/host_shaders/vulkan_present_scaleforce_fp16.frag
-
2src/video_core/host_shaders/vulkan_present_scaleforce_fp32.frag
-
37src/video_core/present.h
-
3src/video_core/renderer_base.h
-
5src/video_core/renderer_null/renderer_null.cpp
-
2src/video_core/renderer_null/renderer_null.h
-
15src/video_core/renderer_opengl/gl_blit_screen.cpp
-
7src/video_core/renderer_opengl/gl_blit_screen.h
-
35src/video_core/renderer_opengl/present/layer.cpp
-
8src/video_core/renderer_opengl/present/layer.h
-
19src/video_core/renderer_opengl/present/window_adapt_pass.cpp
-
2src/video_core/renderer_opengl/present/window_adapt_pass.h
-
89src/video_core/renderer_opengl/renderer_opengl.cpp
-
9src/video_core/renderer_opengl/renderer_opengl.h
-
19src/video_core/renderer_vulkan/present/layer.cpp
-
6src/video_core/renderer_vulkan/present/layer.h
-
92src/video_core/renderer_vulkan/present/util.cpp
-
9src/video_core/renderer_vulkan/present/util.h
-
29src/video_core/renderer_vulkan/present/window_adapt_pass.cpp
-
6src/video_core/renderer_vulkan/present/window_adapt_pass.h
-
114src/video_core/renderer_vulkan/renderer_vulkan.cpp
-
11src/video_core/renderer_vulkan/renderer_vulkan.h
-
14src/video_core/renderer_vulkan/vk_blit_screen.cpp
-
5src/video_core/renderer_vulkan/vk_blit_screen.h
-
8src/video_core/texture_cache/texture_cache.h
-
3src/yuzu/CMakeLists.txt
-
86src/yuzu/configuration/configure_applets.cpp
-
48src/yuzu/configuration/configure_applets.h
-
65src/yuzu/configuration/configure_applets.ui
-
7src/yuzu/configuration/configure_dialog.cpp
-
2src/yuzu/configuration/configure_dialog.h
-
22src/yuzu/configuration/shared_translation.cpp
@ -0,0 +1,36 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
|||
// SPDX-License-Identifier: GPL-2.0-or-later |
|||
|
|||
#pragma once |
|||
|
|||
#include "common/alignment.h" |
|||
#include "common/bit_util.h" |
|||
#include "common/common_types.h" |
|||
#include "core/frontend/framebuffer_layout.h" |
|||
#include "video_core/surface.h" |
|||
|
|||
namespace VideoCore::Capture { |
|||
|
|||
constexpr u32 BlockHeight = 4; |
|||
constexpr u32 BlockDepth = 0; |
|||
constexpr u32 BppLog2 = 2; |
|||
|
|||
constexpr auto PixelFormat = Surface::PixelFormat::B8G8R8A8_UNORM; |
|||
|
|||
constexpr auto LinearWidth = Layout::ScreenUndocked::Width; |
|||
constexpr auto LinearHeight = Layout::ScreenUndocked::Height; |
|||
constexpr auto LinearDepth = 1U; |
|||
constexpr auto BytesPerPixel = 4U; |
|||
|
|||
constexpr auto TiledWidth = LinearWidth; |
|||
constexpr auto TiledHeight = Common::AlignUpLog2(LinearHeight, BlockHeight + BlockDepth + BppLog2); |
|||
constexpr auto TiledSize = TiledWidth * TiledHeight * (1 << BppLog2); |
|||
|
|||
constexpr Layout::FramebufferLayout Layout{ |
|||
.width = LinearWidth, |
|||
.height = LinearHeight, |
|||
.screen = {0, 0, LinearWidth, LinearHeight}, |
|||
.is_srgb = false, |
|||
}; |
|||
|
|||
} // namespace VideoCore::Capture |
|||
@ -0,0 +1,37 @@ |
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project |
|||
// SPDX-License-Identifier: GPL-2.0-or-later |
|||
|
|||
#pragma once |
|||
|
|||
#include "common/settings.h" |
|||
|
|||
static inline Settings::ScalingFilter GetScalingFilter() { |
|||
return Settings::values.scaling_filter.GetValue(); |
|||
} |
|||
|
|||
static inline Settings::AntiAliasing GetAntiAliasing() { |
|||
return Settings::values.anti_aliasing.GetValue(); |
|||
} |
|||
|
|||
static inline Settings::ScalingFilter GetScalingFilterForAppletCapture() { |
|||
return Settings::ScalingFilter::Bilinear; |
|||
} |
|||
|
|||
static inline Settings::AntiAliasing GetAntiAliasingForAppletCapture() { |
|||
return Settings::AntiAliasing::None; |
|||
} |
|||
|
|||
struct PresentFilters { |
|||
Settings::ScalingFilter (*get_scaling_filter)(); |
|||
Settings::AntiAliasing (*get_anti_aliasing)(); |
|||
}; |
|||
|
|||
constexpr PresentFilters PresentFiltersForDisplay{ |
|||
.get_scaling_filter = &GetScalingFilter, |
|||
.get_anti_aliasing = &GetAntiAliasing, |
|||
}; |
|||
|
|||
constexpr PresentFilters PresentFiltersForAppletCapture{ |
|||
.get_scaling_filter = &GetScalingFilterForAppletCapture, |
|||
.get_anti_aliasing = &GetAntiAliasingForAppletCapture, |
|||
}; |
|||
@ -0,0 +1,86 @@ |
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
|||
|
|||
#include "common/settings.h"
|
|||
#include "core/core.h"
|
|||
#include "ui_configure_applets.h"
|
|||
#include "yuzu/configuration/configuration_shared.h"
|
|||
#include "yuzu/configuration/configure_applets.h"
|
|||
#include "yuzu/configuration/shared_widget.h"
|
|||
|
|||
ConfigureApplets::ConfigureApplets(Core::System& system_, |
|||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group_, |
|||
const ConfigurationShared::Builder& builder, QWidget* parent) |
|||
: Tab(group_, parent), ui{std::make_unique<Ui::ConfigureApplets>()}, system{system_} { |
|||
ui->setupUi(this); |
|||
|
|||
Setup(builder); |
|||
|
|||
SetConfiguration(); |
|||
} |
|||
|
|||
ConfigureApplets::~ConfigureApplets() = default; |
|||
|
|||
void ConfigureApplets::changeEvent(QEvent* event) { |
|||
if (event->type() == QEvent::LanguageChange) { |
|||
RetranslateUI(); |
|||
} |
|||
|
|||
QWidget::changeEvent(event); |
|||
} |
|||
|
|||
void ConfigureApplets::RetranslateUI() { |
|||
ui->retranslateUi(this); |
|||
} |
|||
|
|||
void ConfigureApplets::Setup(const ConfigurationShared::Builder& builder) { |
|||
auto& library_applets_layout = *ui->group_library_applet_modes->layout(); |
|||
std::map<u32, QWidget*> applets_hold{}; |
|||
|
|||
std::vector<Settings::BasicSetting*> settings; |
|||
auto push = [&settings](auto& list) { |
|||
for (auto setting : list) { |
|||
settings.push_back(setting); |
|||
} |
|||
}; |
|||
|
|||
push(Settings::values.linkage.by_category[Settings::Category::LibraryApplet]); |
|||
|
|||
for (auto setting : settings) { |
|||
ConfigurationShared::Widget* widget = builder.BuildWidget(setting, apply_funcs); |
|||
|
|||
if (widget == nullptr) { |
|||
continue; |
|||
} |
|||
if (!widget->Valid()) { |
|||
widget->deleteLater(); |
|||
continue; |
|||
} |
|||
|
|||
// Untested applets
|
|||
if (setting->Id() == Settings::values.data_erase_applet_mode.Id() || |
|||
setting->Id() == Settings::values.error_applet_mode.Id() || |
|||
setting->Id() == Settings::values.net_connect_applet_mode.Id() || |
|||
setting->Id() == Settings::values.web_applet_mode.Id() || |
|||
setting->Id() == Settings::values.shop_applet_mode.Id() || |
|||
setting->Id() == Settings::values.login_share_applet_mode.Id() || |
|||
setting->Id() == Settings::values.wifi_web_auth_applet_mode.Id() || |
|||
setting->Id() == Settings::values.my_page_applet_mode.Id()) { |
|||
widget->setHidden(true); |
|||
} |
|||
|
|||
applets_hold.emplace(setting->Id(), widget); |
|||
} |
|||
for (const auto& [label, widget] : applets_hold) { |
|||
library_applets_layout.addWidget(widget); |
|||
} |
|||
} |
|||
|
|||
void ConfigureApplets::SetConfiguration() {} |
|||
|
|||
void ConfigureApplets::ApplyConfiguration() { |
|||
const bool powered_on = system.IsPoweredOn(); |
|||
for (const auto& func : apply_funcs) { |
|||
func(powered_on); |
|||
} |
|||
} |
|||
@ -0,0 +1,48 @@ |
|||
// SPDX-FileCopyrightText: 2024 yuzu Emulator Project |
|||
// SPDX-License-Identifier: GPL-2.0-or-later |
|||
|
|||
#pragma once |
|||
|
|||
#include <QWidget> |
|||
#include "yuzu/configuration/configuration_shared.h" |
|||
|
|||
class QCheckBox; |
|||
class QLineEdit; |
|||
class QComboBox; |
|||
class QDateTimeEdit; |
|||
namespace Core { |
|||
class System; |
|||
} |
|||
|
|||
namespace Ui { |
|||
class ConfigureApplets; |
|||
} |
|||
|
|||
namespace ConfigurationShared { |
|||
class Builder; |
|||
} |
|||
|
|||
class ConfigureApplets : public ConfigurationShared::Tab { |
|||
public: |
|||
explicit ConfigureApplets(Core::System& system_, |
|||
std::shared_ptr<std::vector<ConfigurationShared::Tab*>> group, |
|||
const ConfigurationShared::Builder& builder, |
|||
QWidget* parent = nullptr); |
|||
~ConfigureApplets() override; |
|||
|
|||
void ApplyConfiguration() override; |
|||
void SetConfiguration() override; |
|||
|
|||
private: |
|||
void changeEvent(QEvent* event) override; |
|||
void RetranslateUI(); |
|||
|
|||
void Setup(const ConfigurationShared::Builder& builder); |
|||
|
|||
std::vector<std::function<void(bool)>> apply_funcs{}; |
|||
|
|||
std::unique_ptr<Ui::ConfigureApplets> ui; |
|||
bool enabled = false; |
|||
|
|||
Core::System& system; |
|||
}; |
|||
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<ui version="4.0"> |
|||
<class>ConfigureApplets</class> |
|||
<widget class="QWidget" name="ConfigureApplets"> |
|||
<property name="geometry"> |
|||
<rect> |
|||
<x>0</x> |
|||
<y>0</y> |
|||
<width>605</width> |
|||
<height>300</height> |
|||
</rect> |
|||
</property> |
|||
<property name="windowTitle"> |
|||
<string>Form</string> |
|||
</property> |
|||
<property name="accessibleName"> |
|||
<string>Applets</string> |
|||
</property> |
|||
<layout class="QVBoxLayout" name="verticalLayout_1"> |
|||
<item> |
|||
<layout class="QVBoxLayout" name="verticalLayout"> |
|||
<item> |
|||
<widget class="QGroupBox" name="group_library_applet_modes"> |
|||
<property name="title"> |
|||
<string>Applet mode preference</string> |
|||
</property> |
|||
<layout class="QVBoxLayout"> |
|||
<item> |
|||
<widget class="QWidget" name="applets_widget" native="true"> |
|||
<layout class="QVBoxLayout" name="verticalLayout_3"> |
|||
<property name="leftMargin"> |
|||
<number>0</number> |
|||
</property> |
|||
<property name="topMargin"> |
|||
<number>0</number> |
|||
</property> |
|||
<property name="rightMargin"> |
|||
<number>0</number> |
|||
</property> |
|||
</layout> |
|||
</widget> |
|||
</item> |
|||
</layout> |
|||
</widget> |
|||
</item> |
|||
</layout> |
|||
</item> |
|||
<item> |
|||
<spacer name="verticalSpacer"> |
|||
<property name="orientation"> |
|||
<enum>Qt::Vertical</enum> |
|||
</property> |
|||
<property name="sizeHint" stdset="0"> |
|||
<size> |
|||
<width>20</width> |
|||
<height>40</height> |
|||
</size> |
|||
</property> |
|||
</spacer> |
|||
</item> |
|||
</layout> |
|||
</widget> |
|||
<resources/> |
|||
<connections/> |
|||
</ui> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue