diff options
| author | 2018-03-18 04:17:10 -0500 | |
|---|---|---|
| committer | 2018-03-18 11:51:46 -0500 | |
| commit | aa586fa26854cfe32b97aa99c2874945420bcfc4 (patch) | |
| tree | 1c17173b997f694dc0bd04d516a131748b4d990d /src/video_core/gpu.h | |
| parent | GPU: Macros are specific to the Maxwell3D engine, so handle them internally. (diff) | |
| download | yuzu-aa586fa26854cfe32b97aa99c2874945420bcfc4.tar.gz yuzu-aa586fa26854cfe32b97aa99c2874945420bcfc4.tar.xz yuzu-aa586fa26854cfe32b97aa99c2874945420bcfc4.zip | |
GPU: Store uploaded GPU macros and keep track of the number of method parameters.
Diffstat (limited to 'src/video_core/gpu.h')
| -rw-r--r-- | src/video_core/gpu.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index ba7781756..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,8 +39,10 @@ public: | |||
| 38 | std::unique_ptr<MemoryManager> memory_manager; | 39 | std::unique_ptr<MemoryManager> memory_manager; |
| 39 | 40 | ||
| 40 | private: | 41 | private: |
| 42 | static constexpr u32 InvalidGraphMacroEntry = 0xFFFFFFFF; | ||
| 43 | |||
| 41 | /// Writes a single register in the engine bound to the specified subchannel | 44 | /// Writes a single register in the engine bound to the specified subchannel |
| 42 | void WriteReg(u32 method, u32 subchannel, u32 value); | 45 | void WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params); |
| 43 | 46 | ||
| 44 | /// Mapping of command subchannels to their bound engine ids. | 47 | /// Mapping of command subchannels to their bound engine ids. |
| 45 | std::unordered_map<u32, EngineID> bound_engines; | 48 | std::unordered_map<u32, EngineID> bound_engines; |
| @@ -50,6 +53,11 @@ private: | |||
| 50 | std::unique_ptr<Engines::Fermi2D> fermi_2d; | 53 | std::unique_ptr<Engines::Fermi2D> fermi_2d; |
| 51 | /// Compute engine | 54 | /// Compute engine |
| 52 | 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; | ||
| 53 | }; | 61 | }; |
| 54 | 62 | ||
| 55 | } // namespace Tegra | 63 | } // namespace Tegra |