diff options
author | greggameplayer <33609333+greggameplayer@users.noreply.github.com> | 2018-11-02 14:26:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-02 14:26:32 +0100 |
commit | cb8e4a46330ca23496c3a77f42d9d16dc26e0dbe (patch) | |
tree | cedafffe5a605a1ed914e1d1df1267a3cd299fc9 /src/video_core/engines/maxwell_3d.h | |
parent | Implement SurfaceTarget Texture2DArray (diff) | |
parent | Merge pull request #1615 from lioncash/input (diff) | |
download | yuzu-cb8e4a46330ca23496c3a77f42d9d16dc26e0dbe.tar yuzu-cb8e4a46330ca23496c3a77f42d9d16dc26e0dbe.tar.gz yuzu-cb8e4a46330ca23496c3a77f42d9d16dc26e0dbe.tar.bz2 yuzu-cb8e4a46330ca23496c3a77f42d9d16dc26e0dbe.tar.lz yuzu-cb8e4a46330ca23496c3a77f42d9d16dc26e0dbe.tar.xz yuzu-cb8e4a46330ca23496c3a77f42d9d16dc26e0dbe.tar.zst yuzu-cb8e4a46330ca23496c3a77f42d9d16dc26e0dbe.zip |
Diffstat (limited to 'src/video_core/engines/maxwell_3d.h')
-rw-r--r-- | src/video_core/engines/maxwell_3d.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index 443affc36..50873813e 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -475,12 +475,13 @@ public: INSERT_PADDING_WORDS(0x45); struct { - INSERT_PADDING_WORDS(1); + u32 upload_address; u32 data; u32 entry; + u32 bind; } macros; - INSERT_PADDING_WORDS(0x189); + INSERT_PADDING_WORDS(0x188); u32 tfb_enabled; @@ -994,12 +995,25 @@ public: /// Returns the texture information for a specific texture in a specific shader stage. Texture::FullTextureInfo GetStageTexture(Regs::ShaderStage stage, std::size_t offset) const; + /// Memory for macro code - it's undetermined how big this is, however 1MB is much larger than + /// we've seen used. + using MacroMemory = std::array<u32, 0x40000>; + + /// Gets a reference to macro memory. + const MacroMemory& GetMacroMemory() const { + return macro_memory; + } + private: void InitializeRegisterDefaults(); VideoCore::RasterizerInterface& rasterizer; - std::unordered_map<u32, std::vector<u32>> uploaded_macros; + /// Start offsets of each macro in macro_memory + std::unordered_map<u32, u32> macro_offsets; + + /// Memory for macro code + MacroMemory macro_memory; /// Macro method that is currently being executed / being fed parameters. u32 executing_macro = 0; @@ -1022,9 +1036,12 @@ private: */ void CallMacroMethod(u32 method, std::vector<u32> parameters); - /// Handles writes to the macro uploading registers. + /// Handles writes to the macro uploading register. void ProcessMacroUpload(u32 data); + /// Handles writes to the macro bind register. + void ProcessMacroBind(u32 data); + /// Handles a write to the CLEAR_BUFFERS register. void ProcessClearBuffers(); |