diff options
author | tfarley <tfarleygithub@gmail.com> | 2016-04-17 00:57:57 +0200 |
---|---|---|
committer | tfarley <tfarleygithub@gmail.com> | 2016-04-21 23:27:56 +0200 |
commit | 22f3a7e94ce0e325a8c3dfeb0814c4b82a42649d (patch) | |
tree | fb0dc58288063f755eda7bc0f8cfb7e9573e397d /src/video_core/rasterizer_interface.h | |
parent | Config: Add scaled resolution option (diff) | |
download | yuzu-22f3a7e94ce0e325a8c3dfeb0814c4b82a42649d.tar yuzu-22f3a7e94ce0e325a8c3dfeb0814c4b82a42649d.tar.gz yuzu-22f3a7e94ce0e325a8c3dfeb0814c4b82a42649d.tar.bz2 yuzu-22f3a7e94ce0e325a8c3dfeb0814c4b82a42649d.tar.lz yuzu-22f3a7e94ce0e325a8c3dfeb0814c4b82a42649d.tar.xz yuzu-22f3a7e94ce0e325a8c3dfeb0814c4b82a42649d.tar.zst yuzu-22f3a7e94ce0e325a8c3dfeb0814c4b82a42649d.zip |
Diffstat (limited to 'src/video_core/rasterizer_interface.h')
-rw-r--r-- | src/video_core/rasterizer_interface.h | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/video_core/rasterizer_interface.h b/src/video_core/rasterizer_interface.h index 008c5827b..bf7101665 100644 --- a/src/video_core/rasterizer_interface.h +++ b/src/video_core/rasterizer_interface.h @@ -6,6 +6,10 @@ #include "common/common_types.h" +#include "core/hw/gpu.h" + +struct ScreenInfo; + namespace Pica { namespace Shader { struct OutputVertex; @@ -18,12 +22,6 @@ class RasterizerInterface { public: virtual ~RasterizerInterface() {} - /// Initialize API-specific GPU objects - virtual void InitObjects() = 0; - - /// Reset the rasterizer, such as flushing all caches and updating all state - virtual void Reset() = 0; - /// Queues the primitive formed by the given vertices for rendering virtual void AddTriangle(const Pica::Shader::OutputVertex& v0, const Pica::Shader::OutputVertex& v1, @@ -32,17 +30,26 @@ public: /// Draw the current batch of triangles virtual void DrawTriangles() = 0; - /// Commit the rasterizer's framebuffer contents immediately to the current 3DS memory framebuffer - virtual void FlushFramebuffer() = 0; - /// Notify rasterizer that the specified PICA register has been changed virtual void NotifyPicaRegisterChanged(u32 id) = 0; - /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory. + /// Notify rasterizer that all caches should be flushed to 3DS memory + virtual void FlushAll() = 0; + + /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory virtual void FlushRegion(PAddr addr, u32 size) = 0; - /// Notify rasterizer that any caches of the specified region should be discraded and reloaded from 3DS memory. - virtual void InvalidateRegion(PAddr addr, u32 size) = 0; + /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory and invalidated + virtual void FlushAndInvalidateRegion(PAddr addr, u32 size) = 0; + + /// Attempt to use a faster method to perform a display transfer + virtual bool AccelerateDisplayTransfer(const GPU::Regs::DisplayTransferConfig& config) { return false; } + + /// Attempt to use a faster method to fill a region + virtual bool AccelerateFill(const GPU::Regs::MemoryFillConfig& config) { return false; } + + /// Attempt to use a faster method to display the framebuffer to screen + virtual bool AccelerateDisplay(const GPU::Regs::FramebufferConfig& config, PAddr framebuffer_addr, u32 pixel_stride, ScreenInfo& screen_info) { return false; } }; } |