summaryrefslogtreecommitdiff
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
authorGravatar Sebastian Valle2018-03-18 15:13:40 -0500
committerGravatar GitHub2018-03-18 15:13:40 -0500
commit46f9d4b4a34ab6d4b072a41de28771906a610d4a (patch)
tree1c17173b997f694dc0bd04d516a131748b4d990d /src/video_core/gpu.h
parentMerge pull request #245 from Subv/set_shader2 (diff)
parentGPU: Store uploaded GPU macros and keep track of the number of method paramet... (diff)
downloadyuzu-46f9d4b4a34ab6d4b072a41de28771906a610d4a.tar.gz
yuzu-46f9d4b4a34ab6d4b072a41de28771906a610d4a.tar.xz
yuzu-46f9d4b4a34ab6d4b072a41de28771906a610d4a.zip
Merge pull request #246 from Subv/gpu_macro_calls
GPU: Store uploaded GPU macros and keep track of the number of method arguments.
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r--src/video_core/gpu.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index c5ec6fdef..d2e4ff52d 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -6,6 +6,7 @@
6 6
7#include <memory> 7#include <memory>
8#include <unordered_map> 8#include <unordered_map>
9#include <vector>
9#include "common/common_types.h" 10#include "common/common_types.h"
10#include "video_core/engines/fermi_2d.h" 11#include "video_core/engines/fermi_2d.h"
11#include "video_core/engines/maxwell_3d.h" 12#include "video_core/engines/maxwell_3d.h"
@@ -38,11 +39,10 @@ public:
38 std::unique_ptr<MemoryManager> memory_manager; 39 std::unique_ptr<MemoryManager> memory_manager;
39 40
40private: 41private:
41 /// Writes a single register in the engine bound to the specified subchannel 42 static constexpr u32 InvalidGraphMacroEntry = 0xFFFFFFFF;
42 void WriteReg(u32 method, u32 subchannel, u32 value);
43 43
44 /// Calls a method in the engine bound to the specified subchannel with the input parameters. 44 /// Writes a single register in the engine bound to the specified subchannel
45 void CallMethod(u32 method, u32 subchannel, const std::vector<u32>& parameters); 45 void WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params);
46 46
47 /// Mapping of command subchannels to their bound engine ids. 47 /// Mapping of command subchannels to their bound engine ids.
48 std::unordered_map<u32, EngineID> bound_engines; 48 std::unordered_map<u32, EngineID> bound_engines;
@@ -53,6 +53,11 @@ private:
53 std::unique_ptr<Engines::Fermi2D> fermi_2d; 53 std::unique_ptr<Engines::Fermi2D> fermi_2d;
54 /// Compute engine 54 /// Compute engine
55 std::unique_ptr<Engines::MaxwellCompute> maxwell_compute; 55 std::unique_ptr<Engines::MaxwellCompute> maxwell_compute;
56
57 /// Entry of the macro that is currently being uploaded
58 u32 current_macro_entry = InvalidGraphMacroEntry;
59 /// Code being uploaded for the current macro
60 std::vector<u32> current_macro_code;
56}; 61};
57 62
58} // namespace Tegra 63} // namespace Tegra