summaryrefslogtreecommitdiffstats
path: root/src/video_core/dma_pusher.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-05-05 23:12:42 +0200
committerGitHub <noreply@github.com>2020-05-05 23:12:42 +0200
commit41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa (patch)
tree64c61fda0aaa076cd54c46e8c271e67888c79c61 /src/video_core/dma_pusher.h
parentMerge pull request #3881 from lioncash/mem-warning (diff)
parentUpdate src/video_core/gpu.cpp (diff)
downloadyuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.tar
yuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.tar.gz
yuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.tar.bz2
yuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.tar.lz
yuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.tar.xz
yuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.tar.zst
yuzu-41682e0888f7cb640787ab8d9a7e5c0ebb83d8fa.zip
Diffstat (limited to 'src/video_core/dma_pusher.h')
-rw-r--r--src/video_core/dma_pusher.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/video_core/dma_pusher.h b/src/video_core/dma_pusher.h
index 6cef71306..e8b714e94 100644
--- a/src/video_core/dma_pusher.h
+++ b/src/video_core/dma_pusher.h
@@ -4,11 +4,13 @@
#pragma once
+#include <array>
#include <vector>
#include <queue>
#include "common/bit_field.h"
#include "common/common_types.h"
+#include "video_core/engines/engine_interface.h"
namespace Core {
class System;
@@ -69,7 +71,13 @@ public:
void DispatchCalls();
+ void BindSubchannel(Tegra::Engines::EngineInterface* engine, u32 subchannel_id) {
+ subchannels[subchannel_id] = engine;
+ }
+
private:
+ static constexpr u32 non_puller_methods = 0x40;
+ static constexpr u32 max_subchannels = 8;
bool Step();
void SetState(const CommandHeader& command_header);
@@ -88,6 +96,7 @@ private:
u32 method_count; ///< Current method count
u32 length_pending; ///< Large NI command length pending
bool non_incrementing; ///< Current command's NI flag
+ bool is_last_call;
};
DmaState dma_state{};
@@ -96,6 +105,8 @@ private:
GPUVAddr dma_mget{}; ///< main pushbuffer last read address
bool ib_enable{true}; ///< IB mode enabled
+ std::array<Tegra::Engines::EngineInterface*, max_subchannels> subchannels{};
+
GPU& gpu;
Core::System& system;
};