Compare commits

..

6 commits

Author SHA1 Message Date
c0765905dc fix apple
All checks were successful
eden-license / license-header (pull_request) Successful in 21s
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-28 20:22:39 +02:00
ea4cfa3f8a [cmake] fix android once for all
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-28 20:22:39 +02:00
9f7334e762 [cmake] fix android?
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-28 20:22:39 +02:00
4fc5eb87be [common] use libc++ provided jthread instead of in-house one (which deadlocks on FBSD 14)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
2025-09-28 20:22:39 +02:00
d19a7c3782
[service] unstub process winding (#2590)
It's used on FW19+ and FW20+ but since all 20+ applets stuck on HID, you still can't boot into applets.
Should fix: Bioshock Infinite on FW19

Reviewed-on: #2590
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: unknown <sahyno1996@gmail.com>
Co-committed-by: unknown <sahyno1996@gmail.com>
2025-09-28 18:43:01 +02:00
c725641f13
[video_core] Fix fast buffers without performance loss (#2605)
Fixes games that have some elements flickering on the screen, such as Kirby Star Allies and others, without impacting performance.

Reviewed-on: #2605
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Co-authored-by: MaranBr <maranbr@outlook.com>
Co-committed-by: MaranBr <maranbr@outlook.com>
2025-09-28 07:29:19 +02:00
6 changed files with 85 additions and 14 deletions

View file

@ -8,6 +8,7 @@
#include <deque> #include <deque>
#include <mutex> #include <mutex>
#include <stack>
#include "common/math_util.h" #include "common/math_util.h"
#include "core/hle/service/apm/apm_controller.h" #include "core/hle/service/apm/apm_controller.h"
@ -23,6 +24,7 @@
#include "core/hle/service/am/hid_registration.h" #include "core/hle/service/am/hid_registration.h"
#include "core/hle/service/am/lifecycle_manager.h" #include "core/hle/service/am/lifecycle_manager.h"
#include "core/hle/service/am/process_holder.h" #include "core/hle/service/am/process_holder.h"
#include "core/hle/service/am/service/storage.h"
namespace Service::AM { namespace Service::AM {
@ -97,6 +99,9 @@ struct Applet {
std::deque<std::vector<u8>> preselected_user_launch_parameter{}; std::deque<std::vector<u8>> preselected_user_launch_parameter{};
std::deque<std::vector<u8>> friend_invitation_storage_channel{}; std::deque<std::vector<u8>> friend_invitation_storage_channel{};
// Context Stack
std::stack<SharedPointer<IStorage>> context_stack{};
// Caller applet // Caller applet
std::weak_ptr<Applet> caller_applet{}; std::weak_ptr<Applet> caller_applet{};
std::shared_ptr<AppletDataBroker> caller_applet_broker{}; std::shared_ptr<AppletDataBroker> caller_applet_broker{};

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@ -15,12 +18,12 @@ IProcessWindingController::IProcessWindingController(Core::System& system_,
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, D<&IProcessWindingController::GetLaunchReason>, "GetLaunchReason"}, {0, D<&IProcessWindingController::GetLaunchReason>, "GetLaunchReason"},
{11, D<&IProcessWindingController::OpenCallingLibraryApplet>, "OpenCallingLibraryApplet"}, {11, D<&IProcessWindingController::OpenCallingLibraryApplet>, "OpenCallingLibraryApplet"},
{21, nullptr, "PushContext"}, {21, D<&IProcessWindingController::PushContext>, "PushContext"},
{22, nullptr, "PopContext"}, {22, D<&IProcessWindingController::PopContext>, "PopContext"},
{23, nullptr, "CancelWindingReservation"}, {23, D<&IProcessWindingController::CancelWindingReservation>, "CancelWindingReservation"},
{30, nullptr, "WindAndDoReserved"}, {30, D<&IProcessWindingController::WindAndDoReserved>, "WindAndDoReserved"},
{40, nullptr, "ReserveToStartAndWaitAndUnwindThis"}, {40, D<&IProcessWindingController::ReserveToStartAndWaitAndUnwindThis>, "ReserveToStartAndWaitAndUnwindThis"},
{41, nullptr, "ReserveToStartAndWait"}, {41, D<&IProcessWindingController::ReserveToStartAndWait>, "ReserveToStartAndWait"},
}; };
// clang-format on // clang-format on
@ -51,4 +54,43 @@ Result IProcessWindingController::OpenCallingLibraryApplet(
R_SUCCEED(); R_SUCCEED();
} }
Result IProcessWindingController::PushContext(SharedPointer<IStorage> context) {
LOG_INFO(Service_AM, "called");
m_applet->context_stack.push(context);
R_SUCCEED();
}
Result IProcessWindingController::PopContext(Out<SharedPointer<IStorage>> out_context) {
LOG_INFO(Service_AM, "called");
if (m_applet->context_stack.empty()) {
LOG_ERROR(Service_AM, "Context stack is empty");
R_THROW(ResultUnknown);
}
*out_context = m_applet->context_stack.top();
m_applet->context_stack.pop();
R_SUCCEED();
}
Result IProcessWindingController::CancelWindingReservation() {
LOG_WARNING(Service_AM, "STUBBED");
R_SUCCEED();
}
Result IProcessWindingController::WindAndDoReserved() {
LOG_WARNING(Service_AM, "STUBBED");
R_SUCCEED();
}
Result IProcessWindingController::ReserveToStartAndWaitAndUnwindThis() {
LOG_WARNING(Service_AM, "STUBBED");
R_SUCCEED();
}
Result IProcessWindingController::ReserveToStartAndWait() {
LOG_WARNING(Service_AM, "STUBBED");
R_SUCCEED();
}
} // namespace Service::AM } // namespace Service::AM

View file

@ -1,8 +1,12 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
#pragma once #pragma once
#include "core/hle/service/am/service/storage.h"
#include "core/hle/service/am/am_types.h" #include "core/hle/service/am/am_types.h"
#include "core/hle/service/cmif_types.h" #include "core/hle/service/cmif_types.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
@ -21,6 +25,12 @@ private:
Result GetLaunchReason(Out<AppletProcessLaunchReason> out_launch_reason); Result GetLaunchReason(Out<AppletProcessLaunchReason> out_launch_reason);
Result OpenCallingLibraryApplet( Result OpenCallingLibraryApplet(
Out<SharedPointer<ILibraryAppletAccessor>> out_calling_library_applet); Out<SharedPointer<ILibraryAppletAccessor>> out_calling_library_applet);
Result PushContext(SharedPointer<IStorage> in_context);
Result PopContext(Out<SharedPointer<IStorage>> out_context);
Result CancelWindingReservation();
Result WindAndDoReserved();
Result ReserveToStartAndWaitAndUnwindThis();
Result ReserveToStartAndWait();
const std::shared_ptr<Applet> m_applet; const std::shared_ptr<Applet> m_applet;
}; };

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@ -67,6 +70,7 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet>
{110, nullptr, "SetApplicationAlbumUserData"}, {110, nullptr, "SetApplicationAlbumUserData"},
{120, D<&ISelfController::SaveCurrentScreenshot>, "SaveCurrentScreenshot"}, {120, D<&ISelfController::SaveCurrentScreenshot>, "SaveCurrentScreenshot"},
{130, D<&ISelfController::SetRecordVolumeMuted>, "SetRecordVolumeMuted"}, {130, D<&ISelfController::SetRecordVolumeMuted>, "SetRecordVolumeMuted"},
{230, D<&ISelfController::Unknown230>, "Unknown230"},
{1000, nullptr, "GetDebugStorageChannel"}, {1000, nullptr, "GetDebugStorageChannel"},
}; };
// clang-format on // clang-format on
@ -404,4 +408,12 @@ Result ISelfController::SetRecordVolumeMuted(bool muted) {
R_SUCCEED(); R_SUCCEED();
} }
Result ISelfController::Unknown230(u32 in_val, Out<u16> out_val) {
LOG_WARNING(Service_AM, "(STUBBED) called, in_val={}", in_val);
*out_val = 0;
R_SUCCEED();
}
} // namespace Service::AM } // namespace Service::AM

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
@ -63,6 +66,7 @@ private:
Result SetAlbumImageTakenNotificationEnabled(bool enabled); Result SetAlbumImageTakenNotificationEnabled(bool enabled);
Result SaveCurrentScreenshot(Capture::AlbumReportOption album_report_option); Result SaveCurrentScreenshot(Capture::AlbumReportOption album_report_option);
Result SetRecordVolumeMuted(bool muted); Result SetRecordVolumeMuted(bool muted);
Result Unknown230(u32 in_val, Out<u16> out_val);
Kernel::KProcess* const m_process; Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet; const std::shared_ptr<Applet> m_applet;

View file

@ -785,18 +785,13 @@ void BufferCache<P>::BindHostGraphicsUniformBuffers(size_t stage) {
} }
template <class P> template <class P>
void BufferCache<P>::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32 binding_index, void BufferCache<P>::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32 binding_index, bool needs_bind) {
bool needs_bind) { ++channel_state->uniform_cache_shots[0];
const Binding& binding = channel_state->uniform_buffers[stage][index]; const Binding& binding = channel_state->uniform_buffers[stage][index];
const DAddr device_addr = binding.device_addr; const DAddr device_addr = binding.device_addr;
const u32 size = (std::min)(binding.size, (*channel_state->uniform_buffer_sizes)[stage][index]); const u32 size = (std::min)(binding.size, (*channel_state->uniform_buffer_sizes)[stage][index]);
Buffer& buffer = slot_buffers[binding.buffer_id]; Buffer& buffer = slot_buffers[binding.buffer_id];
TouchBuffer(buffer, binding.buffer_id); TouchBuffer(buffer, binding.buffer_id);
const bool sync_buffer = SynchronizeBuffer(buffer, device_addr, size);
if (sync_buffer) {
++channel_state->uniform_cache_hits[0];
}
++channel_state->uniform_cache_shots[0];
const bool use_fast_buffer = binding.buffer_id != NULL_BUFFER_ID && const bool use_fast_buffer = binding.buffer_id != NULL_BUFFER_ID &&
size <= channel_state->uniform_buffer_skip_cache_size && size <= channel_state->uniform_buffer_skip_cache_size &&
!memory_tracker.IsRegionGpuModified(device_addr, size); !memory_tracker.IsRegionGpuModified(device_addr, size);
@ -827,7 +822,10 @@ void BufferCache<P>::BindHostGraphicsUniformBuffer(size_t stage, u32 index, u32
device_memory.ReadBlockUnsafe(device_addr, span.data(), size); device_memory.ReadBlockUnsafe(device_addr, span.data(), size);
return; return;
} }
// Classic cached path
if (SynchronizeBuffer(buffer, device_addr, size)) {
++channel_state->uniform_cache_hits[0];
}
// Skip binding if it's not needed and if the bound buffer is not the fast version // Skip binding if it's not needed and if the bound buffer is not the fast version
// This exists to avoid instances where the fast buffer is bound and a GPU write happens // This exists to avoid instances where the fast buffer is bound and a GPU write happens
needs_bind |= HasFastUniformBufferBound(stage, binding_index); needs_bind |= HasFastUniformBufferBound(stage, binding_index);