summaryrefslogtreecommitdiffstats
path: root/src/video_core/gpu.h
diff options
context:
space:
mode:
authorJames Rowe <jroweboy@gmail.com>2020-03-25 03:58:49 +0100
committerJames Rowe <jroweboy@gmail.com>2020-03-25 04:03:42 +0100
commit282adfc70b5d7d958d564bfda0227bb3fbd8d110 (patch)
tree2a98e3bedec2e7fdb33478814a73be664661aecc /src/video_core/gpu.h
parentUse the correct directory for Qt Plugins (diff)
downloadyuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar
yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.gz
yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.bz2
yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.lz
yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.xz
yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.tar.zst
yuzu-282adfc70b5d7d958d564bfda0227bb3fbd8d110.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/gpu.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 64acb17df..ced9d7e28 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -25,8 +25,11 @@ inline u8* FromCacheAddr(CacheAddr cache_addr) {
}
namespace Core {
-class System;
+namespace Frontend {
+class EmuWindow;
}
+class System;
+} // namespace Core
namespace VideoCore {
class RendererBase;
@@ -129,7 +132,8 @@ class MemoryManager;
class GPU {
public:
- explicit GPU(Core::System& system, VideoCore::RendererBase& renderer, bool is_async);
+ explicit GPU(Core::System& system, std::unique_ptr<VideoCore::RendererBase>&& renderer,
+ bool is_async);
virtual ~GPU();
@@ -174,6 +178,14 @@ public:
/// Returns a reference to the GPU DMA pusher.
Tegra::DmaPusher& DmaPusher();
+ VideoCore::RendererBase& Renderer() {
+ return *renderer;
+ }
+
+ const VideoCore::RendererBase& Renderer() const {
+ return *renderer;
+ }
+
// Waits for the GPU to finish working
virtual void WaitIdle() const = 0;
@@ -287,7 +299,7 @@ private:
protected:
std::unique_ptr<Tegra::DmaPusher> dma_pusher;
Core::System& system;
- VideoCore::RendererBase& renderer;
+ std::unique_ptr<VideoCore::RendererBase> renderer;
private:
std::unique_ptr<Tegra::MemoryManager> memory_manager;