From 1d57851fc7b522aa8ec9b07fe398a1361fdfad25 Mon Sep 17 00:00:00 2001 From: FengChen Date: Mon, 21 Nov 2022 23:38:37 +0800 Subject: video_core: Optimize maxwell drawing trigger mechanism --- src/video_core/engines/maxwell_3d.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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 c3099f9a6..84c497ebd 100644 --- a/src/video_core/engines/maxwell_3d.h +++ b/src/video_core/engines/maxwell_3d.h @@ -3148,10 +3148,12 @@ private: /// Handles use of topology overrides (e.g., to avoid using a topology assigned from a macro) void ProcessTopologyOverride(); - void ProcessDraw(u32 instance_count = 1); - + /// Handles deferred draw(e.g., instance draw). void ProcessDeferredDraw(); + /// Handles a draw. + void ProcessDraw(u32 instance_count = 1); + /// Returns a query's value or an empty object if the value will be deferred through a cache. std::optional GetQueryResult(); @@ -3178,6 +3180,8 @@ private: std::array draw_command{}; std::vector deferred_draw_method; + enum class DrawMode : u32 { General = 0, Instance, InlineIndex }; + DrawMode draw_mode{DrawMode::General}; }; #define ASSERT_REG_POSITION(field_name, position) \ -- cgit v1.2.3