summaryrefslogtreecommitdiffstats
path: root/src/video_core/dma_pusher.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-04-28 04:07:21 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-28 04:07:21 +0200
commitb87422a86f4dd3b59ef91c3ce37945865a6cfbef (patch)
treef7a0231f8a226f2dc73ca84fe77aa066f8b912d4 /src/video_core/dma_pusher.h
parentVideoCore/Engines: Refactor Engines CallMethod. (diff)
downloadyuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar.gz
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar.bz2
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar.lz
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar.xz
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.tar.zst
yuzu-b87422a86f4dd3b59ef91c3ce37945865a6cfbef.zip
Diffstat (limited to '')
-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;
};