summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-02-09 05:21:53 +0100
committerbunnei <bunneidev@gmail.com>2019-03-07 03:48:57 +0100
commitaaa373585cd55bd03fcc589d2ad9f749e2cb99d4 (patch)
tree1da617fd05d84d59910d585a6b01af2c89f3ed36 /src/video_core/gpu.h
parentgpu: Move command processing to another thread. (diff)
downloadyuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.tar
yuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.tar.gz
yuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.tar.bz2
yuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.tar.lz
yuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.tar.xz
yuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.tar.zst
yuzu-aaa373585cd55bd03fcc589d2ad9f749e2cb99d4.zip
Diffstat (limited to 'src/video_core/gpu.h')
-rw-r--r--src/video_core/gpu.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 3f3098bf1..14a421cc1 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -19,10 +19,6 @@ namespace VideoCore {
class RendererBase;
} // namespace VideoCore
-namespace VideoCommon::GPUThread {
-class ThreadManager;
-} // namespace VideoCommon::GPUThread
-
namespace Tegra {
enum class RenderTargetFormat : u32 {
@@ -123,7 +119,7 @@ enum class EngineID {
MAXWELL_DMA_COPY_A = 0xB0B5,
};
-class GPU final {
+class GPU {
public:
explicit GPU(Core::System& system, VideoCore::RendererBase& renderer);
@@ -206,20 +202,20 @@ public:
} regs{};
/// Push GPU command entries to be processed
- void PushGPUEntries(Tegra::CommandList&& entries);
+ virtual void PushGPUEntries(Tegra::CommandList&& entries) = 0;
/// Swap buffers (render frame)
- void SwapBuffers(
- std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer);
+ virtual void SwapBuffers(
+ std::optional<std::reference_wrapper<const Tegra::FramebufferConfig>> framebuffer) = 0;
/// Notify rasterizer that any caches of the specified region should be flushed to Switch memory
- void FlushRegion(VAddr addr, u64 size);
+ virtual void FlushRegion(VAddr addr, u64 size) = 0;
/// Notify rasterizer that any caches of the specified region should be invalidated
- void InvalidateRegion(VAddr addr, u64 size);
+ virtual void InvalidateRegion(VAddr addr, u64 size) = 0;
/// Notify rasterizer that any caches of the specified region should be flushed and invalidated
- void FlushAndInvalidateRegion(VAddr addr, u64 size);
+ virtual void FlushAndInvalidateRegion(VAddr addr, u64 size) = 0;
private:
void ProcessBindMethod(const MethodCall& method_call);
@@ -236,13 +232,13 @@ private:
/// Determines where the method should be executed.
bool ExecuteMethodOnEngine(const MethodCall& method_call);
-private:
+protected:
std::unique_ptr<Tegra::DmaPusher> dma_pusher;
- std::unique_ptr<Tegra::MemoryManager> memory_manager;
- std::unique_ptr<VideoCommon::GPUThread::ThreadManager> gpu_thread;
-
VideoCore::RendererBase& renderer;
+private:
+ std::unique_ptr<Tegra::MemoryManager> memory_manager;
+
/// Mapping of command subchannels to their bound engine ids.
std::array<EngineID, 8> bound_engines = {};