aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/control
diff options
context:
space:
mode:
authorxbzk <xbzk@eden-emu.dev>2026-07-23 21:59:55 +0200
committercrueter <crueter@eden-emu.dev>2026-07-23 21:59:55 +0200
commitb85f289048fc4ea3636761788e3126ab2e79d591 (patch)
tree9b409e5a7646c852142d2ccb29414b0b0a04ba50 /src/video_core/control
parent89004124a55a5ce8c45a90dcb60afd8a107238c3 (diff)
[nce, fs] tico support, fix FS bug that would nuke entire 'switch' folder (#4086)
Contains the minimal set of functionalities to allow tico installer succeed, and tico work normally EXCEPT for game launching (which me or someone else will investigate later) First three commits are from PR 4012. The other six, kinda dizzy to explain each one. All were implemented based on tico source, switchbrew and libnx. Hopefully the commit messages will do. Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4086 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: Maufeat <sahyno1996@gmail.com>
Diffstat (limited to 'src/video_core/control')
-rw-r--r--src/video_core/control/channel_state.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/video_core/control/channel_state.cpp b/src/video_core/control/channel_state.cpp
index c6f2c3c2ca..12a452dfc0 100644
--- a/src/video_core/control/channel_state.cpp
+++ b/src/video_core/control/channel_state.cpp
@@ -16,6 +16,26 @@
#include "video_core/memory_manager.h"
namespace Tegra::Control {
+namespace {
+
+// Match NVK/Nouveau's initial pushbuffer subchannel layout.
+constexpr u32 Nvk3DSubchannel = 0;
+constexpr u32 NvkComputeSubchannel = 1;
+constexpr u32 Nvk2DSubchannel = 3;
+constexpr u32 NvkCopySubchannel = 4;
+
+void BindNvkDefaultSubchannels(ChannelState::Payload& payload) {
+ auto& dma_pusher = payload.dma_pusher;
+ dma_pusher.BindSubchannel(&payload.maxwell_3d, Nvk3DSubchannel, Engines::EngineTypes::Maxwell3D);
+ dma_pusher.BindSubchannel(&payload.kepler_compute, NvkComputeSubchannel,
+ Engines::EngineTypes::KeplerCompute);
+ // Subchannel 2 is M2MF there; Eden does not expose a 0x9039 engine yet.
+ dma_pusher.BindSubchannel(&payload.fermi_2d, Nvk2DSubchannel, Engines::EngineTypes::Fermi2D);
+ dma_pusher.BindSubchannel(&payload.maxwell_dma, NvkCopySubchannel,
+ Engines::EngineTypes::MaxwellDMA);
+}
+
+} // Anonymous namespace
ChannelState::Payload::Payload(Core::System& system, MemoryManager& memory_manager, ChannelState& channel_state)
: maxwell_3d(memory_manager)
@@ -35,6 +55,7 @@ void ChannelState::Init(Core::System& system, u64 program_id_) {
ASSERT(memory_manager);
program_id = program_id_;
payload.emplace(system, *memory_manager, *this);
+ BindNvkDefaultSubchannels(*payload);
initialized = true;
}