diff options
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 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | 8 | ||
| 9 | #include "core/hw/gpu.h" | ||
| 10 | |||
| 11 | struct ScreenInfo; | ||
| 12 | |||
| 9 | namespace Pica { | 13 | namespace Pica { |
| 10 | namespace Shader { | 14 | namespace Shader { |
| 11 | struct OutputVertex; | 15 | struct OutputVertex; |
| @@ -18,12 +22,6 @@ class RasterizerInterface { | |||
| 18 | public: | 22 | public: |
| 19 | virtual ~RasterizerInterface() {} | 23 | virtual ~RasterizerInterface() {} |
| 20 | 24 | ||
| 21 | /// Initialize API-specific GPU objects | ||
| 22 | virtual void InitObjects() = 0; | ||
| 23 | |||
| 24 | /// Reset the rasterizer, such as flushing all caches and updating all state | ||
| 25 | virtual void Reset() = 0; | ||
| 26 | |||
| 27 | /// Queues the primitive formed by the given vertices for rendering | 25 | /// Queues the primitive formed by the given vertices for rendering |
| 28 | virtual void AddTriangle(const Pica::Shader::OutputVertex& v0, | 26 | virtual void AddTriangle(const Pica::Shader::OutputVertex& v0, |
| 29 | const Pica::Shader::OutputVertex& v1, | 27 | const Pica::Shader::OutputVertex& v1, |
| @@ -32,17 +30,26 @@ public: | |||
| 32 | /// Draw the current batch of triangles | 30 | /// Draw the current batch of triangles |
| 33 | virtual void DrawTriangles() = 0; | 31 | virtual void DrawTriangles() = 0; |
| 34 | 32 | ||
| 35 | /// Commit the rasterizer's framebuffer contents immediately to the current 3DS memory framebuffer | ||
| 36 | virtual void FlushFramebuffer() = 0; | ||
| 37 | |||
| 38 | /// Notify rasterizer that the specified PICA register has been changed | 33 | /// Notify rasterizer that the specified PICA register has been changed |
| 39 | virtual void NotifyPicaRegisterChanged(u32 id) = 0; | 34 | virtual void NotifyPicaRegisterChanged(u32 id) = 0; |
| 40 | 35 | ||
| 41 | /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory. | 36 | /// Notify rasterizer that all caches should be flushed to 3DS memory |
| 37 | virtual void FlushAll() = 0; | ||
| 38 | |||
| 39 | /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory | ||
| 42 | virtual void FlushRegion(PAddr addr, u32 size) = 0; | 40 | virtual void FlushRegion(PAddr addr, u32 size) = 0; |
| 43 | 41 | ||
| 44 | /// Notify rasterizer that any caches of the specified region should be discraded and reloaded from 3DS memory. | 42 | /// Notify rasterizer that any caches of the specified region should be flushed to 3DS memory and invalidated |
| 45 | virtual void InvalidateRegion(PAddr addr, u32 size) = 0; | 43 | virtual void FlushAndInvalidateRegion(PAddr addr, u32 size) = 0; |
| 44 | |||
| 45 | /// Attempt to use a faster method to perform a display transfer | ||
| 46 | virtual bool AccelerateDisplayTransfer(const GPU::Regs::DisplayTransferConfig& config) { return false; } | ||
| 47 | |||
| 48 | /// Attempt to use a faster method to fill a region | ||
| 49 | virtual bool AccelerateFill(const GPU::Regs::MemoryFillConfig& config) { return false; } | ||
| 50 | |||
| 51 | /// Attempt to use a faster method to display the framebuffer to screen | ||
| 52 | virtual bool AccelerateDisplay(const GPU::Regs::FramebufferConfig& config, PAddr framebuffer_addr, u32 pixel_stride, ScreenInfo& screen_info) { return false; } | ||
| 46 | }; | 53 | }; |
| 47 | 54 | ||
| 48 | } | 55 | } |