From 0cfb0bacb2581d79631f496afbc3a3d5dd19eb42 Mon Sep 17 00:00:00 2001 From: Markus Wick Date: Thu, 6 Sep 2018 15:48:08 +0200 Subject: video_core: Move command buffer loop. This moves the hot loop into video_core. This refactoring shall reduce the CPU overhead of calling ProcessCommandList. --- src/video_core/gpu.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/video_core/gpu.h') diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index d29f31f52..9163fbdc6 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -6,6 +6,7 @@ #include #include +#include #include "common/common_types.h" #include "core/hle/service/nvflinger/buffer_queue.h" #include "video_core/memory_manager.h" @@ -67,6 +68,7 @@ u32 RenderTargetBytesPerPixel(RenderTargetFormat format); /// Returns the number of bytes per pixel of each depth format. u32 DepthFormatBytesPerPixel(DepthFormat format); +struct CommandListHeader; class DebugContext; /** @@ -115,7 +117,7 @@ public: ~GPU(); /// Processes a command list stored at the specified address in GPU memory. - void ProcessCommandList(GPUVAddr address, u32 size); + void ProcessCommandLists(const std::vector& commands); /// Returns a reference to the Maxwell3D GPU engine. Engines::Maxwell3D& Maxwell3D(); -- cgit v1.2.3 From c1b8cd90589141feb182da0d48c335bd624a4793 Mon Sep 17 00:00:00 2001 From: Markus Wick Date: Thu, 6 Sep 2018 17:02:46 +0200 Subject: video_core: Refactor command_processor. Inline the WriteReg helper as it is called ~20k times per frame. --- src/video_core/gpu.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/video_core/gpu.h') diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 9163fbdc6..4f71f99d7 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h @@ -132,9 +132,6 @@ public: const Tegra::MemoryManager& MemoryManager() const; private: - /// Writes a single register in the engine bound to the specified subchannel - void WriteReg(u32 method, u32 subchannel, u32 value, u32 remaining_params); - std::unique_ptr memory_manager; /// Mapping of command subchannels to their bound engine ids. -- cgit v1.2.3