From c541559767c3912940ee3d73a122530b3edde9f1 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Sat, 5 Mar 2022 08:01:13 +0100 Subject: MacroHLE: Refactor MacroHLE system. --- src/video_core/engines/maxwell_3d.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'src/video_core/engines/maxwell_3d.h') diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h index ac5e87563..e2256594d 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -3068,10 +3068,14 @@ public: friend class DrawManager; std::vector inline_index_draw_indexes; - std::vector macro_addresses; - Core::System& system; - MemoryManager& memory_manager; + GPUVAddr getMacroAddress(size_t index) const { + return macro_addresses[index]; + } + + void RefreshParameters(); + + u32 GetMaxCurrentVertices(); /// Handles a write to the CLEAR_BUFFERS register. void ProcessClearBuffers(u32 layer_count); @@ -3135,6 +3139,9 @@ private: /// Returns a query's value or an empty object if the value will be deferred through a cache. std::optional GetQueryResult(); + Core::System& system; + MemoryManager& memory_manager; + VideoCore::RasterizerInterface* rasterizer = nullptr; /// Start offsets of each macro in macro_memory @@ -3151,6 +3158,14 @@ private: Upload::State upload_state; bool execute_on{true}; + + std::array draw_command{}; + std::vector deferred_draw_method; + enum class DrawMode : u32 { General = 0, Instance, InlineIndex }; + DrawMode draw_mode{DrawMode::General}; + bool draw_indexed{}; + std::vector> macro_segments; + std::vector macro_addresses; }; #define ASSERT_REG_POSITION(field_name, position) \ -- cgit v1.2.3